Kristofferjoha commented on code in PR #27360: URL: https://github.com/apache/datafusion/pull/27360#discussion_r4670264594
########## datafusion/sqllogictest/test_files/aggregate_utf8view_partial_emit.slt: ########## @@ -0,0 +1,84 @@ +# 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 + +# Reproducer from https://github.com/apache/datafusion/issues/27323 +# +# GROUP BY k, s on a file sorted by k, where s is Utf8View. The partial +# aggregate emits a small batch every time k changes. Those batches used to +# drag along the strings of earlier batches, and the query ran out of memory +# in the order-preserving repartition even though the result is 7000 rows. + +statement ok +SET datafusion.execution.target_partitions = 8 + +query I +COPY ( + SELECT value % 1000 AS k, repeat('x', 100) || (value % 7)::varchar AS s, value AS v + FROM generate_series(1, 2000000) + ORDER BY k +) Review Comment: Cut it from 2M to 500k rows since your comment. it now takes about 1s in a debug build. Below ~300k rows main stops failing at these memory limits, so 500k is about as small as it can get and still catch the bug. Sorry for the late response -- 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]
