Improve postprocessor extensibility
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- csharp
- Lĩnh vực
- backend-api-design, databases
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- C#
- Star
- 14.8k
- Fork
- 3.5k
- Merge trung bình
- 3 ngày 7 giờ
- Pull request đã merge (30 ngày)
- 182
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của dotnet/efcore
-
customer-reported
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 2 ngày
-
GroupBy element `OrderBy(...).First()`/`MaxBy` over an owned type mapped to its own table fails to translateCó thể đã có người làm @cincuranet đã nhận hôm nay. Đang mởarea-groupby area-query
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
dotnet/efcore#39833 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 2 ngày
-
SQLite: Polygon.Length translates to GLength, which returns 0Có thể đã có người làm @cincuranet đã nhận hôm nay. Đang mởarea-query area-sqlite
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
dotnet/efcore#39826 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Migration lock with LockReleaseBehavior.Transaction doesn't prevent concurrent migrations since per-migration transactionsCó thể đã có người làm @AndriySvyryd đã nhận 1 ngày trước. Đang mởarea-migrations
dotnet/efcore#39824 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Querying a TPC base type with a JSON complex property throwsCó thể đã có người làm @cincuranet đã nhận 1 ngày trước. Đang mởarea-query
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 22/100
dotnet/efcore#39814 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của dotnet/efcore
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
SubtitleEdit/subtitleedit#17247 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Restore test cleanup fails on Windows when restored files are read-onlyCó thể đã có người làm @JamBalaya56562 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
duplicati/duplicati#8046 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Bundles Documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
pyrevitlabs/pyRevit#4285 ·
Maintainer thường phản hồi trong vòng 1 ngày