Hibernate 7: split HqlQueryContext into HqlText, QueryParameters and QuerySettings
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- リファクタリング
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- groovy
- 領域
- backend
調査の方向性
Start with HqlQueryContext and its HqlQueryContextSpec; the issue proposes separating HQL scanning, parameters, and settings into HqlText, QueryParameters, and QuerySettings. Read the dependency order in the issue: #16597 and the Groovy conversion in #16572 must land first, then implement this as a separate refactor on 9.0.x. Keep existing specs intact and add focused specs for leading with, names containing select, and escaped quotes; done means behavior stays unchanged and those specs pass.
索引モデルが issue の本文から書いたものです。
説明
Summary
HqlQueryContext (GORM for Hibernate 7) is a record that also holds the HQL scanner, the query rewriting and the parameter handling. Split it into small classes once the Groovy conversion of the module has landed.
Why
PR #16597 fixes HQL queries with a subquery being rewritten into invalid HQL. The defect came from a text scanner living next to parameter handling: indexOf("select ") and indexOf(" from ") were repeated in four methods, each with its own idea of where the query itself starts. #16597 puts the search in two helpers, but they are still private static methods of the same record, and every method still lowercases and rescans the string.
Proposal
HqlText(orHqlStatement): the HQL string and everything that reads it: the top-levelselect/fromsearch (outside parentheses, string literals, quoted identifiers and comments),normalizeNonAliasedSelect,getRootAlias,countHqlProjections,getSingleProjectionClauseand the result type. The positions are found once.QueryParameters: the named and positional parameters, the expansion of aGString, andconvertValue.QuerySettings: the settings map and the hints, with theAvailableHintsfilter inside the class.HqlQueryContext: a thin record of the three, the target class and theisUpdate/isNativeflags.
No change of behavior. HqlQueryContextSpec and HibernateGormStaticApiSpec stay as they are and are the safety net; add small specs for HqlText and QueryParameters, including a leading with clause, names that contain select, and escaped quotes.
Order
- #16597 lands on 8.0.x.
- #16572 converts the module to Groovy.
- This refactor, on 9.0.x, as its own pull request, so that it is not read as part of a mechanical language conversion.
- 主要言語
- Groovy
- スター
- 2.9k
- フォーク
- 976
- 平均マージ
- 21時間 14分
- マージ済み PR(30日)
- 174
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/grails-core のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
apache/grails-core#16635 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
apache/grails-core#16289 · コメント 5 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
apache/grails-core#15764 ·
メンテナーはふだん 1 日以内に返信
-
Update documentation for Java 25対応中かも @ruthst00 が 9 日前に担当しました。 オープンrelates-to: documentation weekly-action-item
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
apache/grails-core#15725 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 18/100
apache/grails-core#16634 ·
メンテナーはふだん 1 日以内に返信
apache/grails-core の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
Uuriko/project-room#3728 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
Chia-Network/clvm_rs#863 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
Koenkk/zigbee2mqtt#33402 ·
メンテナーはふだん 1 日以内に返信
-
routedockHono mpp-charge and session handlers rethrow every error, bypassing the logger and returning Hono's plain-text 500対応中かも @EmmanuelAjogu が今日担当しました。 オープンP2 provider sdk Stellar Wave Wave 10
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
winsznx/routedock#559 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
Openpanel-dev/openpanel#543 ·
メンテナーはふだん 1 日以内に返信