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

Jing Zhang updated HUDI-6828:
-----------------------------
    Description: 
After Insert overwrite into a non-empty partition/table with empty datasets, 
the subsequent query results are incorrect
For example, current dataset of  partition dt=2021-07-17 is 

||id||name||dt||
|1|'a'|'2021-07-17'|
 
Using the following SQL to overwrite partition dt=2021-07-17

{code:java}
insert overwrite table targetT partition(dt='2021-07-17') select id, name, 
price from sourceT where  dt=2021-07-17 and product='test'
{code}
If the input dataset is empty. We expect after insert overwrite, the partition 
of dt=2021-07-17 is empty.
However, the query result is still the old data.


  was:
After Insert overwrite into a non-empty partition/table with empty datasets, 
the subsequent query results are incorrect
For example, current dataset of  partition dt=2021-07-17 is 

||id||name||dt||
|1|'a'|'2021-07-17'|
 
Using the following SQL to overwrite partition dt=2021-07-17

{code:java}
insert overwrite table $target partition(dt='2021-07-17') select id, name, 
price from sourceA where  dt=2021-07-17 and product='test'
{code}
If the input dataset is empty. We expect after insert overwrite, the partition 
of dt=2021-07-17 is empty.
However, the query result is still the old data.



> After Insert overwrite into a non-empty partition/table with empty datasets, 
> the subsequent query results are incorrect
> -----------------------------------------------------------------------------------------------------------------------
>
>                 Key: HUDI-6828
>                 URL: https://issues.apache.org/jira/browse/HUDI-6828
>             Project: Apache Hudi
>          Issue Type: Bug
>            Reporter: Jing Zhang
>            Priority: Major
>
> After Insert overwrite into a non-empty partition/table with empty datasets, 
> the subsequent query results are incorrect
> For example, current dataset of  partition dt=2021-07-17 is 
> ||id||name||dt||
> |1|'a'|'2021-07-17'|
>  
> Using the following SQL to overwrite partition dt=2021-07-17
> {code:java}
> insert overwrite table targetT partition(dt='2021-07-17') select id, name, 
> price from sourceT where  dt=2021-07-17 and product='test'
> {code}
> If the input dataset is empty. We expect after insert overwrite, the 
> partition of dt=2021-07-17 is empty.
> However, the query result is still the old data.



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

Reply via email to