bithw1 opened a new issue, #11996:
URL: https://github.com/apache/hudi/issues/11996
Hi,
I am using Hudi 0.15.0,
In the spark-sql cli, I do the following things. I insert two records with
two insert clause, I think there will be two records(with same id),but only one
is left there, looks Hudi does upsert instead of insert here,
The default behavior of insert into is insert, so I don't understand how
upsert happens here
```
CREATE TABLE IF NOT EXISTS hudi_cow_19 (
a INT,
b INT,
c INT
)
USING hudi
tblproperties(
type='cow',
primaryKey='a',
hoodie.datasource.write.precombine.field='c',
hoodie.merge.allow.duplicate.on.inserts='true'
);
insert into hudi_cow_19 select 1,1,1; --- insert the first record
select * from hudi_cow_19;
insert into hudi_cow_19 select 1,10,10; --- insert the second record with
same key as the first one
select * from hudi_cow_19;
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]