You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Gabor Kaszab (Jira)" <ji...@apache.org> on 2022/06/10 13:35:00 UTC

[jira] [Commented] (HIVE-26311) Incorrect content of array when IN operator is in the filter

    [ https://issues.apache.org/jira/browse/HIVE-26311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17552755#comment-17552755 ] 

Gabor Kaszab commented on HIVE-26311:
-------------------------------------

I've uploaded a Parquet file that holds functional_parquet.complextypes_arrays in my example above. For the other table in the example (alltypestiny) only the ID field matters that here is an int and contains values from zero to ten.

> Incorrect content of array when IN operator is in the filter
> ------------------------------------------------------------
>
>                 Key: HIVE-26311
>                 URL: https://issues.apache.org/jira/browse/HIVE-26311
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Gabor Kaszab
>            Priority: Major
>              Labels: correctness
>         Attachments: arrays.parq
>
>
> select id, arr1, arr2 from functional_parquet.complextypes_arrays where id % 2 = 1 and id = 5
> {code:java}
> +-----+---------------+---------------------------------------+
> | id  |     arr1      |                 arr2                  |
> +-----+---------------+---------------------------------------+
> | 5   | [10,null,12]  | ["ten","eleven","twelve","thirteen"]  |
> +-----+---------------+---------------------------------------+{code}
> select id, arr1, arr2 from functional_parquet.complextypes_arrays where id % 2 = 1 *and id in (select id from functional_parquet.alltypestiny)* and id = 5;
> {code:java}
> +-----+-------------+---------------------------------------+
> | id  |    arr1     |                 arr2                  |
> +-----+-------------+---------------------------------------+
> | 5   | [10,10,12]  | ["ten","eleven","twelve","thirteen"]  |
> +-----+-------------+---------------------------------------+ {code}
> Note, the first (and correct) example returns 10, null and 12 as the items of an array while the second query for some reaon shows 10 instead of the null value. The only difference between the 2 examples is that in the second I added an extra filter (that in fact doesn't filter out anything as functional_parquet.alltypestiny's ID contains numbers from zero to ten)
>  



--
This message was sent by Atlassian Jira
(v8.20.7#820007)