Copilot commented on code in PR #22959:
URL: https://github.com/apache/datafusion/pull/22959#discussion_r3415371080


##########
datafusion/sqllogictest/test_files/spark/string/concat_ws.slt:
##########
@@ -385,3 +385,73 @@ x,1,2,y
 ## Struct argument is rejected (not coerced to string)
 query error
 SELECT concat_ws(',', named_struct('a', 1));
+
+## ── Plan-time simplifications ───────────────────────────────
+
+## Folded by simplify() — ConstEvaluator can't (mixed literal + column).
+query TT
+EXPLAIN SELECT concat_ws(CAST(NULL AS STRING), a, b) AS r FROM VALUES ('x', 
'y'), ('p', 'q') AS t(a, b);
+----
+logical_plan
+01)Projection: Utf8(NULL) AS r
+02)--SubqueryAlias: t
+03)----Projection:
+04)------Values: (Utf8("x"), Utf8("y")), (Utf8("p"), Utf8("q"))
+physical_plan
+01)ProjectionExec: expr=[NULL as r]
+02)--DataSourceExec: partitions=1, partition_sizes=[1]

Review Comment:
   These `EXPLAIN` assertions include physical-plan details that are typically 
unstable across optimizer/formatting changes (e.g., `partition_sizes=[…]`, 
exact exec node names/fields). To reduce test brittleness, consider loosening 
the match to focus on the key invariant (the folded projection expression) by 
using sqllogictest wildcards (e.g., `...`) for volatile lines or by asserting 
only the logical plan portion when possible.



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