You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/02/07 03:52:00 UTC

[GitHub] [spark] imback82 commented on issue #27482: [WIP][SPARK-30613][SQL] Support Hive style REPLACE COLUMNS syntax

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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org