Skip to content

Commit d769eb6

Browse files
adriangbclaude
andcommitted
fix CI: register SamplePushdown in docs and explain.slt; broken doc link
- optimizer_rule_reference.md: add SamplePushdown entry between PushdownSort and EnsureCooperative so the physical_rules_match_documented_order test matches the registered pipeline. - explain.slt: add `physical_plan after SamplePushdown SAME TEXT AS ABOVE` line under each PushdownSort line so the verbose-explain snapshots stay in sync with the new rule. - physical-plan/sample.rs: drop the intra-doc link to `Sample` from the SampleExec docstring; that node lives in datafusion-expr and the link can't resolve from physical-plan. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 03c13b6 commit d769eb6

3 files changed

Lines changed: 9 additions & 4 deletions

File tree

datafusion/core/src/optimizer_rule_reference.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ in multiple phases.
8888
| 17 | `TopKRepartition` | - | Pushes TopK below hash repartition when the partition key is a prefix of the sort key. |
8989
| 18 | `ProjectionPushdown` | late pass | Runs projection pushdown again after limit and TopK rewrites expose new pruning opportunities. |
9090
| 19 | `PushdownSort` | - | Pushes sort requirements into data sources that can already return sorted output. |
91-
| 20 | `EnsureCooperative` | - | Wraps non-cooperative plan parts so long-running tasks yield fairly. |
92-
| 21 | `FilterPushdown(Post)` | post-optimization phase | Pushes dynamic filters at the end of optimization, after plan references stop moving. |
93-
| 22 | `SanityCheckPlan` | - | Validates that the final physical plan meets ordering, distribution, and infinite-input safety requirements. |
91+
| 20 | `SamplePushdown` | - | Pushes `TABLESAMPLE` into the source; errors at planning time if the sample can't be absorbed. |
92+
| 21 | `EnsureCooperative` | - | Wraps non-cooperative plan parts so long-running tasks yield fairly. |
93+
| 22 | `FilterPushdown(Post)` | post-optimization phase | Pushes dynamic filters at the end of optimization, after plan references stop moving. |
94+
| 23 | `SanityCheckPlan` | - | Validates that the final physical plan meets ordering, distribution, and infinite-input safety requirements. |

datafusion/physical-plan/src/sample.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ pub struct SampleExec {
6262

6363
impl SampleExec {
6464
/// Construct a [`SampleExec`] over `input`. Caller is expected to
65-
/// have validated `fraction` upstream (the logical [`Sample`] node
65+
/// have validated `fraction` upstream (the logical `Sample` node
6666
/// does this in `try_new`).
6767
pub fn new(
6868
input: Arc<dyn ExecutionPlan>,

datafusion/sqllogictest/test_files/explain.slt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@ physical_plan after LimitPushdown SAME TEXT AS ABOVE
249249
physical_plan after TopKRepartition SAME TEXT AS ABOVE
250250
physical_plan after ProjectionPushdown SAME TEXT AS ABOVE
251251
physical_plan after PushdownSort SAME TEXT AS ABOVE
252+
physical_plan after SamplePushdown SAME TEXT AS ABOVE
252253
physical_plan after EnsureCooperative SAME TEXT AS ABOVE
253254
physical_plan after FilterPushdown(Post) SAME TEXT AS ABOVE
254255
physical_plan after SanityCheckPlan SAME TEXT AS ABOVE
@@ -332,6 +333,7 @@ physical_plan after LimitPushdown DataSourceExec: file_groups={1 group: [[WORKSP
332333
physical_plan after TopKRepartition SAME TEXT AS ABOVE
333334
physical_plan after ProjectionPushdown SAME TEXT AS ABOVE
334335
physical_plan after PushdownSort SAME TEXT AS ABOVE
336+
physical_plan after SamplePushdown SAME TEXT AS ABOVE
335337
physical_plan after EnsureCooperative SAME TEXT AS ABOVE
336338
physical_plan after FilterPushdown(Post) SAME TEXT AS ABOVE
337339
physical_plan after SanityCheckPlan SAME TEXT AS ABOVE
@@ -379,6 +381,7 @@ physical_plan after LimitPushdown DataSourceExec: file_groups={1 group: [[WORKSP
379381
physical_plan after TopKRepartition SAME TEXT AS ABOVE
380382
physical_plan after ProjectionPushdown SAME TEXT AS ABOVE
381383
physical_plan after PushdownSort SAME TEXT AS ABOVE
384+
physical_plan after SamplePushdown SAME TEXT AS ABOVE
382385
physical_plan after EnsureCooperative SAME TEXT AS ABOVE
383386
physical_plan after FilterPushdown(Post) SAME TEXT AS ABOVE
384387
physical_plan after SanityCheckPlan SAME TEXT AS ABOVE
@@ -624,6 +627,7 @@ physical_plan after LimitPushdown SAME TEXT AS ABOVE
624627
physical_plan after TopKRepartition SAME TEXT AS ABOVE
625628
physical_plan after ProjectionPushdown SAME TEXT AS ABOVE
626629
physical_plan after PushdownSort SAME TEXT AS ABOVE
630+
physical_plan after SamplePushdown SAME TEXT AS ABOVE
627631
physical_plan after EnsureCooperative SAME TEXT AS ABOVE
628632
physical_plan after FilterPushdown(Post) SAME TEXT AS ABOVE
629633
physical_plan after SanityCheckPlan SAME TEXT AS ABOVE

0 commit comments

Comments
 (0)