Skip to content

Commit 5f35c61

Browse files
Merge pull request #50 from laughingman7743/fix_condition_of_has_table_method_in_sqlalchemy
Fix condition of has_table method in SQLAlchemy (fix #49)
2 parents 0d76a07 + ad932df commit 5f35c61

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pyathena/sqlalchemy_athena.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ def get_table_names(self, connection, schema=None, **kw):
124124

125125
def has_table(self, connection, table_name, schema=None):
126126
try:
127-
self.get_columns(connection, table_name, schema)
128-
return True
127+
columns = self.get_columns(connection, table_name, schema)
128+
return True if columns else False
129129
except NoSuchTableError:
130130
return False
131131

0 commit comments

Comments
 (0)