You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by "Jason Altekruse (JIRA)" <ji...@apache.org> on 2015/07/20 19:45:06 UTC

[jira] [Created] (DRILL-3521) [umbrella] Review switch statements throughout codebase to add default cases where there are none

Jason Altekruse created DRILL-3521:
--------------------------------------

             Summary: [umbrella] Review switch statements throughout codebase to add default cases where there are none
                 Key: DRILL-3521
                 URL: https://issues.apache.org/jira/browse/DRILL-3521
             Project: Apache Drill
          Issue Type: Bug
          Components: Execution - Flow
            Reporter: Jason Altekruse
            Assignee: Jason Altekruse


There are a number of places in the code that are missing default branches on case statements. One particular instance I noticed is in OptionValue.createOption, which returns null if passed an unexpected type. This and a few other places in the code could be made a little nicer to work with if we just provided the standard behavior of throwing an exception.

One additional note, in a number of places where we do have defaults, but the exception thrown is an UnsupportedOperationException with no message. DRILL-2680 discusses this problem, so this might be handled over there, but as we fill in the switch defaults we should try to avoid introducing the new problem of exceptions lacking descriptions.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)