gatorsmile commented on a change in pull request #24780:
[SPARK-26388][SQL][WIP]_implement_hive_ddl_alter_table_replace_columns
URL: https://github.com/apache/spark/pull/24780#discussion_r290810958
##########
File path:
sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4
##########
@@ -115,6 +115,8 @@ statement
(identifier | FOR COLUMNS identifierSeq | FOR ALL COLUMNS)? #analyze
| ALTER TABLE tableIdentifier
ADD COLUMNS '(' columns=colTypeList ')'
#addTableColumns
+ | ALTER TABLE tableIdentifier
+ REPLACE COLUMNS '(' columns=colTypeList ')'
#replaceTableColumns
Review comment:
Let me give a typical scenario. For an existing table, if we drop the column
`col1`, the data will not be visible to the end users. This is expected.
However, if we add `col1` back, the previous values of the column `col1` should
not be visible to the end users too. This is how the other database systems
work. What is your thought?
----------------------------------------------------------------
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]