Skip to content

Commit

Permalink
add compatibility with sqlalchemy 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mdeshmu committed Jun 28, 2023
1 parent 183e9e2 commit fae253b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyhive/tests/test_sqlalchemy_trino.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def test_reserved_words(self, engine, connection):
"""Trino uses double quotes, not backticks"""
# Use keywords for the table/column name
fake_table = Table('select', MetaData(), Column('current_timestamp', String))
query = str(fake_table.select().where(fake_table.c.current_timestamp == 'a'))
query = str(fake_table.select().where(fake_table.c.current_timestamp == 'a').compile(engine))
self.assertIn('"select"', query)
self.assertIn('"current_timestamp"', query)
self.assertNotIn('`select`', query)
Expand Down

0 comments on commit fae253b

Please sign in to comment.