vdiravka commented on a change in pull request #1455: DRILL-6724: Convert 
IndexOutOfBounds exception to UserException with …
URL: https://github.com/apache/drill/pull/1455#discussion_r214548665
 
 

 ##########
 File path: 
contrib/storage-hive/core/src/main/java/org/apache/drill/exec/store/hive/readers/HiveAbstractReader.java
 ##########
 @@ -430,4 +431,23 @@ protected boolean hasNextValue(Object value) {
     }
   }
 
+  @Override
+  public UserException createDataReadException(Throwable cause, String 
message) {
+    UserException.Builder builder = UserException.dataReadError(cause)
+        .message(message)
+        .addContext("Database ", table.getDbName())
+        .addContext("Table ", table.getTableName());
+    long position = -1;
+    try {
+      if (reader != null) {
+        position = reader.getPos();
+      }
+    } catch (IOException e) {
+      // Ignore as this is to provide information only
 
 Review comment:
   It would be good to log this exception message on TRACE level.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to