xupefei commented on code in PR #49339: URL: https://github.com/apache/spark/pull/49339#discussion_r1901676055
########## sql/api/src/main/scala/org/apache/spark/sql/catalyst/ScalaReflection.scala: ########## @@ -331,7 +331,7 @@ object ScalaReflection extends ScalaReflection { case t if isSubtype(t, localTypeOf[java.time.Instant]) => STRICT_INSTANT_ENCODER case t if isSubtype(t, localTypeOf[java.time.LocalDateTime]) => LocalDateTimeEncoder case t if isSubtype(t, localTypeOf[VariantVal]) => VariantEncoder - case t if isSubtype(t, localTypeOf[Row]) => UnboundRowEncoder + case t if isRowEncoderSupported && isSubtype(t, localTypeOf[Row]) => UnboundRowEncoder Review Comment: Checked all call sites, and found that half of these calls contain the generic type `T`, which can be a `Row`. I think we should change all such calls to `encoderForWithRowEncoderSupport`. -- 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