dongjoon-hyun commented on a change in pull request #34337:
URL: https://github.com/apache/spark/pull/34337#discussion_r732449603



##########
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:
       What you aims to have is a good log, you can print log here and simply 
re-throw the existing exception. Changing exception is the loss of the 
information already.




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

Reply via email to