Repository navigation
refactor(query): let unit descriptors own executor metadata (#2006) - #2234
Conversation
Move SQL executor method names and aggregate grouping fields onto QueryUnitDescriptor so the parser and unit-result executor read from the same registry. This removes parallel maps added during the aggregate pipeline work and keeps #2006 query-unit wiring concentrated in one descriptor surface. Ref #2006
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughTwo hardcoded module-level dicts ( ChangesDescriptor-driven SQL method and group-by field centralization
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Moves query-unit executor method names and aggregate grouping fields into
QueryUnitDescriptor, so parser validation and result execution read from the same unit registry.Problem
The aggregate pipeline work left two small but important parallel truths:
expression.pyowned aggregate group-field support, whileunit_results.pyowned SQL executor method names. That made each new terminal unit require another scattered wiring edit, which is exactly the #2006 descriptor-drift problem.Solution
QueryUnitDescriptornow carriessql_query_methodandaggregate_group_fields. The pipeline parser validatesgroup byagainst the descriptor, and SQL unit-result execution dispatches throughdescriptor.sql_query_method. The descriptor metadata test now checks the liveArchiveStoremethod instead of a separate_SQL_QUERY_METHODSmap.Verification
nix develop --command devtools test tests/unit/cli/test_query_unit_renderer_metadata.py tests/unit/cli/test_query_expression.py -k "pipeline_group_by_count or aggregate_on_runtime"-> 3 passednix develop --command devtools verify --quick-> exit_code 0nix develop --command devtools verify --seed-testmon --skip-slow-> 11688 passed, diagnosispytest_passed, peak pytest tree RSS 3212.5 MiBnix develop --command devtools verify-> 7 passed, diagnosispytest_passed, peak pytest tree RSS 581.5 MiBRef #2006
Summary by CodeRabbit