berkaysynnada commented on code in PR #13805: URL: https://github.com/apache/datafusion/pull/13805#discussion_r1897333614
########## datafusion/sqllogictest/test_files/union.slt: ########## @@ -777,3 +777,62 @@ select make_array(make_array(1)) x UNION ALL SELECT make_array(arrow_cast(make_a ---- [[-1]] [[1]] + +statement ok +CREATE EXTERNAL TABLE aggregate_test_100 ( + c1 VARCHAR NOT NULL, + c2 TINYINT NOT NULL, + c3 SMALLINT NOT NULL, + c4 SMALLINT, + c5 INT, + c6 BIGINT NOT NULL, + c7 SMALLINT NOT NULL, + c8 INT NOT NULL, + c9 BIGINT UNSIGNED NOT NULL, + c10 VARCHAR NOT NULL, + c11 FLOAT NOT NULL, + c12 DOUBLE NOT NULL, + c13 VARCHAR NOT NULL +) +STORED AS CSV +LOCATION '../../testing/data/csv/aggregate_test_100.csv' +OPTIONS ('format.has_header' 'true'); + +statement ok +set datafusion.execution.batch_size = 2; + +# Constant value tracking across union +query TT +explain +SELECT * FROM( +( + SELECT * FROM aggregate_test_100 WHERE c1='a' +) +UNION ALL +( + SELECT * FROM aggregate_test_100 WHERE c1='a' +)) +ORDER BY c1 +---- +logical_plan +01)Sort: aggregate_test_100.c1 ASC NULLS LAST +02)--Union +03)----Filter: aggregate_test_100.c1 = Utf8("a") +04)------TableScan: aggregate_test_100 projection=[c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13], partial_filters=[aggregate_test_100.c1 = Utf8("a")] +05)----Filter: aggregate_test_100.c1 = Utf8("a") +06)------TableScan: aggregate_test_100 projection=[c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13], partial_filters=[aggregate_test_100.c1 = Utf8("a")] +physical_plan +01)CoalescePartitionsExec Review Comment: This appears as SortPreservingMergeExec before these changes 👍🏻 -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org