hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Shelukhin (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-16609) col='__HIVE_DEFAULT_PARTITION__' condition in select statement may produce wrong result
Date Tue, 09 May 2017 20:10:04 GMT

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

Sergey Shelukhin commented on HIVE-16609:
-----------------------------------------

-0.5 for now.
I don't think this is a valid query... as in, it should search for the literal string, as
it does. The correct way to select "invalid" values is "is null" and that has been fixed recently
if I remember correctly.
Users should not use the magic constant.

> col='__HIVE_DEFAULT_PARTITION__' condition in select statement may produce wrong result
> ---------------------------------------------------------------------------------------
>
>                 Key: HIVE-16609
>                 URL: https://issues.apache.org/jira/browse/HIVE-16609
>             Project: Hive
>          Issue Type: Bug
>          Components: Metastore
>            Reporter: Daniel Dai
>            Assignee: Daniel Dai
>         Attachments: HIVE-16609.1.patch, HIVE-16609.2.patch
>
>
> A variation of alter_partition_change_col.q produces wrong result:
> {code}
> SET hive.exec.dynamic.partition.mode = nonstrict;
> create table alter_partition_change_col0 (c1 string, c2 string);
> load data local inpath 'dec.txt' overwrite into table alter_partition_change_col0;
> create table alter_partition_change_col1 (c1 string, c2 string) partitioned by (p1 string
comment 'Column p1', p2 string comment 'Column p2');
> insert overwrite table alter_partition_change_col1 partition (p1, p2)
>   select c1, c2, 'abc', '123' from alter_partition_change_col0
>   union all
>   select c1, c2, cast(null as string), '123' from alter_partition_change_col0;
> select * from alter_partition_change_col1 where p1='__HIVE_DEFAULT_PARTITION__' or lower(p1)='a';
> {code}
> The "select" statement does not produce the rows containing "__HIVE_DEFAULT_PARTITION__".
> We need another condition containing a udf so the condition is not recognized by PartFilterExprUtil.makeExpressionTree
in ObjectStore. Looks like HIVE-11208 breaks it.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message