imback82 commented on pull request #32542: URL: https://github.com/apache/spark/pull/32542#issuecomment-843702839
> 1. Have a single `AlterTable` logical plan, which has 2 members: `table: LogicalPlan` and `changes: Seq[TableChange]`. We also have a single `AlterTableExec` physical plan. Do you mean generating `AlterTable` in `AstBuilder`? One issue with this approach is for v1 commands (`ResolveSessionCatalog`) because there could be an ambiguity b/w `ALTER TABLE ADD COLUMN` and `ALTER TABLE REPLACE COLUMN`. That's why this PR created different `AlterTableXXX` with a base `AlterTable`. > 2. Have various `AlterTableXXX` logical plans, which are similar to the existing `AlterTableXXXStatement`. Update the code that resolve/check `Seq[TableChange]` to deal with `AlterTableXXX` logical plans instead. We still have a single `AlterTableExec` physical plan, the planner will convert all `AlterTableXXX` logical plans to it. I can try this approach and create a separate PR for comparison. Let me know if I misunderstood 1) option above. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
