Skip to content

Conversation

@marton-bod
Copy link
Collaborator

@marton-bod marton-bod commented Feb 1, 2021

There are a couple of scenarios where the Hive DDL command DROP TABLE can produce an error unnecessarily.

  1. Currently on Hive4, DROP TABLE can result in a FileNotFoundException exception, because based on Hive2/Hive3 behaviour, the current assumption is that the HiveIcebergMetaHook has to clean up the metadata files after the Hive drop table has completed. However, in Hive4, if external.table.purge=TRUE is set, Hive will wipe the metadata folder as well.
  2. When creating a Hive table on top of an existing table in a different catalog, if we drop the table in Hive but the underlying table does not exist anymore (e.g. in the HadoopCatalog), we'd also end up with an exception.

Extended some of the unit tests with explicit DROP TABLE commands in the end to test for the whole flow of CREATE, INSERT, DROP (which currently triggers problem # 1 on Hive4).

@github-actions github-actions bot added the MR label Feb 1, 2021
@marton-bod
Copy link
Collaborator Author

@pvary Can you please take a look? Thanks!

Copy link
Contributor

@pvary pvary left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a minor comment, but LGTM

@marton-bod
Copy link
Collaborator Author

Thanks for your review @pvary!

@pvary pvary merged commit 469f6c3 into apache:master Feb 5, 2021
@pvary
Copy link
Contributor

pvary commented Feb 5, 2021

Thanks for the fix @marton-bod

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants