viirya commented on a change in pull request #30504: URL: https://github.com/apache/spark/pull/30504#discussion_r530608975
########## File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/complexTypeCreator.scala ########## @@ -30,6 +30,13 @@ import org.apache.spark.sql.internal.SQLConf import org.apache.spark.sql.types._ import org.apache.spark.unsafe.types.UTF8String +/** + * This trait is to indicate that this is an expression that creates a collection + * that will not be null and will not be empty when it contains children. + * Note that it will be foldable if it doesn't container children. Review comment: "container" -> "contain"? ########## File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/complexTypeCreator.scala ########## @@ -30,6 +30,13 @@ import org.apache.spark.sql.internal.SQLConf import org.apache.spark.sql.types._ import org.apache.spark.unsafe.types.UTF8String +/** + * This trait is to indicate that this is an expression that creates a collection + * that will not be null and will not be empty when it contains children. + * Note that it will be foldable if it doesn't container children. + */ +trait CreateNonEmptyNonNullCollection Review comment: Maybe `CreateNonNullCollection`? The complex type creators `CreateArray` and `CreateMap` creates non null collection, but I think we cannot infer it creates non empty collection. Although the comment said it is only non empty if the creator contains children, it cannot be inferred from the trait itself only. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org