mihailoale-db commented on code in PR #52142: URL: https://github.com/apache/spark/pull/52142#discussion_r2305309887
########## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/complexTypeExtractors.scala: ########## @@ -148,7 +148,10 @@ trait ExtractValue extends Expression with QueryErrorsBase { case class GetStructField(child: Expression, ordinal: Int, name: Option[String] = None) extends UnaryExpression with ExtractValue { - lazy val childSchema = child.dataType.asInstanceOf[StructType] + lazy val childSchema = child.dataType match { Review Comment: Are we sure that this is a error message improvement and not an actual bug in the analyzer? It might be that somehow we don't apply type coercion correctly or similar, right? -- 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