hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ashutosh Chauhan (JIRA)" <>
Subject [jira] [Commented] (HIVE-9322) Make null-checks consistent for MapObjectInspector subclasses.
Date Fri, 20 Feb 2015 19:54:11 GMT


Ashutosh Chauhan commented on HIVE-9322:

I see, changes are concerned with read side only. I think it makes sense to have this null
check, incase underlying map implementation changes for these OIs. Problem is java's map interface
which most of OIs uses is lax about nulls as keys. As a data point, HashMap allows it while
ConcurrentHashMap doesnt (throws NPE). Since keys here is provided by user its better that
Hive returns null in those cases, instead of throwing NPE. Performance consideration is secondary,
we should be concentrating on what semantics we want to provide to users.


> Make null-checks consistent for MapObjectInspector subclasses.
> --------------------------------------------------------------
>                 Key: HIVE-9322
>                 URL:
>             Project: Hive
>          Issue Type: Bug
>          Components: Serializers/Deserializers
>    Affects Versions: 0.14.0
>            Reporter: Mithun Radhakrishnan
>            Assignee: Mithun Radhakrishnan
>            Priority: Minor
>         Attachments: HIVE-9322.1.patch
> {{LazyBinaryMapObjectInspector}}, {{DeepParquetHiveMapInspector}}, etc. check both the
map-column value and the map-key for null, before dereferencing them. {{OrcMapObjectInspector}}
and {{LazyMapObjectInspector}} do not.
> This patch brings them all in sync. Might not be a real problem, unless (for example)
the lookup key is itself a (possibly null) value from another column.

This message was sent by Atlassian JIRA

View raw message