panbingkun commented on code in PR #47984:
URL: https://github.com/apache/spark/pull/47984#discussion_r1770949125
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects/objects.scala:
##########
@@ -90,7 +90,24 @@ trait InvokeLike extends Expression with NonSQLExpression
with ImplicitCastInput
// serializability, because the type-level info with java.io.Serializable
and
// java.io.Externalizable marker interfaces are not strong guarantees.
// This restriction can be relaxed in the future to expose more
optimizations.
- !dt.existsRecursively(_.isInstanceOf[ObjectType])
+ !dt.existsRecursively {
+ case ObjectType(cls) if cls == classOf[Array[java.lang.Boolean]] => false
Review Comment:
When we use `Invoke` to implement `ToJavaArray`, we must update here,
otherwise we cannot hit `ConstantFolding` optimization
--
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]