-
Notifications
You must be signed in to change notification settings - Fork 79
Description
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.