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/20 06:13:33 UTC

[GitHub] [spark] AngersZhuuuu commented on a change in pull request #34337: [SPARK-37066][SQL] Improve error message to show file path when OrcColumnarBatchReader throw ArrayIndexOutofBoundsException

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



##########
File path: sql/core/src/main/java/org/apache/spark/sql/execution/datasources/orc/OrcColumnarBatchReader.java
##########
@@ -96,7 +98,12 @@ public float getProgress() throws IOException {
 
   @Override
   public boolean nextKeyValue() throws IOException {
-    return nextBatch();
+    try {
+      return nextBatch();
+    } catch (ArrayIndexOutOfBoundsException e) {
+      throw new RuntimeException("Throw ArrayIndexOutOfBoundsException: " + e.getMessage() +

Review comment:
       > Why do you need to convert `ArrayIndexOutOfBoundsException` to an ambiguous one `RuntimeException`?
   
   Since `ArrayIndexOutOfBoundsException` only have parameter of error message? return a `ArrayIndexOutOfBoundsException` may miss it's root cause?




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