imback82 commented on issue #27482: [WIP][SPARK-30613][SQL] Support Hive style REPLACE COLUMNS syntax URL: https://github.com/apache/spark/pull/27482#issuecomment-583222213 @cloud-fan This is WIP, but I have a couple of questions. `REPLACE COLUMNS` needs to drop all the existing columns, so I am creating `Seq[TableChange]` which has `DeleteColumn`s followed by `AddColumn`s. 1) Can we assume that `TableCatalog.alterTable()` would apply the changes in the given order? (this is not documented). 2) Since it needs to drop all the existing columns, we need to look up the table before creating `AlterTable` logical plan. What I currently have is to call `loadTable` in `ResolveCatalogs`, which may not be ideal since we will do two look ups (another in `ResolveTables`). Another way is to register a callback to `AlterTable` which can be called after table is resolved. What do you think?
---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
