kbendick commented on issue #5548: URL: https://github.com/apache/iceberg/issues/5548#issuecomment-1217099105
For the schema evolution, normally you should run the `ALTER TABLE ... ADD COLUMN` commands: https://iceberg.apache.org/docs/latest/spark-ddl/#alter-table--add-column If you want to have the schema updated during `merge into` without specifying it, you can use the `.option("mergeSchema", true)` when writing to the table. However, I'm not sure if that option is possible to use from SQL at the moment. We might need to capture the comments and apply them as hints (which isn't supported at this time afaik): https://spark.apache.org/docs/latest/sql-ref-syntax-qry-select-hints.html#hints For writes that can use the dataframe writer (which doesn't include `MERGE INTO` unfortunately), you could use the `mergeSchema` option and get the behavior you want. If you're interested in possibly getting the `mergeSchema` option as a hint, I would suggest opening a new feature request issue to request just that (linking to this one if you'd like). I'm not sure if it can be done, but as a feature request issue with a title like "Support Hints for Dataframe Writer Options Like 'mergeSchema'" and then explain your MERGE INTO case, that would be helpful. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
