gabotechs commented on code in PR #22969:
URL: https://github.com/apache/datafusion/pull/22969#discussion_r3418531513


##########
datafusion/sqllogictest/test_files/window.slt:
##########
@@ -6084,7 +6084,7 @@ physical_plan
 03)----BoundedWindowAggExec: wdw=[sum(test.c2) FILTER (WHERE test.c2 >= 
Int64(2)) ORDER BY [test.c1 ASC NULLS LAST, test.c2 ASC NULLS LAST] ROWS 
BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW: Field { "sum(test.c2) FILTER 
(WHERE test.c2 >= Int64(2)) ORDER BY [test.c1 ASC NULLS LAST, test.c2 ASC NULLS 
LAST] ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW": nullable Int64 }, 
frame: ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW, sum(test.c2) FILTER 
(WHERE test.c2 >= Int64(2) AND test.c2 < Int64(4) AND test.c1 > Int64(0)) ORDER 
BY [test.c1 ASC NULLS LAST, test.c2 ASC NULLS LAST] ROWS BETWEEN UNBOUNDED 
PRECEDING AND CURRENT ROW: Field { "sum(test.c2) FILTER (WHERE test.c2 >= 
Int64(2) AND test.c2 < Int64(4) AND test.c1 > Int64(0)) ORDER BY [test.c1 ASC 
NULLS LAST, test.c2 ASC NULLS LAST] ROWS BETWEEN UNBOUNDED PRECEDING AND 
CURRENT ROW": nullable Int64 }, frame: ROWS BETWEEN UNBOUNDED PRECEDING AND 
CURRENT ROW, count(test.c2) FILTER (WHERE test.c2 >= Int64(2)) ORDER BY 
[test.c1 ASC NULLS
  LAST, test.c2 ASC NULLS LAST] ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT 
ROW: Field { "count(test.c2) FILTER (WHERE test.c2 >= Int64(2)) ORDER BY 
[test.c1 ASC NULLS LAST, test.c2 ASC NULLS LAST] ROWS BETWEEN UNBOUNDED 
PRECEDING AND CURRENT ROW": Int64 }, frame: ROWS BETWEEN UNBOUNDED PRECEDING 
AND CURRENT ROW, array_agg(test.c2) FILTER (WHERE test.c2 >= Int64(2)) ORDER BY 
[test.c1 ASC NULLS LAST, test.c2 ASC NULLS LAST] ROWS BETWEEN UNBOUNDED 
PRECEDING AND CURRENT ROW: Field { "array_agg(test.c2) FILTER (WHERE test.c2 >= 
Int64(2)) ORDER BY [test.c1 ASC NULLS LAST, test.c2 ASC NULLS LAST] ROWS 
BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW": nullable List(Int64) }, frame: 
ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW, array_agg(test.c2) FILTER 
(WHERE test.c2 >= Int64(2) AND test.c2 < Int64(4) AND test.c1 > Int64(0)) ORDER 
BY [test.c1 ASC NULLS LAST, test.c2 ASC NULLS LAST] ROWS BETWEEN UNBOUNDED 
PRECEDING AND CURRENT ROW: Field { "array_agg(test.c2) FILTER (WHERE test.c2 >= 
Int64(
 2) AND test.c2 < Int64(4) AND test.c1 > Int64(0)) ORDER BY [test.c1 ASC NULLS 
LAST, test.c2 ASC NULLS LAST] ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT 
ROW": nullable List(Int64) }, frame: ROWS BETWEEN UNBOUNDED PRECEDING AND 
CURRENT ROW], mode=[Sorted]
 04)------SortPreservingMergeExec: [c1@2 ASC NULLS LAST, c2@3 ASC NULLS LAST], 
fetch=5
 05)--------SortExec: TopK(fetch=5), expr=[c1@2 ASC NULLS LAST, c2@3 ASC NULLS 
LAST], preserve_partitioning=[true]
-06)----------DataSourceExec: file_groups={4 groups: 
[[WORKSPACE_ROOT/datafusion/core/tests/data/partitioned_csv/partition-0.csv], 
[WORKSPACE_ROOT/datafusion/core/tests/data/partitioned_csv/partition-1.csv], 
[WORKSPACE_ROOT/datafusion/core/tests/data/partitioned_csv/partition-2.csv], 
[WORKSPACE_ROOT/datafusion/core/tests/data/partitioned_csv/partition-3.csv]]}, 
projection=[c2@1 >= 2 as __common_expr_1, c2@1 >= 2 AND c2@1 < 4 AND c1@0 > 0 
as __common_expr_2, c1, c2], file_type=csv, has_header=false
+06)----------DataSourceExec: file_groups={2 groups: 
[[WORKSPACE_ROOT/datafusion/core/tests/data/partitioned_csv/partition-0.csv, 
WORKSPACE_ROOT/datafusion/core/tests/data/partitioned_csv/partition-1.csv], 
[WORKSPACE_ROOT/datafusion/core/tests/data/partitioned_csv/partition-2.csv, 
WORKSPACE_ROOT/datafusion/core/tests/data/partitioned_csv/partition-3.csv]]}, 
projection=[c2@1 >= 2 as __common_expr_1, c2@1 >= 2 AND c2@1 < 4 AND c1@0 > 0 
as __common_expr_2, c1, c2], file_type=csv, has_header=false

Review Comment:
   This was actually wrong before. The last time `target_partitions` was set in 
this file is this one:
   
   
https://github.com/apache/datafusion/blob/6b8338454f8ff21f18fed42f12fc630ae4b1c94a/datafusion/sqllogictest/test_files/window.slt#L3680-L3680
   
   Which should yield 2 partitions, not 4. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to