Skip to content

Commit ad932df

Browse files
Fix condition of has_table method in SQLAlchemy (fix #49)
1 parent 0d76a07 commit ad932df

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)