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/10/21 17:15:39 UTC

[GitHub] [spark] sunchao commented on a change in pull request #34337: [SPARK-37066][SQL] Improve error message to show file path when failed to read next file

sunchao commented on a change in pull request #34337:
URL: https://github.com/apache/spark/pull/34337#discussion_r733883879



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryExecutionErrors.scala
##########
@@ -586,10 +586,11 @@ object QueryExecutionErrors {
     new QueryExecutionException(message, e)
   }
 
-  def cannotReadParquetFilesError(e: Exception): Throwable = {
-    val message = "Encounter error while reading parquet files. " +
-      "One possible cause: Parquet column cannot be converted in the " +
-      "corresponding files. Details: "
+  def cannotReadParquetFilesError(
+      e: Exception,
+      path: String,
+      notice: String): Throwable = {
+    val message = s"Encounter error while reading parquet file $path. $notice Details: "

Review comment:
       nit: Encounter -> Encountered? and also `parquet` -> `Parquet`

##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryExecutionErrors.scala
##########
@@ -586,10 +586,11 @@ object QueryExecutionErrors {
     new QueryExecutionException(message, e)
   }
 
-  def cannotReadParquetFilesError(e: Exception): Throwable = {
-    val message = "Encounter error while reading parquet files. " +
-      "One possible cause: Parquet column cannot be converted in the " +
-      "corresponding files. Details: "
+  def cannotReadParquetFilesError(
+      e: Exception,
+      path: String,
+      notice: String): Throwable = {

Review comment:
       maybe rename this to `reason`? also can we make it optional?




-- 
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: reviews-unsubscribe@spark.apache.org

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