[ 
https://issues.apache.org/jira/browse/HIVE-26550?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ádám Szita resolved HIVE-26550.
-------------------------------
    Fix Version/s: 4.0.0
       Resolution: Fixed

Merged to master. Thanks for the fix [~ghanko] and for the review 
[~teddy.choi], [~asolimando]

> Const struct equality operator throws error when CBO is off and vectorization 
> is on
> -----------------------------------------------------------------------------------
>
>                 Key: HIVE-26550
>                 URL: https://issues.apache.org/jira/browse/HIVE-26550
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Hankó Gergely
>            Assignee: Hankó Gergely
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 4.0.0
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Repro:
> {code:java}
> set hive.fetch.task.conversion=none;
> set hive.cbo.enable=false;
> create table test (a string) partitioned by (y string, m string);
> insert into test values ('aa', 2022, 9);
> select * from test where (struct(2022) = struct(2022));{code}
> Result:
> {code:java}
> Caused by: java.lang.ClassCastException: java.lang.Integer cannot be cast to 
> org.apache.hadoop.io.IntWritable
>         at 
> org.apache.hadoop.hive.serde2.objectinspector.primitive.WritableIntObjectInspector.get(WritableIntObjectInspector.java:36)
>         at 
> org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorUtils.compare(ObjectInspectorUtils.java:1090)
>         at 
> org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorUtils.compare(ObjectInspectorUtils.java:1207)
>         at 
> org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorUtils.compare(ObjectInspectorUtils.java:1043)
>         at 
> org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorUtils.compare(ObjectInspectorUtils.java:1034)
>         at 
> org.apache.hadoop.hive.ql.udf.generic.GenericUDFOPEqual.evaluate(GenericUDFOPEqual.java:142)
>         at 
> org.apache.hadoop.hive.ql.exec.vector.udf.VectorUDFAdaptor.setResult(VectorUDFAdaptor.java:190)
>  {code}
> Expected (this is the result when CBO is on):
> {code:java}
> aa  2022   9 {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to