Archish27 commented on a change in pull request #31497:
URL: https://github.com/apache/spark/pull/31497#discussion_r571447378



##########
File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/FilePartitionReader.scala
##########
@@ -72,7 +73,9 @@ class FilePartitionReader[T](readers: 
Iterator[PartitionedFileReader[T]])
           s"Expected: ${e.getLogicalType}, Found: ${e.getPhysicalType}"
         throw new QueryExecutionException(message, e)
       case e: ParquetDecodingException =>
-        if (e.getMessage.contains("Can not read value at")) {
+        if (e.getCause.isInstanceOf[SparkUpgradeException]) {
+          throw e.getCause

Review comment:
       If this is user-facing is it possible that it returns `null`? If it 
returns `null` message won't be helpful. 




----------------------------------------------------------------
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to