Hi Spark Devs,

Please review my PR [ https://github.com/apache/spark/pull/47522 ] that
relates to ticket [ https://issues.apache.org/jira/browse/SPARK-49044 ].

Context: When we have mixed schema rows, the error message "{actual} is not
a valid external type for schema of {expected}" doesn't help to understand
the column with the problem. I suggest adding information about the source
column.

Example:
https://github.com/mrk-andreev/example-spark-schema/blob/main/spark_4.0.0/src/test/scala/ErrorMsgSuite.scala

Before fix: [B is not a valid external type for schema of string
After fix: [B is not a valid external type for schema of string at
getexternalrowfield(assertnotnull(input[0, org.apache.spark.sql.Row,
true]), 1, f3)

-- 
Best regards,
Mark Andreev

Reply via email to