----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/37563/#review95749 -----------------------------------------------------------
serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/ObjectInspectorConverters.java (line 443) <https://reviews.apache.org/r/37563/#comment150862> Is the conversion of extra fields to NULL done in convert(). i.e. how do we handle a scenario where the input is a UNION with {int, string, boolean, char} and output is a UNION with {string, int, boolean}. Is the above scenario valid ? 1. If this conversion is not possible, we should make sure that inputTagsOIs and outputTagsOIs have the same size. i.e. we need to make sure that there is an one to one mapping between inputTagsOIs and outputTagsOIs. 2. In the above example, if the conversion is valid; on the other hand, we need to make sure that we infact return NULL when the user tries to call convert on inputFieldTag 3. serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/ObjectInspectorConverters.java (line 467) <https://reviews.apache.org/r/37563/#comment150863> Can you make sure that (Byte)inputFieldTag).intValue() is >= 0 && < fieldConverters.size(). If not, you can either throw an exception or NULL based on how you handle extra tags. - Hari Sankar Sivarama Subramaniyan On Aug. 18, 2015, 3:35 a.m., Swarnim Kulkarni wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/37563/ > ----------------------------------------------------------- > > (Updated Aug. 18, 2015, 3:35 a.m.) > > > Review request for hive and Hari Sankar Sivarama Subramaniyan. > > > Repository: hive-git > > > Description > ------- > > HIVE-10697 Fix for ObjectInspectorConvertors#UnionConvertor doing a faulty > conversion > > > Diffs > ----- > > > serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/ObjectInspectorConverters.java > 8ef8ce1736d50f0f9163cd5e3fd00ddd4bd810da > > serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/SettableUnionObjectInspector.java > a64aee074d05a14c3c72079ff960039811936419 > > serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/StandardUnionObjectInspector.java > d1b11e82730e57f6894145478aae7c0c0c26e518 > > serde/src/test/org/apache/hadoop/hive/serde2/objectinspector/TestObjectInspectorConverters.java > 11852833577149152cefaef50ee49328733c9dde > > Diff: https://reviews.apache.org/r/37563/diff/ > > > Testing > ------- > > Unit tests added. > > > Thanks, > > Swarnim Kulkarni > >