Github user MaxGekk commented on a diff in the pull request:
https://github.com/apache/spark/pull/21598#discussion_r198280518
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/collectionOperations.scala
---
@@ -75,28 +75,44 @@ trait BinaryArrayExpressionWithImplicitCast extends
BinaryExpression
> SELECT _FUNC_(array('b', 'd', 'c', 'a'));
4
""")
-case class Size(child: Expression) extends UnaryExpression with
ExpectsInputTypes {
+case class Size(
+ child: Expression,
+ legacySizeOfNull: Boolean)
+ extends UnaryExpression with ExpectsInputTypes {
+
+ def this(child: Expression) =
+ this(
+ child,
+ legacySizeOfNull = SQLConf.get.getConf(SQLConf.LEGACY_SIZE_OF_NULL))
--- End diff --
If it works now, I will try to read the config on executor's side. I was
just struggling to an issue in tests for another PR when SQL configs were not
propagated to executors. For example:
https://github.com/apache/spark/blob/a40ffc656d62372da85e0fa932b67207839e7fde/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/ExpressionEvalHelper.scala#L52-L54
Also I see some other places where configs are read via passing to
constructors:
https://github.com/apache/spark/blob/b8f27ae3b34134a01998b77db4b7935e7f82a4fe/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/jsonExpressions.scala#L534
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]