stefankandic commented on code in PR #44527: URL: https://github.com/apache/spark/pull/44527#discussion_r1438336908
########## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/encoders/ExpressionEncoder.scala: ########## @@ -325,11 +325,17 @@ case class ExpressionEncoder[T]( assert(serializer.forall(_.references.isEmpty), "serializer cannot reference any attributes.") assert(serializer.flatMap { ser => val boundRefs = ser.collect { case b: BoundReference => b } - assert(boundRefs.nonEmpty, - "each serializer expression should contain at least one `BoundReference`") + assert(boundRefs.nonEmpty || isEmptyStruct(ser), Review Comment: i could be wrong but it seems to me that the empty struct will always have empty boundref -- 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: reviews-unsubscr...@spark.apache.org 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