[
https://issues.apache.org/jira/browse/DRILL-6724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16602470#comment-16602470
]
ASF GitHub Bot commented on DRILL-6724:
---------------------------------------
paul-rogers commented on issue #1455: DRILL-6724: Convert IndexOutOfBounds
exception to UserException with …
URL: https://github.com/apache/drill/pull/1455#issuecomment-418200233
I have a basic question on this one. Is an Index Out Of Bounds Exception
(IOBE) an expected behavior for this context? Or, does it indicate a bug in the
code? Normally, code is expected to know the array size, and index only within
that size, meaning that an IOBE is a program error.
By presenting the error to the user in the nicely-formatted way introduced
in this code, we seem to be implying that this is something the user needs to
worry about. Yet, if this is a program error, we should say that this is a
System Error and they need to contact Support for resolution.
Note also that for unexpected program errors, there is a well-defined
generic way we catch exceptions in the Fragment Executor. The Fragment Executor
is the handler of last resort, will report an error, and will shut down the
fragment.
So, basic question: what is the source of the IOBE? If the IOBE is a program
error, do we need the fancy handling if the Fragment Executor handles such
errors? And, if the IOBE indicates a problem the user can resolve, should the
error messages indicate a possible resolution? What might that problem be?
Corrupted database? Incorrect SQL? Update done concurrently with a query?
Something else?
----------------------------------------------------------------
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]
> Convert IndexOutOfBounds exception to UserException with context data where
> possible
> ------------------------------------------------------------------------------------
>
> Key: DRILL-6724
> URL: https://issues.apache.org/jira/browse/DRILL-6724
> Project: Apache Drill
> Issue Type: Improvement
> Affects Versions: 1.14.0
> Reporter: Bohdan Kazydub
> Assignee: Bohdan Kazydub
> Priority: Major
> Fix For: 1.15.0
>
>
> Sometimes when IndexOutOfBoundsException is exposed to users it is not clear
> what causes the problem. Instead this exception may be converted to a more
> useful UserException containing context data like filename, line, position
> etc (depending on what is available from a reader for a given type).
> A possible approach is to add a method to a RecordReader interface which
> produces UserException of type ErrorType.DATA_READ with context data, so that
> when such an UserException is needed it can be easily obtained by invoking
> the method.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)