You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by Anthony Hsu via Review Board <no...@reviews.apache.org> on 2017/09/14 02:20:31 UTC

Review Request 62321: HIVE-17530: ClassCastException when converting uniontype

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/62321/
-----------------------------------------------------------

Review request for hive, Carl Steinbach and Ratandeep Ratti.


Bugs: HIVE-17530
    https://issues.apache.org/jira/browse/HIVE-17530


Repository: hive-git


Description
-------

Previously, StandardUnionObjectInspector was creating an ArrayList instead of a StandardUnion, causing the exception

```
java.lang.ClassCastException: java.util.ArrayList cannot be cast to org.apache.hadoop.hive.serde2.objectinspector.UnionObject
```

This patch fixes this.


Diffs
-----

  ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorDeserializeRow.java 2ad06fc12869e74e14aae7b7a36685482c4a1ade 
  ql/src/test/queries/clientpositive/orc_avro_partition_uniontype.q PRE-CREATION 
  ql/src/test/results/clientpositive/orc_avro_partition_uniontype.q.out PRE-CREATION 
  serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/ObjectInspectorConverters.java 7921de8d9c4a56af715de5498954794aaba32fff 
  serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/SettableUnionObjectInspector.java 564d8d60451d9756eca1f1edcc84248e4f559828 
  serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/StandardUnionObjectInspector.java 7b2868233f127899c7dca07d4f899b24ae2cbc1b 


Diff: https://reviews.apache.org/r/62321/diff/1/


Testing
-------

Added qtest.


Thanks,

Anthony Hsu


Re: Review Request 62321: HIVE-17530: ClassCastException when converting uniontype

Posted by Ratandeep Ratti <rd...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/62321/#review185485
-----------------------------------------------------------


Ship it!




LGTM

- Ratandeep Ratti


On Sept. 15, 2017, 1:52 a.m., Anthony Hsu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62321/
> -----------------------------------------------------------
> 
> (Updated Sept. 15, 2017, 1:52 a.m.)
> 
> 
> Review request for hive, Carl Steinbach and Ratandeep Ratti.
> 
> 
> Bugs: HIVE-17530
>     https://issues.apache.org/jira/browse/HIVE-17530
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> Previously, StandardUnionObjectInspector was creating an ArrayList instead of a StandardUnion, causing the exception
> 
> ```
> java.lang.ClassCastException: java.util.ArrayList cannot be cast to org.apache.hadoop.hive.serde2.objectinspector.UnionObject
> ```
> 
> This patch fixes this.
> 
> 
> Diffs
> -----
> 
>   ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorDeserializeRow.java 2ad06fc12869e74e14aae7b7a36685482c4a1ade 
>   ql/src/test/queries/clientpositive/orc_avro_partition_uniontype.q PRE-CREATION 
>   ql/src/test/results/clientpositive/orc_avro_partition_uniontype.q.out PRE-CREATION 
>   serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/ObjectInspectorConverters.java 7921de8d9c4a56af715de5498954794aaba32fff 
>   serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/SettableUnionObjectInspector.java 564d8d60451d9756eca1f1edcc84248e4f559828 
>   serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/StandardUnionObjectInspector.java 7b2868233f127899c7dca07d4f899b24ae2cbc1b 
>   serde/src/test/org/apache/hadoop/hive/serde2/objectinspector/TestObjectInspectorConverters.java 2e1bb22cea715501749ee5e169ce34f7dc789e64 
> 
> 
> Diff: https://reviews.apache.org/r/62321/diff/2/
> 
> 
> Testing
> -------
> 
> Added qtest.
> 
> 
> Thanks,
> 
> Anthony Hsu
> 
>


Re: Review Request 62321: HIVE-17530: ClassCastException when converting uniontype

Posted by Anthony Hsu via Review Board <no...@reviews.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/62321/
-----------------------------------------------------------

(Updated 九月 15, 2017, 1:52 a.m.)


Review request for hive, Carl Steinbach and Ratandeep Ratti.


Changes
-------

* Fixed test TestObjectInspectorConverters.testObjectInspectorConverters()
* Renamed SettableUnionObjectInspector.addField() to setFieldAndTag().


Bugs: HIVE-17530
    https://issues.apache.org/jira/browse/HIVE-17530


Repository: hive-git


Description
-------

Previously, StandardUnionObjectInspector was creating an ArrayList instead of a StandardUnion, causing the exception

```
java.lang.ClassCastException: java.util.ArrayList cannot be cast to org.apache.hadoop.hive.serde2.objectinspector.UnionObject
```

This patch fixes this.


Diffs (updated)
-----

  ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorDeserializeRow.java 2ad06fc12869e74e14aae7b7a36685482c4a1ade 
  ql/src/test/queries/clientpositive/orc_avro_partition_uniontype.q PRE-CREATION 
  ql/src/test/results/clientpositive/orc_avro_partition_uniontype.q.out PRE-CREATION 
  serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/ObjectInspectorConverters.java 7921de8d9c4a56af715de5498954794aaba32fff 
  serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/SettableUnionObjectInspector.java 564d8d60451d9756eca1f1edcc84248e4f559828 
  serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/StandardUnionObjectInspector.java 7b2868233f127899c7dca07d4f899b24ae2cbc1b 
  serde/src/test/org/apache/hadoop/hive/serde2/objectinspector/TestObjectInspectorConverters.java 2e1bb22cea715501749ee5e169ce34f7dc789e64 


Diff: https://reviews.apache.org/r/62321/diff/2/

Changes: https://reviews.apache.org/r/62321/diff/1-2/


Testing
-------

Added qtest.


Thanks,

Anthony Hsu