PyHive
PyHive copied to clipboard
can not raise NoSuchTableError for has_table method
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