Skip to content
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

Database Prefixes are Case-Sensitive #333

Open
baumandm opened this issue Nov 15, 2024 · 0 comments
Open

Database Prefixes are Case-Sensitive #333

baumandm opened this issue Nov 15, 2024 · 0 comments

Comments

@baumandm
Copy link

Describe the bug
The get_database() and get_table() methods are case-sensitive when using a HMS with a prefix.

Hive Metastore Directly, no prefix

When connecting directly to the Hive Metastore via Thrift, everything works as expected. Running get_database() for each of these scenarios:

my_database: Success 👍
MY_DATABASE: Success 👍
my_database_does_not_exist: NoSuchObjectException(message='my_database_does_not_exist') 👍
MY_DATABASE_DOES_NOT_EXIST: NoSuchObjectException(message='MY_DATABASE_DOES_NOT_EXIST') 👍

Waggle Dance with a Prefix

However, when connecting to Waggle Dance and adding a prefix, it becomes case-sensitive:

  • prefixed_my_database: Success 👍
  • PREFIXED_MY_DATABASE: NoSuchObjectException(message='prefixed_my_database')"
  • prefixed_my_database_does_not_exist: NoSuchObjectException(message='my_database_does_not_exist')" 👍
  • PREFIXED_MY_DATABASE_DOES_NOT_EXIST: NoSuchObjectException(message='prefixed_my_database_does_not_exist')" 👍

Note, the NoSuchObjectException message differs in the last two scenarios; one contains the prefix and the other does not. This suggests that the lowercase version matched the prefix config, but then discovered that the database doesn't exist. Whereas the ALL CAPS version didn't match the prefix config, and attempted the entire database name, which also doesn't exist.

The same behavior occurs with get_table(), but only the database name is case-sensitive

To Reproduce
Waggle Dance configured with a prefixed_ prefix for the HMS.

Expected behavior
Database names should be case-insensitive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant