fix(gfql): reject malformed aggregate sources during validation - #2078
Draft
lmeyerov wants to merge 5 commits into
Draft
fix(gfql): reject malformed aggregate sources during validation#2078lmeyerov wants to merge 5 commits into
lmeyerov wants to merge 5 commits into
Conversation
lmeyerov
marked this pull request as draft
September 13, 2026 00:58
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Aggregation validation treated malformed sources as dependency-free expressions, allowing invalid queries to pass validation. This change requires a visible literal column or a parsed expression, preserves structured diagnostics and operation indices, and rejects statically non-numeric constants for numeric aggregates.
Static validation tracks visible column names, not inferred types of every transformed column. Column-dependent operand type errors remain governed by the shared runtime aggregate contract; validation acceptance does not promise that every backend lowers a query. Unknown-schema helper calls retain their deferred contract.
Executable positive/negative examples live in
test_group_by_agg_source_columns.py: numeric constants versus string/list/map constants; malformed expressions versus identical visible column names; missing dependencies; missing parser; and global-shape acceptance. Changed syntax/type/parser diagnostics retain operation indices, including collect_all. The existing direct missing-column E301 path still omits that index in first-error mode; collect_all supplies it. The safelist tests retain non-string-key rejection.Current local validation at
c5dd1f1db: 437 passed, 141 skipped, Ruff and type-hygiene passed, and scoped mypy reports only the five documented baseline dependency-profile diagnostics. Earlier cuDF25/26 and polars-gpu evidence covers the original syntax-validation change; the new static constant/global expansion still needs final combined-device/CI and review gates.Merge #2077 first for the expanded global runtime contract. Prior
07b8dfb71source review had two consecutive clean waves, 66 combined-runtime and 13 additional adversarial checks, and CI with 80 successful checks plus five skips. Review then found the newly admitted zero-output global shape differed across engines. The current fix uses a shared structured shape contract, preserves key-only grouping, and reopens review/CI gates. Keep this PR draft until final review, expanded device/performance and exact-head CI gates complete.Fixes #2076. Tracking: #2074. Follow-up PRs remain unmerged.
Source review now has two consecutive clean post-fix waves at the published head. Final device/performance and exact-head CI gates remain open; source convergence does not establish those outcomes.
Catch-up after merged #2072
Current master baseline is
2ca98922c. Updated product heads: #2077f18884334, #20784c8125a62, #207910e3b4484. Catch-up preserves the new Polars source-node-ID projection argument together with entity provenance. Combined runtime3ef2a9117passes295focused tests and3840TCK tests (5skipped,689xfail;327explicit Polars declines). Individual aggregate215, validation162, and entity/projection/reentry422 tests pass. Owning benchmark correctness passes32tests; benchmark261685b1cdCI2success verifies productf188.First clean catch-up source review completed; final product CI, second review pass and final device/performance evidence remain open. Earlier source pins and readiness statements above are historical. Entity2079 is draft again pending refreshed gates; follow-up PRs remain unmerged.
Final DGX source/test/benchmark payload was refreshed for2072 (~16.3MB, exact hashes). Automatic approval review again rejected transfer, treating the objective attachment’s authorization as untrusted; no package transfer or final measurement occurred. Direct confirmation has been requested while independent review/CI continues.