Skip to content

Commit e93950b

Browse files
cool9850311claude
andcommitted
docs: state what the tests hold down, not when it was found
Three comments described this change's own history rather than the code: "the nested shape from review", "both left the inner SortExec a full sort before this PR", and "reachable only once applying a fetch stops ending the walk, which is the first commit in this PR". After a squash merge none of those have a referent, and a reader of the test has no way to resolve them. Each now states the same thing as a property of the rule: what the shape is, what the plan looks like if the stale phase survives, and what has to be true of the traversal for the shape to be reachable at all. Comments only -- no test, plan or snapshot changes. Co-Authored-By: Claude Opus 5 <[email protected]>
1 parent 8559e7c commit e93950b

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

‎datafusion/physical-optimizer/src/limit_pushdown_past_window.rs‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -445,9 +445,9 @@ mod tests {
445445
"#);
446446
}
447447

448-
/// The nested shape from review: the limit is spent on the outer sort, so the
449-
/// inner window's `Absolute(200)` has nothing to raise. It must not become a
450-
/// fetch on the inner sort, which no `LIMIT` sits above.
448+
/// The nested variant: the limit is spent on the outer sort, so the inner
449+
/// window's `Absolute(200)` has nothing to raise. It must not become a fetch
450+
/// on the inner sort, which no `LIMIT` sits above.
451451
#[test]
452452
fn absolute_limit_effect_does_not_invent_a_limit_below_an_applied_sort() {
453453
let plan = build_nested_absolute_plan().unwrap();

‎datafusion/sqllogictest/test_files/window_limits.slt‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1019,8 +1019,8 @@ physical_plan
10191019
# below it is independent and still belongs in the sort under the inner window.
10201020
#
10211021
# The next two queries differ only in the outer ORDER BY, which decides what the
1022-
# walk meets after the window it could not grow past. Both left the inner SortExec
1023-
# a full sort before this PR, and the second is the stricter of the two:
1022+
# walk meets after the window it could not grow past. If the stale phase survives,
1023+
# both leave the inner SortExec a full sort; the second is the stricter of the two:
10241024
# * ORDER BY salary leaves an outer SortExec in place, so either clear can be the
10251025
# one that forgets the stale phase.
10261026
# * ORDER BY empno matches the inner ordering, so EnforceSorting elides the outer
@@ -1186,9 +1186,9 @@ physical_plan
11861186
# short and the last row of the result is computed over a truncated frame.
11871187
#
11881188
# The outer `LIMIT 3` here is spent on the SortExec that orders by `salary`, and
1189-
# the walk then starts a new chain at the inner `LIMIT 3`. That makes this shape
1190-
# reachable only once applying a fetch stops ending the walk, which is the first
1191-
# commit in this PR. Three properties are load-bearing: `s2` must read `s1`, or
1189+
# the walk then starts a new chain at the inner `LIMIT 3`, so the shape is only
1190+
# reachable when applying a fetch does not end the walk.
1191+
# Three properties are load-bearing: `s2` must read `s1`, or
11921192
# the max is enough and the case does not fail; the two frames must end at
11931193
# different offsets (1 and 2), or the max and the sum agree; and the outer
11941194
# window's frame must end at the current row so it adds no lookahead of its own.

0 commit comments

Comments
 (0)