You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2022/10/24 09:26:18 UTC
[GitHub] [hudi] xiarixiaoyao commented on pull request #7045: [HUDI-5083]Fixed a bug when schema evolution
xiarixiaoyao commented on PR #7045:
URL: https://github.com/apache/hudi/pull/7045#issuecomment-1288722652
@shenshengli
Thank you for your contribution. pls add some UT
maybe you can add fllow codes , after line 293 in TestSpark3DDL
```
// drop + rename + insert
spark.sql(s"alter table $tableName drop column col6")
spark.sql(s"alter table $tableName rename column col5 to col6")
spark.sql(
s"""
| insert into $tableName values
| (1,3,1,11,100001,'101.01',1001.0001,100009.0001,'aaaaaa','2021-12-25 12:01:01',true,'a01','2021-12-25'),
| (11,3,1,11,100001,'101.01',1001.0001,100011.0001,'aaaaaa','2021-12-25 12:01:01',true,'a01','2021-12-25'),
| (6,6,5,15,100005,'105.05',1005.0005,100007.0005,'aaaaaa','2021-12-26 12:05:05',false,'a05','2021-12-26')
|""".stripMargin)
checkAnswer(spark.sql(s"select col6 from $tableName where id = 1 or id = 6 or id = 11 order by id").collect())(
Seq("aaaaaa"),
Seq("aaaaaa"),
Seq("aaaaaa")
)
```
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org