-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle listTables for non-existing schema in IcebergNativeMetadata #24612
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although it feels a bit weird, but after doing some tests I found that Iceberg lib's behavior towards listTables
for non-existing schema is to return an empty list on the Hive catalog and throw exceptions on the Hadoop catalog.
So do you think it makes sense to keep consistency with Iceberg lib, and fix the problem you described in the logic of the method InformationSchemaMetadata.calculatePrefixesWithSchemaName(...)
? As I understand, we could filter the schema specified by the schema column constraint
in the results of metadata.listSchemaNames(...)
. In this way, we will get an empty set for non-existent schema. Or is there anything else we need to consider?
Thanks for your review @hantangwangd as I checked since the non-existing schema is part of the predicate, its part of the domain and returning schema in here which is why |
Bring for discussing, should we refactor the code like follows? Although this always executes
|
@jaystarshot Could you please also share your suggestion around handling non-existing schemas here? |
Description
Handle listTables for non-existing schema in IcebergNativeMetadata
Motivation and Context
IcebergHiveMetadata returns an empty list instead of exception when the non-existing schema is queried. But currently in IcebergNativeMetadata
Here iceberg is configured as a
Hadoop
(Native) catalog of Iceberg.Impact
Maintain same behaviour in Iceberg Native catalog as Iceberg Hive catalog.
After Change -
Test Plan
Test added
Contributor checklist
Release Notes