Repository navigation
Conversation
…zzing Live fuzzing of master surfaced four classes of false oracle mismatch — each a construct whose result is not stable across the oracle's metamorphic rewrites, so the reference and the rewrite legitimately differ: * approx_top_k / approx_top_sum (alias approx_top_count) use the same bounded Filtered-Space-Saving structure as topK: merging the partial states from the TLP UNION-ALL partition split drops different candidates than a single pass, so the approximate result differs. Added to non_deterministic_functions next to topK (stripAggregateCombinators maps the *State/*Merge forms back). * Buffer-engine tables split rows between an in-memory buffer and the backing table with a background flush thread, so two reads can return different rows. Generalised referencesDistributedTableAnywhere to a non_deterministic_table_ engines set covering both Distributed and Buffer. * ANY / RightAny joins pick an arbitrary matching right row, so which row survives is plan-dependent. Generalised hasAsofJoinAnywhere to also gate them. * JSONDynamicPaths / JSONSharedDataPaths(WithTypes) / isDynamicElementInShared- Data expose the physical dynamic-vs-shared storage split of a JSON column, decided per part/block under max_dynamic_paths, not part of the logical value; a rewrite that re-materialises the column reports a different split. Verified: a zero-mismatch soak (60-100 fuzzed runs each) over every construct, while an eligible control query still exercises the oracle (ProfileEvent checks delta 117 vs 0 for the gated seeds). Co-Authored-By: Claude Opus 4.8 <[email protected]>
…nywhere A GROUP BY totals/subtotal modifier synthesises a grand-total or subtotal row that is a global aggregate, not a per-input-row value, so it is not distributive over the WHERE/HAVING partition split the metamorphic oracles perform: each partition re-scans the source and recomputes (or drops) the totals row, so it legitimately differs from the reference. The per-oracle guards already reject a top-level `group_by_with_totals`, but a modifier hidden in a CTE or subquery (whose outer query the oracle rewrites) slipped past them. Fuzzing surfaced this as a TLP WHERE mismatch on `... FROM (SELECT ... GROUP BY g WITH TOTALS) WHERE NULL > cnt`: the totals row read (0,500) directly but (0,0) through the split. Add a recursive `hasGroupByTotalsModifierAnywhere` gate at the top of check(). Verified: zero mismatches over a 60-run soak and a 0 check-counter delta for the WITH TOTALS seed, while an eligible non-totals query still exercises the oracle. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Contributor
|
Workflow [PR], commit [75eef80] Summary: ❌
|
1 task
1 task done
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.
Live fuzzing of master surfaced several classes of false AST-fuzzer oracle mismatch —
each a construct whose result is not stable across the oracle's metamorphic rewrites,
so the reference and the rewrite legitimately differ. This gates them so the oracle
stops reporting them as mismatches (each verified with a 60–100-run zero-mismatch soak,
while an eligible control query still exercises the oracle):
approx_top_k/approx_top_sum(aliasapprox_top_count) use the same boundedFiltered-Space-Saving structure as
topK: merging the partial states from the TLPUNION-ALL partition split drops different candidates than a single pass, so the
approximate result differs. Added to
non_deterministic_functions.Buffer-engine tables split rows between an in-memory buffer and the backing tablewith a background flush, so two reads can return different rows. Generalised the
Distributedgate to anon_deterministic_table_enginesset covering both.ANY/RightAnyjoins pick an arbitrary matching right row, so which row survivesis plan-dependent. Generalised the ASOF-join gate to also cover them.
JSONDynamicPaths/JSONSharedDataPaths(WithTypes)/isDynamicElementInSharedDataexpose the physical dynamic-vs-shared storage split of a JSON column (decided per
part/block under
max_dynamic_paths), not the logical value; a rewrite thatre-materialises the column reports a different split. Gated.
WITH TOTALS/ROLLUP/CUBE/GROUPING SETSsynthesise a subtotal/grand-totalrow that is a global aggregate, not distributive over the WHERE/HAVING partition
split. The per-oracle guards only rejected a top-level modifier; a new recursive
hasGroupByTotalsModifierAnywheregate also catches one hidden in a CTE/subquery.Changelog category (leave one):
Related: #99980
Workflow [PR]
Sync PR [sync-upstream/pr/117347]