Skip to content

Commit 4c81fe8

Browse files
committed
fix: update clickbench expected plan for NDV-aware optimization
apache#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.
1 parent 7014a45 commit 4c81fe8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

datafusion/sqllogictest/test_files/clickbench.slt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1203,8 +1203,8 @@ logical_plan
12031203
02)--SubqueryAlias: hits
12041204
03)----TableScan: hits_raw projection=[HitColor, BrowserLanguage, BrowserCountry]
12051205
physical_plan
1206-
01)AggregateExec: mode=Single, gby=[], aggr=[count(DISTINCT hits.HitColor), count(DISTINCT hits.BrowserCountry), count(DISTINCT hits.BrowserLanguage)]
1207-
02)--DataSourceExec: file_groups={1 group: [[WORKSPACE_ROOT/datafusion/core/tests/data/clickbench_hits_10.parquet]]}, projection=[HitColor, BrowserLanguage, BrowserCountry], file_type=parquet
1206+
01)ProjectionExec: expr=[1 as count(DISTINCT hits.HitColor), 1 as count(DISTINCT hits.BrowserCountry), 1 as count(DISTINCT hits.BrowserLanguage)]
1207+
02)--PlaceholderRowExec
12081208

12091209
query III
12101210
SELECT COUNT(DISTINCT "HitColor"), COUNT(DISTINCT "BrowserCountry"), COUNT(DISTINCT "BrowserLanguage") FROM hits;

0 commit comments

Comments
 (0)