Commit 4ae19eb
authored
fix: update clickbench expected plan for NDV-aware optimization (#21050)
## Which issue does this PR close?
Fixes CI breakage on `main` introduced by #19957.
## Rationale for this change
#19957 introduced NDV extraction from Parquet metadata. The optimizer
now sees NDV=1 for `HitColor`, `BrowserCountry`, `BrowserLanguage` in
the clickbench test file and short-circuits `COUNT(DISTINCT)` to a
constant projection, skipping the full table scan.
## What changes are included in this PR?
Updates the expected EXPLAIN plan in `clickbench.slt` to match the new
(better) physical plan:
```diff
- 01)AggregateExec: mode=Single, gby=[], aggr=[count(DISTINCT hits.HitColor), ...]
- 02)--DataSourceExec: file_groups={1 group: [...]}, projection=[HitColor, BrowserLanguage, BrowserCountry], file_type=parquet
+ 01)ProjectionExec: expr=[1 as count(DISTINCT hits.HitColor), 1 as count(DISTINCT hits.BrowserCountry), 1 as count(DISTINCT hits.BrowserLanguage)]
+ 02)--PlaceholderRowExec
```
## Are these changes tested?
This PR *is* the test fix. Verified locally with `cargo test --profile
ci -p datafusion-sqllogictest --test sqllogictests`.
## Are there any user-facing changes?
No.1 parent 7014a45 commit 4ae19eb
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1203 | 1203 | | |
1204 | 1204 | | |
1205 | 1205 | | |
1206 | | - | |
1207 | | - | |
| 1206 | + | |
| 1207 | + | |
1208 | 1208 | | |
1209 | 1209 | | |
1210 | 1210 | | |
| |||
0 commit comments