Commit 2f6f105
Add preferred_ordering field to TableScan
This commit adds a new optional field `preferred_ordering` to the `TableScan`
logical plan node to support sort pushdown optimizations.
Changes include:
- Add `preferred_ordering: Option<Vec<SortExpr>>` field to `TableScan` struct
- Add `try_new_with_preferred_ordering` constructor method
- Update all `TableScan` constructors throughout the codebase to include the new field
- Update `Debug`, `PartialEq`, `Hash`, and `PartialOrd` implementations
- Update pattern matching in optimizer and other modules
The preferred_ordering field is currently not used by any optimization rules
but provides the foundation for future sort pushdown implementations.
This is part 2 of 2 PRs split from apache#17273 as requested in
apache#17273 (comment)
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>1 parent 9942ecd commit 2f6f105
File tree
5 files changed
+32
-1
lines changed- datafusion
- expr/src/logical_plan
- optimizer/src
- optimize_projections
- proto/src/logical_plan
5 files changed
+32
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2552 | 2552 | | |
2553 | 2553 | | |
2554 | 2554 | | |
| 2555 | + | |
| 2556 | + | |
2555 | 2557 | | |
2556 | 2558 | | |
2557 | 2559 | | |
| |||
2563 | 2565 | | |
2564 | 2566 | | |
2565 | 2567 | | |
| 2568 | + | |
2566 | 2569 | | |
2567 | 2570 | | |
2568 | 2571 | | |
| |||
2574 | 2577 | | |
2575 | 2578 | | |
2576 | 2579 | | |
| 2580 | + | |
2577 | 2581 | | |
2578 | 2582 | | |
2579 | 2583 | | |
| |||
2593 | 2597 | | |
2594 | 2598 | | |
2595 | 2599 | | |
| 2600 | + | |
| 2601 | + | |
2596 | 2602 | | |
2597 | 2603 | | |
2598 | 2604 | | |
2599 | 2605 | | |
2600 | 2606 | | |
2601 | 2607 | | |
| 2608 | + | |
2602 | 2609 | | |
2603 | 2610 | | |
2604 | 2611 | | |
2605 | 2612 | | |
2606 | 2613 | | |
2607 | 2614 | | |
| 2615 | + | |
2608 | 2616 | | |
2609 | 2617 | | |
2610 | 2618 | | |
| |||
2617 | 2625 | | |
2618 | 2626 | | |
2619 | 2627 | | |
| 2628 | + | |
2620 | 2629 | | |
2621 | 2630 | | |
2622 | 2631 | | |
| |||
2670 | 2679 | | |
2671 | 2680 | | |
2672 | 2681 | | |
| 2682 | + | |
2673 | 2683 | | |
2674 | 2684 | | |
| 2685 | + | |
| 2686 | + | |
| 2687 | + | |
| 2688 | + | |
| 2689 | + | |
| 2690 | + | |
| 2691 | + | |
| 2692 | + | |
| 2693 | + | |
| 2694 | + | |
| 2695 | + | |
| 2696 | + | |
| 2697 | + | |
2675 | 2698 | | |
2676 | 2699 | | |
2677 | 2700 | | |
| |||
4896 | 4919 | | |
4897 | 4920 | | |
4898 | 4921 | | |
| 4922 | + | |
4899 | 4923 | | |
4900 | 4924 | | |
4901 | 4925 | | |
| |||
4926 | 4950 | | |
4927 | 4951 | | |
4928 | 4952 | | |
| 4953 | + | |
4929 | 4954 | | |
4930 | 4955 | | |
4931 | 4956 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
599 | 599 | | |
600 | 600 | | |
601 | 601 | | |
| 602 | + | |
602 | 603 | | |
603 | 604 | | |
604 | 605 | | |
| |||
607 | 608 | | |
608 | 609 | | |
609 | 610 | | |
| 611 | + | |
610 | 612 | | |
611 | 613 | | |
612 | 614 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
| 245 | + | |
245 | 246 | | |
246 | 247 | | |
247 | 248 | | |
| |||
250 | 251 | | |
251 | 252 | | |
252 | 253 | | |
253 | | - | |
| 254 | + | |
254 | 255 | | |
255 | 256 | | |
256 | 257 | | |
257 | 258 | | |
258 | 259 | | |
| 260 | + | |
259 | 261 | | |
260 | 262 | | |
261 | 263 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3055 | 3055 | | |
3056 | 3056 | | |
3057 | 3057 | | |
| 3058 | + | |
3058 | 3059 | | |
3059 | 3060 | | |
3060 | 3061 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
271 | 271 | | |
272 | 272 | | |
273 | 273 | | |
| 274 | + | |
274 | 275 | | |
275 | 276 | | |
276 | 277 | | |
| |||
0 commit comments