Github user HyukjinKwon commented on the issue:
https://github.com/apache/spark/pull/22373
@mgaido91, BTW are you sure SPARK-21281 introduced that behaviour change?
Before:
```
scala> import org.apache.spark.sql.functions.struct
import org.apache.spark.sql.functions.struct
scala> spark.range(1).select(struct()).show()
org.apache.spark.sql.AnalysisException: cannot resolve 'named_struct()' due
to data type mismatch: input to function named_struct requires at least one
argument;;
'Project [unresolvedalias(named_struct(), None)]
+- Range (0, 1, step=1, splits=Some(8))
```
After:
```
scala> import org.apache.spark.sql.functions.struct
import org.apache.spark.sql.functions.struct
scala> spark.range(1).select(struct()).show()
java.lang.AssertionError: assertion failed: each serializer expression
should contain at least one `BoundReference`
at scala.Predef$.assert(Predef.scala:170)
```
it should be good to document that behaviour change if that's allowed
before.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]