dropbox / dropbox/PyHive

can not raise NoSuchTableError for has_table method

Open
#302 4 comments 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
1.7k
Forks
545
PR merge metrics
No merged PRs in 30d

Description

regex = r"Table\ \'.*{}\'\ does\ not\ exist".format(re.escape(table_name))

if msg and re.search(regex, msg):
raise exc.NoSuchTableError(table_name)
else:
raise
with presto and Oracle, Oracle has table name with upper case, but table name in error message which return from presto is with lower case, so re.search method will return None, then has_table method will exit with uncaught exception.

maybe we should use re.IGNORECASE in re.search method

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.