jhchee opened a new issue, #8515:
URL: https://github.com/apache/hudi/issues/8515
**Describe the problem you faced**
Hi I wish to achieve explicit schema evolution via writing empty dataframe.
```
Dataset<Row> empty = spark.createDataFrame(new ArrayList<>(),
TargetSchema.SCHEMA);
empty.write()
.format("hudi")
.option(DataSourceWriteOptions.RECORDKEY_FIELD_OPT_KEY(),
"userId")
.option(DataSourceWriteOptions.PRECOMBINE_FIELD_OPT_KEY(),
"updatedAt")
.option(HoodieWriteConfig.TABLE_NAME, "table")
.mode(SaveMode.Append)
```
However, only the metadata fields (commit_time, commit_seq_no, etc) are
generated.
**To Reproduce**
Steps to reproduce the behavior:
1. Write empty dataframe with defined schema.
**Expected behavior**
Table will be populated with the columns in the defined schema.
**Environment Description**
* Hudi version : 0.12.2
* Spark version : 3.3.1
* 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]