Github user yuchenhuo commented on a diff in the pull request:

    https://github.com/apache/spark/pull/20953#discussion_r181306071
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/FileScanRDD.scala
 ---
    @@ -179,7 +182,23 @@ class FileScanRDD(
                 currentIterator = readCurrentFile()
               }
     
    -          hasNext
    +          try {
    +            hasNext
    +          } catch {
    +            case e: SchemaColumnConvertNotSupportedException =>
    +              val message = "Parquet column cannot be converted in " +
    +                s"file ${currentFile.filePath}. Column: ${e.getColumn}, " +
    +                s"Expected: ${e.getLogicalType}, Found: 
${e.getPhysicalType}"
    +              throw new QueryExecutionException(message, e)
    --- End diff --
    
    Yes, you are right. Sorry, I shouldn't say "use QueryExecutionException 
instead of the original SparkException". The final exception would still be 
wrapped with a SparkException. Inside the SparkException would be 
QueryExecutionException. But the reason is still the same, they don't want to 
throw too many different Exceptions which might be hard to capture and display.
    
    
![38043674-a2485370-326c-11e8-82a6-c36691f1e523](https://user-images.githubusercontent.com/37087310/38722077-9e115878-3eb1-11e8-989c-525268c96e3f.png)



---

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

Reply via email to