xuzifu666 opened a new issue, #8123: URL: https://github.com/apache/hudi/issues/8123
**_Tips before filing an issue_** - Have you gone through our [FAQs](https://hudi.apache.org/learn/faq/)? - Join the mailing list to engage in conversations and get faster support at [email protected]. - If you have triaged this as a bug, then file an [issue](https://issues.apache.org/jira/projects/HUDI/issues) directly. **Describe the problem you faced** val incDF = Seq( HudiDataWithData(1, "lb", 24, "shu", 1646643195l), HudiDataWithData(2, "gy", 12, "shu", 1646643193l), HudiDataWithData(1, "cc", 22, "wei", 1646643193l), HudiDataWithData(2, "xy", 23, "wei", 1646643193l) ).toDF incDF.createOrReplaceTempView("inc_table") spark.sql( s""" |create table hudi_cow_pt_tbl ( | id int, | name string, | data int, | country string, | ts bigint |) using hudi |tblproperties ( | type = 'cow', | primaryKey = 'id', | preCombineField = 'ts' | ) |partitioned by (country) |location 'D:/tmp/hudi_data/hudi_merge_test01' |""".stripMargin) spark.sql( s""" |merge into hudi_cow_pt_tbl as target |using ( | select id, name, data, country, ts from inc_table |) source |on source.id = target.id |when matched and data < source.data then |update set data = source.data, ts = source.ts |when not matched then |insert * |""".stripMargin) but the table query is ------------ [20230308143540791,20230308143540791_0_0,1,country=wei,c0d7ce20-c40f-4064-8e9c-22d4dd2b1e2a-0_0-17-40_20230308145556437.parquet,1,cc,22,1646643193,wei] ------------ [20230308143540791,20230308143540791_0_1,2,country=wei,c0d7ce20-c40f-4064-8e9c-22d4dd2b1e2a-0_0-17-40_20230308145556437.parquet,2,xy,23,1646643193,wei] ------------ [20230308143540791,20230308143540791_1_0,2,country=shu,28617435-0f34-4c3f-a9e1-859611b68094-0_1-17-41_20230308145556437.parquet,2,gy,12,1646643193,shu] ------------ [20230308143540791,20230308143540791_1_1,1,country=shu,28617435-0f34-4c3f-a9e1-859611b68094-0_1-17-41_20230308145556437.parquet,1,lb,22,1646643194,shu] record which ts = 1646643195l had not be merged A clear and concise description of the problem. **To Reproduce** Steps to reproduce the behavior: 1. 2. 3. 4. **Expected behavior** A clear and concise description of what you expected to happen. **Environment Description** * Hudi version : * Spark version : * Hive version : * Hadoop version : * Storage (HDFS/S3/GCS..) : * Running on Docker? (yes/no) : **Additional context** Add any other context about the problem here. **Stacktrace** ```Add the stacktrace of the error.``` -- 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]
