Maplejw opened a new issue, #13573:
URL: https://github.com/apache/hudi/issues/13573

   **Describe the problem you faced**
   
   I set hoodie.write.record.merge.mode=COMMIT_TIME_ORDERING, and Use spark sql 
insert into table, the same key about record not merge order by commit time
   
   <img width="1524" height="169" alt="Image" 
src="https://github.com/user-attachments/assets/130a6f1a-d629-48f8-b837-ff4b82b8800a";
 />
   
   
   **To Reproduce**
   
   I use spark-sql
   
   ```
   export SPARK_VERSION=3.4
   spark-sql --packages 
org.apache.hudi:hudi-spark$SPARK_VERSION-bundle_2.12:1.0.2 \
   --conf 'spark.serializer=org.apache.spark.serializer.KryoSerializer' \
   --conf 
'spark.sql.extensions=org.apache.spark.sql.hudi.HoodieSparkSessionExtension' \
   --conf 
'spark.sql.catalog.spark_catalog=org.apache.spark.sql.hudi.catalog.HoodieCatalog'
 \
   --conf 'spark.kryo.registrator=org.apache.spark.HoodieSparkKryoRegistrar'
   ```
   
   Create table as below:
   ```
   CREATE TABLE ad_dw.revenue_test_4(
     `id` int,
     `revenue` double,
     `proc_date` int)
   USING hudi
   PARTITIONED BY (`proc_date`)
   LOCATION
     'gs://igg-rd8-data-project/ad/dw/dwd/revenue_test_4'
   TBLPROPERTIES (
     'hoodie.table.base.file.format'='PARQUET',
     'type' = 'cow',
     'primaryKey'='id',
     'hoodie.write.record.merge.mode'='COMMIT_TIME_ORDERING');
   ```
   And insert into 
   
   ```
   insert into  ad_dw.revenue_test_4 select 1,0.01,20250714;
   
   ```
   
   And insert into again
   
   ```
   insert into  ad_dw.revenue_test_4 select 1,0.02,20250714;
   
   ```
   
   
   **Expected behavior**
   
   ```
   select * from ad_dw.revenue_test_4 where proc_date=20250714;
   ```
   
   should be one record about revenue is  0.02,but two record are selected.
   
   
   **Environment Description**
   
   * Hudi version : 1.0.2
   
   * Spark version : 3.4.4
   
   * Hive version : 2.3.6
   
   * Hadoop version : 2.9.2
   
   * Storage (HDFS/S3/GCS..) : GCS
   
   * Running on Docker? (yes/no) : noe
   
   


-- 
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]

Reply via email to