hive-dev mailing list archives

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


Mithun Radhakrishnan commented on HIVE-9322:

@[~ashutoshc]: You're right about the deja vu. :]

(The problem in HIVE-6389 was that we were returning -1, when the data was NULL, even if it
wasn't an integer-map. We discussed the data vs key null-check as an aside.)

At the moment, the semantics aren't uniform across OIs. {{LazyBinaryMapOI}} and {{DeepParquetHiveMapOI}}
already guard against null-keys, while the others don't. Wouldn't uniformity be best? In light
of your performance concern, should we consider removing the null-checks in all MapOIs?

I don't think we're changing semantics of what can be stored in a Map because I'd expect an
NPE when writing a null-key (although I might be mistaken). We're only guarding against non-deterministic
behaviour for stuff like:

SELECT map_column[ string_column ] FROM my_table; 

... in cases where {{string_column IS NULL}}.

> 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