Commit ae9ebd7
committed
perf: skip RG reorder when sort column not in file schema
For GROUP BY + ORDER BY queries, the TopK sort column is an aggregate
output (e.g. COUNT(*)) that doesn't exist in the parquet file schema.
Previously we still created ReorderByStatistics which tried to look
up the column in statistics — wasted work.
Now check column existence in file schema before creating the
optimizer. This eliminates overhead for non-scan-level TopK queries
(ClickBench Q40-Q42 regression fix).1 parent a269ffd commit ae9ebd7
1 file changed
Lines changed: 27 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1197 | 1197 | | |
1198 | 1198 | | |
1199 | 1199 | | |
1200 | | - | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
1201 | 1203 | | |
1202 | 1204 | | |
1203 | | - | |
1204 | | - | |
1205 | | - | |
1206 | | - | |
1207 | | - | |
1208 | | - | |
1209 | | - | |
1210 | | - | |
1211 | | - | |
1212 | | - | |
1213 | | - | |
1214 | | - | |
1215 | | - | |
1216 | | - | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
1217 | 1229 | | |
1218 | 1230 | | |
1219 | 1231 | | |
| |||
0 commit comments