Kristofferjoha commented on code in PR #27994:
URL: https://github.com/apache/datafusion/pull/27994#discussion_r4803279360


##########
datafusion/sqllogictest/test_files/repartition_preserve_order_memory.slt:
##########
@@ -0,0 +1,86 @@
+# SPDX-License-Identifier: Apache-2.0
+# SPDX-FileCopyrightText: See the NOTICE file distributed with this work for 
additional information regarding copyright ownership
+# SPDX-FileContributor: Licensed to the Apache Software Foundation (ASF) under 
one or more contributor license agreements
+
+# https://github.com/apache/datafusion/issues/27323
+#
+# A streaming window over a file sorted by k reads an order-preserving hash
+# repartition, which merges what each input sends to its output partition.
+# Each output partition must hold only its own rows. Otherwise every merge is
+# charged for the rows and strings of all output partitions, and runs out of
+# memory under the limit below.
+
+statement ok
+SET datafusion.execution.target_partitions = 8
+
+# Split the small file into 8 scan partitions, so that 8 inputs are merged
+statement ok
+SET datafusion.optimizer.repartition_file_min_size = 1024

Review Comment:
   Good catch, the file had one row group, so only one partition read rows. It 
writes 7 row groups now and still fails on main.



-- 
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