Implementation Questions for improving Hive Alter parsing #5923
-
I'm taking a crack at improving support for some of the quirks of Hive's alter commands and was hoping for some feedback on what the preferred approach is for solving a few problems. Rather than ALTER TABLE table_name [PARTITION partition_spec] CHANGE [COLUMN] col_old_name col_new_name column_type
[COMMENT col_comment] [FIRST|AFTER column_name] [CASCADE|RESTRICT];
ALTER TABLE table_name CHANGE COLUMN column_name column_name data_type CONSTRAINT constraint_name constraint_spec which means that every |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hey @tsamaras.
I'd extend
I'm not sure I understand; is this a valid Hive statement? I.e., a rename operation without a data type.. based on the syntax spec above, it appears that the data type is required, no? In any case, if you're planning to open a PR for this, just make sure that this change does not affect Spark and Databricks, unless for making them strictly better (i.e., no regressions / behavior change if possible, please). |
Beta Was this translation helpful? Give feedback.
Hey @tsamaras.
I'd extend
AlterColumn.arg_types
to include a new key for the new name, thus encoding the "rename" operation.I'm not sure I understand; is this a valid Hive statement? I.e., a rename operation without a data type.. based on the syntax spec above, it appears that the data type is required, no?
In any case, if you're planning to open a …