HaoYang670 opened a new issue, #3569:
URL: https://github.com/apache/arrow-datafusion/issues/3569
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
```
❯ select concat('a', null) from t;
+------------------------+
| concat(Utf8("a"),NULL) |
+------------------------+
| a |
+------------------------+
1 row in set. Query took 0.003 seconds.
❯ select 'a' || null from t;
+-------------------+
| Utf8("a") || NULL |
+-------------------+
| |
+-------------------+
1 row in set. Query took 0.003 seconds.
❯
```
**Expected behavior**
The two queries should return the same result.
In Spark, string_concat always return null when there is `null` element: (on
Spark3.3.0)
```scala
scala> df.selectExpr("'a' || null ").show
+---------------+
|concat(a, NULL)|
+---------------+
| null|
+---------------+
scala> df.selectExpr("concat('a' || null)").show
+-----------------------+
|concat(concat(a, NULL))|
+-----------------------+
| null|
+-----------------------+
```
**Additional context**
Add any other context about the problem here.
--
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]