Commit 02eab80
Do not add redundant subquery ordering into plan (#12003)
* do not add redundant subquery ordering into plan
* format code
* add license
* fix test cases with sort plan removing
* fix comment
* keep sorting on ordering mode test cases
* protect test intentions with order + limit
* protect test intentions with order + limit
* Tmp
* Minor changes
* Minor changes
* Minor changes
* Implement top down recursion with delete check
* Minor changes
* Minor changes
* initialize fetch() api for execution plan
remove unnecessary limit plans when used with sort + fetch
add test case for Sort and Limit with offset
push down limit even if a child with no fetch appears when the child supports push down
* Address reviews
* Update comments
* Minor changes
* Make test deterministic
* add supports limit push down to union exec
* support limit push down with multi children cases
* fix typos
Co-authored-by: Mehmet Ozan Kabak <ozankabak@gmail.com>
* Add fetch info to the statistics
* optimize tpch test plans
* Enforce distribution use inexact count estimate also.
* Minor changes
* Minor changes
* merge with apache main
add pushes_global_limit_into_multiple_fetch_plans test case
change limit_pushdown.rs as manual top down operator and simplify algorithm by supporting most parent node remove and other pushdown cases
* format code
* fix doc paths
* fix doc paths
* remove redundant code block
* if partition count is 1 put GlobalLimitExec
* fix test cases
* Apply suggestions from code review
* fix syntax errors
* Simplify branches
* remove redundant limit plans from merge
---------
Co-authored-by: Mustafa Akur <mustafa.akur@synnada.ai>
Co-authored-by: Mehmet Ozan Kabak <ozankabak@gmail.com>1 parent 574dfeb commit 02eab80
File tree
39 files changed
+1415
-1040
lines changed- datafusion
- common/src
- core
- src
- dataframe
- datasource/physical_plan
- parquet
- physical_optimizer
- tests
- memory_limit
- physical_optimizer
- sql
- optimizer/src
- physical-optimizer/src
- physical-plan/src
- sorts
- sqllogictest/test_files
- tpch
- sql/src/relation
39 files changed
+1415
-1040
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
| |||
33 | 32 | | |
34 | 33 | | |
35 | 34 | | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3046 | 3046 | | |
3047 | 3047 | | |
3048 | 3048 | | |
3049 | | - | |
3050 | | - | |
3051 | | - | |
3052 | | - | |
3053 | | - | |
3054 | | - | |
3055 | | - | |
| 3049 | + | |
| 3050 | + | |
| 3051 | + | |
| 3052 | + | |
| 3053 | + | |
| 3054 | + | |
3056 | 3055 | | |
3057 | 3056 | | |
3058 | 3057 | | |
| |||
3240 | 3239 | | |
3241 | 3240 | | |
3242 | 3241 | | |
3243 | | - | |
3244 | | - | |
3245 | | - | |
3246 | | - | |
3247 | | - | |
3248 | | - | |
3249 | | - | |
| 3242 | + | |
| 3243 | + | |
| 3244 | + | |
| 3245 | + | |
| 3246 | + | |
| 3247 | + | |
3250 | 3248 | | |
3251 | 3249 | | |
3252 | 3250 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
200 | 204 | | |
201 | 205 | | |
202 | 206 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
168 | 172 | | |
169 | 173 | | |
170 | 174 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
427 | 427 | | |
428 | 428 | | |
429 | 429 | | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
430 | 434 | | |
431 | 435 | | |
432 | 436 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
210 | 214 | | |
211 | 215 | | |
212 | 216 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
745 | 745 | | |
746 | 746 | | |
747 | 747 | | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
748 | 752 | | |
749 | 753 | | |
750 | 754 | | |
| |||
Lines changed: 12 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| |||
405 | 405 | | |
406 | 406 | | |
407 | 407 | | |
408 | | - | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
409 | 418 | | |
410 | 419 | | |
411 | 420 | | |
| |||
1124 | 1133 | | |
1125 | 1134 | | |
1126 | 1135 | | |
1127 | | - | |
| 1136 | + | |
1128 | 1137 | | |
1129 | 1138 | | |
1130 | 1139 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2177 | 2177 | | |
2178 | 2178 | | |
2179 | 2179 | | |
2180 | | - | |
2181 | | - | |
2182 | | - | |
2183 | 2180 | | |
2184 | 2181 | | |
2185 | 2182 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
253 | 250 | | |
254 | 251 | | |
255 | 252 | | |
| |||
0 commit comments