kosiew commented on code in PR #24763:
URL: https://github.com/apache/datafusion/pull/24763#discussion_r3912004331
##########
datafusion/sqllogictest/test_files/simplify_predicates.slt:
##########
@@ -242,5 +242,31 @@ logical_plan
02)--TableScan: test_data projection=[int_col, float_col, str_col, date_col,
bool_col]
+# x = 'apple' AND 'apple' = x is one condition, not a contradiction
+query TT
+EXPLAIN SELECT * FROM test_data WHERE str_col = 'apple' AND 'apple' = str_col;
+----
+logical_plan
+01)Filter: test_data.str_col = Utf8View("apple")
+02)--TableScan: test_data projection=[int_col, float_col, str_col, date_col,
bool_col]
+
+# x = 'apple' AND 'banana' = x is still impossible
+query TT
+EXPLAIN SELECT * FROM test_data WHERE str_col = 'apple' AND 'banana' = str_col;
+----
+logical_plan EmptyRelation: rows=0
+
statement ok
set datafusion.explain.logical_plan_only=false;
+
+statement ok
+CREATE TABLE fruit (name VARCHAR) AS VALUES ('apple'), ('banana');
+
+query T
+SELECT name FROM fruit WHERE name = 'apple' AND 'apple' = name;
+----
+apple
+
+query T
+SELECT name FROM fruit WHERE name = 'apple' AND 'banana' = name;
+----
Review Comment:
Could we add one end-to-end `sqllogictests` binary fixture for
`configMatrix` introduced in #24493 where each configuration produces and
asserts a distinct result? The current unit tests cover parsing, aggregation,
and `TestContext::apply_config_overrides`, but they do not exercise the full
`run_matrix` path, including creating a fresh context, applying overrides
before runner construction, and replaying the file for each combination. This
would give us good coverage of the actual execution wiring.
--
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]