AngersZhuuuu commented on a change in pull request #34337:
URL: https://github.com/apache/spark/pull/34337#discussion_r739383914
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/FileScanRDD.scala
##########
@@ -174,9 +174,13 @@ class FileScanRDD(
if (e.getCause.isInstanceOf[SparkUpgradeException]) {
throw e.getCause
} else if (e.getMessage.contains("Can not read value at")) {
- throw QueryExecutionErrors.cannotReadParquetFilesError(e)
+ throw QueryExecutionErrors.cannotReadParquetFilesError(e,
currentFile.filePath,
+ Some("One possible cause: Parquet column cannot be converted
in the " +
+ "corresponding files."))
}
throw e
+ case e: Exception =>
+ throw QueryExecutionErrors.cannotReadParquetFilesError(e,
currentFile.filePath)
Review comment:
> We should generalize this error. It's not parquet only now. How about
`cannotReadFileError`?
Nice suggestion, changed
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/FileScanRDD.scala
##########
@@ -174,9 +174,13 @@ class FileScanRDD(
if (e.getCause.isInstanceOf[SparkUpgradeException]) {
throw e.getCause
} else if (e.getMessage.contains("Can not read value at")) {
- throw QueryExecutionErrors.cannotReadParquetFilesError(e)
+ throw QueryExecutionErrors.cannotReadParquetFilesError(e,
currentFile.filePath,
+ Some("One possible cause: Parquet column cannot be converted
in the " +
Review comment:
Done
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]