cloud-fan commented on code in PR #49340: URL: https://github.com/apache/spark/pull/49340#discussion_r1903527710
########## sql/api/src/main/scala/org/apache/spark/sql/catalyst/encoders/RowEncoder.scala: ########## @@ -84,7 +84,7 @@ object RowEncoder extends DataTypeErrorsBase { CharEncoder(length) case VarcharType(length) if SqlApiConf.get.preserveCharVarcharTypeInfo => VarcharEncoder(length) - case s: StringType if s.constraint == NoConstraint => StringEncoder + case s: StringType if StringHelper.isPlainString(s) => StringEncoder Review Comment: I think the previous code is more readable. -- 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