jonvex commented on code in PR #12422:
URL: https://github.com/apache/hudi/pull/12422#discussion_r1870126762
##########
hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/spark/sql/hudi/dml/TestPartialUpdateForMergeInto.scala:
##########
@@ -66,6 +64,17 @@ class TestPartialUpdateForMergeInto extends
HoodieSparkSqlTestBase {
testPartialUpdateWithInserts("mor", "parquet")
}
+ test("Test partial update with schema on read enabled") {
Review Comment:
To test enum schema, I used TestHoodieFileGroupReaderOnHive to generate a
table with an enum column. Then I copied the table to my tmp dir. Then I ran
the spark commands:
```
sparkSession.sql("create table my_table using HUDI location
'/tmp/myTable/'");
sparkSession.sql("select * from my_table").show(5,false);
sparkSession.sql("merge into my_table as target using (select
'92b7d667-cc77-4462-9c05-fcd809ab3aec' as _row_key, 0.51 as begin_lat, 0 as
timestamp) source on source._row_key = target._row_key when matched then update
set begin_lat = source.begin_lat");
```
And this triggered the enum error:
<img width="1665" alt="image"
src="https://github.com/user-attachments/assets/bec1a8de-75d7-426e-97db-f093bb28b1bc">
But I had to put in a fix to use table schema resolver to get the schema
because fullSchema is just a spark schema converted.
--
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]