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 13:00:23 UTC

[GitHub] [spark] MaxGekk opened a new pull request #31497: [SPARK-34385][SQL] Unwrap `SparkUpgradeException` in v2 Parquet datasource

MaxGekk opened a new pull request #31497:
URL: https://github.com/apache/spark/pull/31497


   ### What changes were proposed in this pull request?
   Unwrap `SparkUpgradeException` from `ParquetDecodingException` in v2 `FilePartitionReader` in the same way as v1 implementation does: https://github.com/apache/spark/blob/3a299aa6480ac22501512cd0310d31a441d7dfdc/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/FileScanRDD.scala#L180-L183
   
   ### Why are the changes needed?
   1. To be compatible with v1 implementation of the Parquet datasource.
   2. To improve UX with Spark SQL by making `SparkUpgradeException` more visible.
   
   ### Does this PR introduce _any_ user-facing change?
   Yes, it can.
   
   ### How was this patch tested?
   By running the affected test suites:
   ```
   $ build/sbt "sql/test:testOnly *ParquetRebaseDatetimeV1Suite"
   $ build/sbt "sql/test:testOnly *ParquetRebaseDatetimeV2Suite"
   ```


----------------------------------------------------------------
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


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

Posted by GitBox <gi...@apache.org>.
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


[GitHub] [spark] SparkQA removed a comment on pull request #31497: [SPARK-34385][SQL] Unwrap `SparkUpgradeException` in v2 Parquet datasource

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #31497:
URL: https://github.com/apache/spark/pull/31497#issuecomment-774476803


   **[Test build #134955 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/134955/testReport)** for PR 31497 at commit [`09d454a`](https://github.com/apache/spark/commit/09d454a004ccc4eef2c8393c85fd5c09ac7311c0).


----------------------------------------------------------------
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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #31497: [SPARK-34385][SQL] Unwrap `SparkUpgradeException` in v2 Parquet datasource

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #31497:
URL: https://github.com/apache/spark/pull/31497#issuecomment-774491425


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/39538/
   


----------------------------------------------------------------
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


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

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #31497:
URL: https://github.com/apache/spark/pull/31497#issuecomment-774480880


   Kubernetes integration test starting
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/39538/
   


----------------------------------------------------------------
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


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

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #31497:
URL: https://github.com/apache/spark/pull/31497#issuecomment-774491425


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/39538/
   


----------------------------------------------------------------
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


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

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #31497:
URL: https://github.com/apache/spark/pull/31497#issuecomment-774517942


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/134955/
   


----------------------------------------------------------------
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


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

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #31497:
URL: https://github.com/apache/spark/pull/31497#issuecomment-774484802


   Kubernetes integration test status success
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/39538/
   


----------------------------------------------------------------
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


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

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #31497:
URL: https://github.com/apache/spark/pull/31497#issuecomment-774476803


   **[Test build #134955 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/134955/testReport)** for PR 31497 at commit [`09d454a`](https://github.com/apache/spark/commit/09d454a004ccc4eef2c8393c85fd5c09ac7311c0).


----------------------------------------------------------------
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


[GitHub] [spark] dongjoon-hyun closed pull request #31497: [SPARK-34385][SQL] Unwrap `SparkUpgradeException` in v2 Parquet datasource

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun closed pull request #31497:
URL: https://github.com/apache/spark/pull/31497


   


----------------------------------------------------------------
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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #31497: [SPARK-34385][SQL] Unwrap `SparkUpgradeException` in v2 Parquet datasource

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #31497:
URL: https://github.com/apache/spark/pull/31497#issuecomment-774517942


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/134955/
   


----------------------------------------------------------------
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


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

Posted by GitBox <gi...@apache.org>.
MaxGekk commented on a change in pull request #31497:
URL: https://github.com/apache/spark/pull/31497#discussion_r571454261



##########
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:
       In practice, this never happens since `ParquetDecodingException` always wraps an exception there https://github.com/apache/parquet-mr/blob/ee30b13bb5c3f6848c76641d3b93c9858e6746cb/parquet-hadoop/src/main/java/org/apache/parquet/hadoop/InternalParquetRecordReader.java#L253-L255




----------------------------------------------------------------
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


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

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #31497:
URL: https://github.com/apache/spark/pull/31497#issuecomment-774513993


   **[Test build #134955 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/134955/testReport)** for PR 31497 at commit [`09d454a`](https://github.com/apache/spark/commit/09d454a004ccc4eef2c8393c85fd5c09ac7311c0).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.


----------------------------------------------------------------
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