clickhouse-sqlalchemy
clickhouse-sqlalchemy copied to clipboard
Collate is not generating a correct query
Describe the bug The collate sqlalchemy function is not correctly handled in the Clickhouse dialect
To Reproduce from sqlalchemy.sql.operators import collate
query.collate(asc("display_name"), "en"))
it generates the following query:
SELECT ... FROM test WHERE ... ORDER BY display_name ASC COLLATE en LIMIT 0, 300
Expected behavior
The correct query should be:
SELECT ... FROM test WHERE ... ORDER BY display_name ASC COLLATE 'en' LIMIT 0, 300
Also, using query.collate(asc("display_name"), "'en'"))
is not fixing
Do you have any suggestions? Versions 0.3.0