Improve preprocessor extensibility
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 35/100
Línea de trabajo
Start with QueryTranslationPreprocessor.Process and compare the relational and Cosmos preprocessors named in the issue to trace the existing phase order and query-root specialization. Then read the provider API conventions and relevant preprocessing tests; done means phase ordering, override tree shapes, existing overrides, and default behavior are covered by tests, with provider-facing documentation for each supported boundary.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Database providers can already supply an IQueryTranslationPreprocessorFactory, derive from QueryTranslationPreprocessor or RelationalQueryTranslationPreprocessor, and override Process. There are also narrower extension points such as NormalizeQueryableMethod and ProcessQueryRoots. This issue is about improving that existing provider extension model, not introducing query interception.
Most preprocessing steps are nevertheless constructed and invoked directly inside QueryTranslationPreprocessor.Process. A provider can easily add work before or after the entire base implementation, but inserting or replacing a transformation between the remaining steps can require copying the base implementation and depending on internal visitors.
For example, a provider that needs to transform the navigation-expanded tree before the common query optimizations cannot currently override that individual phase. Copying Process makes the provider responsible for preserving the ordering of normalization, null-check removal, navigation expansion, and optimization, and for incorporating future changes to that sequence.
Current implementation:
- QueryTranslationPreprocessor
- RelationalQueryTranslationPreprocessor
- CosmosQueryTranslationPreprocessor, which already specializes query-root processing
Describe the solution you'd like
Expose narrowly scoped, overridable preprocessing phases where database providers need to customize the pipeline, while keeping the common sequencing and required transformations in the base implementation.
The precise API needs design. Prefer protected virtual phase methods and reuse of existing factories/dependencies over requiring providers to copy Process or introducing a general-purpose visitor-registration framework. Document the expression shape and invariants at each supported extension point, especially around normalization and navigation expansion.
Acceptance criteria
- A derived provider preprocessor can insert a transformation at a supported intermediate boundary, such as after navigation expansion and before common optimization, without reproducing the base processing sequence.
- A provider can specialize a supported phase while reusing the common behavior of that phase where appropriate.
- Existing overrides of
Process,NormalizeQueryableMethod, andProcessQueryRootsretain their behavior. - Core and relational preprocessors compose correctly; existing Cosmos and relational query-root specialization remains intact.
- Tests verify phase ordering, the tree shape visible to overrides, and unchanged behavior when no provider customization is supplied.
- Provider-facing API documentation describes the supported boundaries and required invariants. Newly exposed provider APIs follow the repository's provider API conventions.
Scope and related work
- This is a database-provider extension surface, not an application interceptor or an additive third-party plugin API.
- This does not request a hook before parameter extraction or funcletization.
- #28505 implemented LINQ expression interception; that is not a substitute for provider customization of intermediate preprocessing phases.
- #19748 concerns interception of SQL generation and is separate from this request.
- Combining visitors to reduce traversals is a separate performance task.
- Lenguaje dominante
- C#
- Estrellas
- 14.8k
- Forks
- 3.5k
- Merge medio
- 3 d 7 h
- PR fusionados (30 d)
- 182
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- 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 dotnet/efcore
-
customer-reported
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 2 días
-
GroupBy element `OrderBy(...).First()`/`MaxBy` over an owned type mapped to its own table fails to translatePosiblemente ocupada @cincuranet la tomó hoy. Abiertoarea-groupby area-query
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
dotnet/efcore#39833 · 1 asignado ·
Los mantenedores suelen responder en 2 días
-
SQLite: Polygon.Length translates to GLength, which returns 0Posiblemente ocupada @cincuranet la tomó hoy. Abiertoarea-query area-sqlite
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
dotnet/efcore#39826 · 1 asignado ·
Los mantenedores suelen responder en 2 días
-
Migration lock with LockReleaseBehavior.Transaction doesn't prevent concurrent migrations since per-migration transactionsPosiblemente ocupada @AndriySvyryd la tomó hace 1 día. Abiertoarea-migrations
dotnet/efcore#39824 · 1 asignado ·
Los mantenedores suelen responder en 2 días
-
Querying a TPC base type with a JSON complex property throwsPosiblemente ocupada @cincuranet la tomó hace 1 día. Abiertoarea-query
Dificultad 4/5 3-5 días Aptitud para principiantes 22/100
dotnet/efcore#39814 · 1 asignado ·
Los mantenedores suelen responder en 2 días
Todos los issues de dotnet/efcore
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
SubtitleEdit/subtitleedit#17247 ·
Los mantenedores suelen responder en 1 día
-
Restore test cleanup fails on Windows when restored files are read-onlyPosiblemente ocupada @JamBalaya56562 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
duplicati/duplicati#8046 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día
-
Bundles Documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
pyrevitlabs/pyRevit#4285 ·
Los mantenedores suelen responder en 1 día