Fix output_rows_skew sqllogictest flake#21958
Conversation
e3586f7 to
0473e9f
Compare
|
I wonder if we wouldn't be better off accepting that scan orders are going to be mostly non-deterministic and either add an ORDER BY to the queries themselves or classify this metric via #21160 |
@adriangb I'll admit I didn't look too much in detail at this, my Codex just randomly fixed it while working on another task. So if you have a cleaner fix please go ahead! |
|
Thank you for your contribution. Unfortunately, this pull request is stale because it has been open 60 days with no activity. Please remove the stale label or comment or this will be closed in 7 days. |
Which issue does this PR close?
Rationale for this change
The
output_rows_skewsqllogictest can fail nondeterministically after #21351 added dynamicFileStreamwork scheduling: reorderable sibling file scan streams may share one queue of unopened files. The failing case expects the four files to be attributed to output partitions as[4, 0, 1, 0], producingoutput_rows_skew=84.31%; CI has observed the same scan reported as100%instead.This was seen on PR #21927 and independently on
main, so it is a pre-existing test flake.What changes are included in this PR?
Adds
WITH ORDER (x)to the singleCREATE EXTERNAL TABLE skew_parquetstatement used by the four-file case inexplain_analyze.slt. That makes the scan order-preserving, which disables shared file work stealing for this assertion and keeps the expected per-partition metric deterministic.Are these changes tested?
Yes: flaky test now passes consistently.
Are there any user-facing changes?
No.