Repository navigation
Fixes for AST fuzzer oracle - #118044
Fixes for AST fuzzer oracle#118044azat wants to merge 4 commits into
Conversation
| "anyRespectNulls", "anyLastRespectNulls", | ||
| "first_value", "last_value", | ||
| "topK", "topKWeighted", | ||
| "approx_top_k", "approx_top_sum", |
There was a problem hiding this comment.
This is the real fix - missing exceptions
|
Workflow [PR], commit [3b3b87e] Summary: ❌
AI ReviewSummaryThis PR extends the AST-fuzzer oracle skip list for approximate / order-dependent aggregates by adding Findings
Final VerdictChanges requested: the direct aggregate-call syntax is fixed, but the LLVM Coverage ReportMeasured on commit 3b3b87e.
Changed lines: Changed C/C++ lines covered: 20/20 (100.00%) · Uncovered code |
a3e1e56 to
e660916
Compare
Co-Authored-By: Claude Fable 5.1 <[email protected]>
`isAlias` matches the exact spelling only, so a caller that accepts any spelling needs the resolver instead. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
…t, ...) before the denylist lookup Co-Authored-By: Claude Fable 5.1 <[email protected]> Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
e660916 to
3b3b87e
Compare
| while (true) | ||
| { | ||
| if (non_deterministic_functions_lower.contains(Poco::toLower(name))) | ||
| if (non_deterministic_functions_lower.contains(Poco::toLower(aggregate_factory.getAliasToOrName(name)))) |
There was a problem hiding this comment.
scanAggregatesSafe already special-cases ASTColumnsApplyTransformer because APPLY keeps func_name, parameters, and lambda outside children. hasNonDeterministicFunctionsImpl still only inspects ASTFunction and then recurses through children, so SELECT * APPLY any_value, APPLY(array_agg), or APPLY(x -> medianTDigest(x)) never hit this alias-aware denylist. Those queries can still reach checkDQP, checkIdentityWhere, and checkSubqueryWrap, where order-dependent / approximate aggregates are supposed to be skipped and can still raise false AST_FUZZER_ORACLE_MISMATCHs.
Please mirror the ASTColumnsApplyTransformer handling here: inspect func_name, recurse into parameters and lambda, and run the same scalar / aggregate determinism checks on that carrier too.
| INSERT INTO oracle_approx_agg SELECT number % 5, number FROM numbers(200); | ||
| " | ||
|
|
||
| for agg in "approx_top_k(v)" "approx_top_count(v)" "approx_top_sum(v, v)" "APPROX_TOP_K(v)" \ |
There was a problem hiding this comment.
This regression test only exercises ordinary aggregate calls. It never builds an ASTColumnsApplyTransformer, so it stays green while the bug above still exists for SELECT * APPLY any_value, APPLY(array_agg), or APPLY(x -> medianTDigest(x)).
Please add at least one APPLY-based case here so the non-ASTFunction carrier is covered too.
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Compile time of recompiled translation units1402 translation units recompiled, 7977 s compile time in total, 1402 of them have a recent master baseline. |
Changelog category (leave one):
Workflow [PR]
Sync PR [sync-upstream/pr/118044]