Hibernate 7: split HqlQueryContext into HqlText, QueryParameters and QuerySettings
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Refactorización
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- groovy
- Área
- backend
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Groovy
- Estrellas
- 2.9k
- Forks
- 976
- Merge medio
- 21 h 14 min
- PR fusionados (30 d)
- 174
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de apache/grails-core
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
apache/grails-core#16635 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
apache/grails-core#16289 · 5 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
apache/grails-core#15764 ·
Los mantenedores suelen responder en 1 día
-
Update documentation for Java 25Posiblemente ocupada @ruthst00 la tomó hace 8 días. Abiertorelates-to: documentation weekly-action-item
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
apache/grails-core#15725 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 18/100
apache/grails-core#16634 ·
Los mantenedores suelen responder en 1 día
Todos los issues de apache/grails-core
Issues similares
-
area/plugin good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
kestra-io/plugin-kestra#200 ·
Los mantenedores suelen responder en 1 día
-
`LazyFrameRemote` and `ExecuteRemote` sinks do not accept `Path`, like `LazyFrame` sinks do.Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
api-platform/core#8690 ·
Los mantenedores suelen responder en 1 día
-
enhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
DorsetDigital/silverstripe-schema-manager#26 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
wemake-services/wemake-django-template#3178 · 1 reacción ·
Los mantenedores suelen responder en 1 día