HeartSaVioR commented on a change in pull request #25242: [SPARK-28497][SQL] Disallow upcasting complex data types to string type URL: https://github.com/apache/spark/pull/25242#discussion_r307063828
########## File path: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/encoders/EncoderResolutionSuite.scala ########## @@ -196,6 +196,43 @@ class EncoderResolutionSuite extends PlanTest { encoder.resolveAndBind(attrs) } + test("SPARK-28497: complex type is not compatible with string encoder schema") { + val encoder = ExpressionEncoder[String] + + { Review comment: Each block might be easily extracted with inner function to remove duplications. attr (element in attrs), and string representation of attr type are different and remaining is exactly same. ---------------------------------------------------------------- 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 With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org