xiaoshao opened a new issue, #6969:
URL: https://github.com/apache/hudi/issues/6969
**To Reproduce**
Steps to reproduce the behavior:
1. spark version: spark-3.2.2-bin-hadoop3.2
2. hive version apache-hive-3.1.3-bin
3. OS: mac
4. start spark sql as `./spark-sql --jars
../../hudi-spark3-bundle_2.12-0.11.1.jar \
--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'`
5. create table `CREATE TABLE mor1(
uuid string, -- 要么给定uuid,要么PRIMARY KEY(field) NOT ENFORCED指定主键,否则会报错
name string,
age INT,
ts , -- ts是必须字段,在前面有介绍过,用来决定数据的新旧的
`partition` string
) using hudi
PARTITIONED BY (`partition`)
options (
primaryKey='uuid',
'path' = 'hdfs://localhost:9000/spark_hudi/hudi/mor1',
);`
6. add data `INSERT INTO mor1 VALUES
('id1','Danny',23, '1970-01-01 00:00:01','par1'),
('id2','Stephen',33, '1970-01-01 00:00:02','par1'),
('id3','Julian',53, '1970-01-01 00:00:03','par2'),
('id4','Fabian',31, '1970-01-01 00:00:04','par2'),
('id5','Sophia',18, '1970-01-01 00:00:05','par3'),
('id6','Emma',20, '1970-01-01 00:00:06','par3'),
('id7','Bob',44, '1970-01-01 00:00:07','par4'),
('id8','Han',56, '1970-01-01 00:00:08','par4');`
7. update data `INSERT INTO mor1 VALUES
('id1','Danny',27, '1970-01-01 00:00:01','par1'),`
I found that hudi generates several parquet files in the partition `par1`,
not one parquet file and one log file.
**Expected behavior**
A clear and concise description of what you expected to happen.
**Environment Description**
* Hudi version : 0.11.1
* Spark version : spark-3.2.2
* Hive version : apache-hive-3.1.3-bin
* Hadoop version : hadoop-3.3.3
* Storage hdfs
* Running on Docker? 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]