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/25 03:50:37 UTC

[GitHub] [hudi] shenshengli commented on pull request #7045: [HUDI-5083]Fixed a bug when schema evolution

shenshengli commented on PR #7045:
URL: https://github.com/apache/hudi/pull/7045#issuecomment-1289939687

   > @shenshengli 感谢您的贡献。请添加一些 UT 也许你可以添加流代码,在 TestSpark3DDL​​ 的第 293 行之后
   > 
   > ```
   >           // 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")
   >           )
   > ```
   
   ok


-- 
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