You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/02/06 15:19:09 UTC

[GitHub] [spark] Archish27 commented on a change in pull request #31497: [SPARK-34385][SQL] Unwrap `SparkUpgradeException` in v2 Parquet datasource

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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org