Improve postprocessor extensibility
维护者通常 2 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- csharp
调研方向
Read RelationalQueryTranslationPostprocessor.cs and compare the SQL Server and SQLite postprocessors named in the issue to trace the current phase ordering and provider overrides. Then inspect related tests for query postprocessing, including split queries and shaper expressions. Done means supported phase hooks preserve common finalization and verification ordering, existing provider behavior and Process overrides are covered, and provider API docs describe each phase's invariants.
由索引模型根据 Issue 内容生成。
描述
Providers can already replace IQueryTranslationPostprocessorFactory, derive from QueryTranslationPostprocessor or RelationalQueryTranslationPostprocessor, and override Process. The relational implementation also exposes ProcessTypeMappings and Prune. The remaining problem is fine-grained customization of the common postprocessing sequence without copying it.
RelationalQueryTranslationPostprocessor.Process directly orchestrates projection application, pruning, alias postprocessing, simplification, and value-converter compensation. A provider can add passes before or after base.Process, but cannot independently override or insert work between most of those phases.
This also creates an ordering problem for finalization and validation. The relational implementation contains a TODO noting that alias postprocessing and the subsequent verification should run after all visitors, including provider-specific ones. SQL Server and SQLite currently run additional transformations after base.Process, so common finalization is not necessarily the last stage.
Current implementation:
- RelationalQueryTranslationPostprocessor
- SqlServerQueryTranslationPostprocessor
- SqliteQueryTranslationPostprocessor
Describe the solution you'd like
Provide supported, narrowly scoped provider extension points within the postprocessing pipeline, keeping required common behavior and ordering in the base implementation.
In particular:
- Allow providers to specialize appropriate common phases without duplicating
Process. - Provide an explicit place for provider-specific transformations relative to projection application, pruning, simplification, and finalization.
- Define which common finalization/verification steps must run after provider transformations and ensure the supported orchestration honors that ordering.
- Document the tree shape and invariants at each supported boundary, including type mappings, projection bindings, aliases, and select-expression mutability.
Prefer protected virtual phase methods and reuse of the existing factory/dependency model. The precise API and division into phases need design; this issue does not prescribe a general-purpose pass scheduler or plugin registry.
Acceptance criteria
- A derived provider postprocessor can customize a supported intermediate phase without reproducing the base processing sequence.
- Existing
ProcessTypeMappingsandPrunespecialization remains supported. - Providers have a supported path to perform their transformations before the common finalization/verification steps that must observe the final tree.
- Tests establish ordering of common and provider phases and exercise provider-created or modified SQL nodes.
- Coverage includes shaper-side query expressions where relevant, including split queries; transformations preserve projection-binding and alias consistency.
- Existing SQL Server and SQLite postprocessing behavior is preserved, with intentional ordering changes explicitly tested.
- Document compatibility for existing
Processoverrides rather than silently bypassing them. - Provider-facing API documentation explains supported phases and their invariants. Newly exposed provider APIs follow the repository's provider API conventions.
Scope and related work
- This is a database-provider extension surface, not application interception. #19748 does not replace this work.
- #32979 concerns correct query/shaper visitation and #32980 concerns projection-binding references. This work must respect those constraints but does not require resolving those architectural issues.
- Visitor consolidation and traversal-count optimization are separate work. Phase extensibility should not unnecessarily prevent future consolidation.
- 主要语言
- C#
- 星标
- 14.8k
- 派生
- 3.5k
- 平均合并
- 3 天 7 小时
- 30 天内合并 PR
- 182
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
dotnet/efcore 的其他 Issue
-
customer-reported
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 2 天内回复
-
GroupBy element `OrderBy(...).First()`/`MaxBy` over an owned type mapped to its own table fails to translate可能已有人在做 @cincuranet 今天认领。 未关闭area-groupby area-query
难度 4/5 3-5 天 新手友好度 25/100
dotnet/efcore#39833 · 已指派 1 人 ·
维护者通常 2 天内回复
-
SQLite: Polygon.Length translates to GLength, which returns 0可能已有人在做 @cincuranet 今天认领。 未关闭area-query area-sqlite
难度 3/5 1-2 天 新手友好度 45/100
dotnet/efcore#39826 · 已指派 1 人 ·
维护者通常 2 天内回复
-
Migration lock with LockReleaseBehavior.Transaction doesn't prevent concurrent migrations since per-migration transactions可能已有人在做 @AndriySvyryd 于 1 天前认领。 未关闭area-migrations
dotnet/efcore#39824 · 已指派 1 人 ·
维护者通常 2 天内回复
-
Querying a TPC base type with a JSON complex property throws可能已有人在做 @cincuranet 于 1 天前认领。 未关闭area-query
难度 4/5 3-5 天 新手友好度 22/100
dotnet/efcore#39814 · 已指派 1 人 ·
维护者通常 2 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 77/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
SubtitleEdit/subtitleedit#17247 ·
维护者通常 1 天内回复
-
Restore test cleanup fails on Windows when restored files are read-only可能已有人在做 @JamBalaya56562 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 68/100
duplicati/duplicati#8046 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 1 天内回复
-
Bundles Documentation
难度 2/5 1-3 小时 新手友好度 78/100
pyrevitlabs/pyRevit#4285 ·
维护者通常 1 天内回复