You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "MaxGekk (via GitHub)" <gi...@apache.org> on 2023/12/28 19:19:48 UTC
Re: [PR] [SPARK-46539][SQL] SELECT * EXCEPT(all fields from a struct) results in an assertion failure [spark]
MaxGekk commented on code in PR #44527:
URL: https://github.com/apache/spark/pull/44527#discussion_r1437843472
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/encoders/ExpressionEncoder.scala:
##########
@@ -325,11 +325,16 @@ 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,
+ assert(boundRefs.nonEmpty || isEmptyStruct(ser),
"each serializer expression should contain at least one `BoundReference`")
Review Comment:
Please, update the assert message according to your changes.
--
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-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org