Description
When Spark's ConstantFolding optimizer rule is disabled, concat_ws with a literal NULL separator reaches the native engine, which crashes with:
Expected string literal, got None.
How to Reproduce
SET spark.sql.optimizer.excludedRules=org.apache.spark.sql.catalyst.optimizer.ConstantFolding;
SELECT concat_ws(NULL, 'a', 'b');
Expected Behavior
The native engine should handle a NULL separator gracefully — either returning NULL (matching Spark behavior) or falling back to Spark.
Description
When Spark's
ConstantFoldingoptimizer rule is disabled,concat_wswith a literal NULL separator reaches the native engine, which crashes with:How to Reproduce
Expected Behavior
The native engine should handle a NULL separator gracefully — either returning NULL (matching Spark behavior) or falling back to Spark.