xiarixiaoyao commented on issue #7040:
URL: https://github.com/apache/hudi/issues/7040#issuecomment-1288359886

   already fix local, let me  raise a pr
             spark.sql("set hoodie.schema.on.read.enable=true")
             spark.sql("""create table ddl_test_t2 (
                         |  col1 string,
                         |  col2 string,
                         |  col3 string,
                         |  ts bigint
                         |) using hudi
                         |tblproperties (
                         |  type = 'mor',
                         |  primaryKey = 'col1',
                         |  preCombineField = 'ts'
                         |)""".stripMargin)
   
             spark.sql("insert into ddl_test_t2 
values('1','col2','col3',1),('2','col2','col3',2),('3','col2','col3',3)")
             spark.sql("""ALTER TABLE ddl_test_t2 DROP COLUMN col3""")
             spark.sql("ALTER TABLE ddl_test_t2 RENAME COLUMN col2 to col3")
             spark.sql("insert into ddl_test_t2 values('4','col2',4)")
             spark.sql("select col3 from ddl_test_t2").show(false)
   
   +----+
   |col3|
   +----+
   |col2|
   |col2|
   |col2|
   |col2|
   +----+


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

Reply via email to