xiarixiaoyao commented on issue #5519: URL: https://github.com/apache/hudi/issues/5519#issuecomment-1124442163
@neerajpadarthi @JoshuaZhuCN @gy19951022 pls try to use "set hoodie.schema.on.read.enable=true" to enable schem evolution. step1: start spark-sql and set hoodie.schema.on.read.enable=true # Spark SQL for spark 3.1.x spark-sql --packages org.apache.hudi:hudi-spark3.1.2-bundle_2.12:0.11.1,org.apache.spark:spark-avro_2.12:3.1.2 \ --conf 'spark.serializer=org.apache.spark.serializer.KryoSerializer' \ --conf 'spark.sql.extensions=org.apache.spark.sql.hudi.HoodieSparkSessionExtension' step2: use alter statement to alter hoodie schema. : alter table $tableName alter column col6 type long then your can play with the hoodie table which has a new schema. your can learn more about schema evoultion on https://hudi.apache.org/docs/schema_evolution more example can be find in org.apache.spark.sql.hudi.TestSpark3DDL.scala. thanks -- 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]
