You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "GuangMing Lu (Jira)" <ji...@apache.org> on 2022/09/01 07:16:00 UTC
[jira] [Updated] (HIVE-26505) Case When Some result data is lost when there are common column conditions and partitioned column conditions
[ https://issues.apache.org/jira/browse/HIVE-26505?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
GuangMing Lu updated HIVE-26505:
--------------------------------
Description:
{code:java}
create table test0831 (id string) partitioned by (cp string);
insert into test0831 values ('a', '2022-08-23'),('c', '2022-08-23'),('d', '2022-08-23');
insert into test0831 values ('a', '2022-08-24'),('b', '2022-08-24');
select * from test0831;
+-------------+--------------+
| test0831.id | test0831.cp |
+-------------+--------------+
| a | 2022-08-23 |
| b | 2022-08-23 |
| a | 2022-08-23 |
| c | 2022-08-24 |
| d | 2022-08-24 |
+-------------+--------------+
select * from test0831 where (case when id='a' and cp='2022-08-23' then 1 else 0 end)=0;
+--------------+--------------+
| test0830.id | test0830.cp |
+--------------+--------------+
| a | 2022-08-24 |
| b | 2022-08-24 |
+--------------+--------------+
{code}
was:
{code:java}
create table test0831 (id string) partitioned by (cp string);
insert into test0831 values ('a', '2022-08-23'),('c', '2022-08-23'),('d', '2022-08-23');
insert into test0831 values ('a', '2022-08-24'),('b', '2022-08-24');
select * from test0831;
+-------------+--------------+
| test0831.id | test0831.cp |
+-------------+--------------+
| a | 2022-08-23 |
| b | 2022-08-23 |
| a | 2022-08-23 |
| c | 2022-08-24 |
| d | 2022-08-24 |
+-------------+--------------+
select * from test0831 where (case when id='a' and cp='2022-08-24' then 1 else 0 end)=0;
+--------------+--------------+
| test0830.id | test0830.cp |
+--------------+--------------+
| a | 2022-08-23 |
| c | 2022-08-23 |
| d | 2022-08-23 |
+--------------+--------------+{code}
> Case When Some result data is lost when there are common column conditions and partitioned column conditions
> -------------------------------------------------------------------------------------------------------------
>
> Key: HIVE-26505
> URL: https://issues.apache.org/jira/browse/HIVE-26505
> Project: Hive
> Issue Type: Bug
> Components: Hive
> Affects Versions: 3.1.0, 4.0.0-alpha-1
> Reporter: GuangMing Lu
> Priority: Critical
>
> {code:java}
> create table test0831 (id string) partitioned by (cp string);
> insert into test0831 values ('a', '2022-08-23'),('c', '2022-08-23'),('d', '2022-08-23');
> insert into test0831 values ('a', '2022-08-24'),('b', '2022-08-24');
> select * from test0831;
> +-------------+--------------+
> | test0831.id | test0831.cp |
> +-------------+--------------+
> | a | 2022-08-23 |
> | b | 2022-08-23 |
> | a | 2022-08-23 |
> | c | 2022-08-24 |
> | d | 2022-08-24 |
> +-------------+--------------+
> select * from test0831 where (case when id='a' and cp='2022-08-23' then 1 else 0 end)=0;
> +--------------+--------------+
> | test0830.id | test0830.cp |
> +--------------+--------------+
> | a | 2022-08-24 |
> | b | 2022-08-24 |
> +--------------+--------------+
> {code}
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)