You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Hankó Gergely (Jira)" <ji...@apache.org> on 2022/09/12 08:34:00 UTC

[jira] [Commented] (HIVE-25848) Empty result for structs in point lookup optimization with vectorization on

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

Hankó Gergely commented on HIVE-25848:
--------------------------------------

There's another way to reproduce the issue:
{code:java}
set hive.fetch.task.conversion=none;
set hive.optimize.point.lookup=false;
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(UDFToDouble(y),UDFToDouble(m)) IN (struct(UDFToDouble(year(date_sub(DATE'2022-09-11', 4))),UDFToDouble(month(date_sub(DATE'2022-09-11', 4)))), struct(UDFToDouble(year(date_sub(DATE'2022-09-11', 10))),UDFToDouble(month(date_sub(DATE'2022-09-11', 10)))))); {code}
Turning vectorization off yields a good result.

I think this means that the issue is not with point lookup optimization but the handling of "struct in (struct, ...)" filter when vectorization is on.

> Empty result for structs in point lookup optimization with vectorization on
> ---------------------------------------------------------------------------
>
>                 Key: HIVE-25848
>                 URL: https://issues.apache.org/jira/browse/HIVE-25848
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Ádám Szita
>            Priority: Major
>
> Repro steps:
> {code:java}
> set hive.fetch.task.conversion=none;
> create table test (a string) partitioned by (y string, m string);
> insert into test values ('aa', 2022, 1);
> select * from test where (y=year(date_sub(current_date,4)) and m=month(date_sub(current_date,4))) or (y=year(date_sub(current_date,10)) and m=month(date_sub(current_date,10)) );
> --gives empty result{code}
> Turning either of the feature below off yields to good result (1 row expected):
> {code:java}
> set hive.optimize.point.lookup=false;
> set hive.cbo.enable=false;
> set hive.vectorized.execution.enabled=false;
> {code}
> Expected good result is:
> {code}
> +---------+---------+---------+
> | test.a  | test.y  | test.m  |
> +---------+---------+---------+
> | aa      | 2022    | 1       |
> +---------+---------+---------+ {code}



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