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

zouxxyy updated HUDI-4704:
--------------------------
    Description: 
When hoodie.sql.bulk.insert.enable is enabled, executing insert overwrite will 
delete the table and then recreate a table, so time travel cannot be performed.

 
{code:java}
create table hudi_cow_test_tbl (
  id bigint,
  name string,
  ts bigint,
  dt string,
  hh string
) using hudi
tblproperties (
  type = 'cow',
  primaryKey = 'id',
  preCombineField = 'ts',
  'hoodie.sql.insert.mode' = 'non-strict',
  'hoodie.sql.bulk.insert.enable' = 'true'
);

insert into hudi_cow_test_tbl select 1, 'a1', 1001, '2021-12-09', '11';

insert overwrite hudi_cow_test_tbl select 3, 'a3', 1001, '2021-12-09', '11';

{code}

  was:
When hoodie.sql.bulk.insert.enable is enabled, executing insert overwrite will 
delete the table and then recreate a table, so time travel cannot be performed.

 

1. create table hudi_cow_test_tbl (
  id bigint,
  name string,
  ts bigint,
  dt string,
  hh string
) using hudi
tblproperties (
  type = 'cow',
  primaryKey = 'id',
  preCombineField = 'ts',
  'hoodie.sql.insert.mode' = 'non-strict',
  'hoodie.sql.bulk.insert.enable' = 'true'
);

2. insert into hudi_cow_test_tbl select 1, 'a1', 1001, '2021-12-09', '11';

3. insert overwrite hudi_cow_test_tbl select 3, 'a3', 1001, '2021-12-09', '11';


> bulk insert overwrite table will delete the table and then recreate a table
> ---------------------------------------------------------------------------
>
>                 Key: HUDI-4704
>                 URL: https://issues.apache.org/jira/browse/HUDI-4704
>             Project: Apache Hudi
>          Issue Type: Bug
>            Reporter: zouxxyy
>            Assignee: zouxxyy
>            Priority: Major
>
> When hoodie.sql.bulk.insert.enable is enabled, executing insert overwrite 
> will delete the table and then recreate a table, so time travel cannot be 
> performed.
>  
> {code:java}
> create table hudi_cow_test_tbl (
>   id bigint,
>   name string,
>   ts bigint,
>   dt string,
>   hh string
> ) using hudi
> tblproperties (
>   type = 'cow',
>   primaryKey = 'id',
>   preCombineField = 'ts',
>   'hoodie.sql.insert.mode' = 'non-strict',
>   'hoodie.sql.bulk.insert.enable' = 'true'
> );
> insert into hudi_cow_test_tbl select 1, 'a1', 1001, '2021-12-09', '11';
> insert overwrite hudi_cow_test_tbl select 3, 'a3', 1001, '2021-12-09', '11';
> {code}



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

Reply via email to