quintoandar / hive-metastore-client

A client for connecting and running DDLs on hive metastore.
Apache License 2.0
52 stars 15 forks source link

[DAE-133] Removing types-comparison when dropping a column #56

Closed felipemiquelim closed 3 years ago

felipemiquelim commented 3 years ago

Why? :open_book:

When running an ALTER TABLE Hive stores the types of columns from table schema in sequential order to enforce the same types after the ALTER TABLE. However when performing our abstraction of DROP COLUMN, the types may change, since the schema will definitely change.

Currently, if we try to drop a column that changes this 'types order', the following error returns:

thrift_files.libraries.thrift_hive_metastore_client.ttypes.InvalidOperationException: InvalidOperationException(message='The following columns have types incompatible with the existing columns in their respective positions :\ncolumn_name')

What? :wrench:

Type of change :file_cabinet:

How everything was tested? :straight_ruler:

Ran the config command both alone and together with the drop_columns_from_table and it only succeed in the same 'transaction'.

Checklist :memo:

sonarcloud[bot] commented 3 years ago

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication