You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Oleg Danilov (JIRA)" <ji...@apache.org> on 2017/08/14 11:28:00 UTC

[jira] [Created] (HIVE-17313) Potentially possible 'case fall through' in the ObjectInspectorConverters

Oleg Danilov created HIVE-17313:
-----------------------------------

             Summary: Potentially possible 'case fall through' in the ObjectInspectorConverters
                 Key: HIVE-17313
                 URL: https://issues.apache.org/jira/browse/HIVE-17313
             Project: Hive
          Issue Type: Bug
            Reporter: Oleg Danilov
            Priority: Trivial


Lines 103-110:

{code:java}
    case STRING:
      if (outputOI instanceof WritableStringObjectInspector) {
        return new PrimitiveObjectInspectorConverter.TextConverter(
            inputOI);
      } else if (outputOI instanceof JavaStringObjectInspector) {
        return new PrimitiveObjectInspectorConverter.StringConverter(
            inputOI);
      }
    case CHAR:
{code}

De-facto it should work correctly since outputOI is either an instance of WritableStringObjectInspector or JavaStringObjectInspector, but it would be better to rewrite this case to avoid possible fall through.




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)