You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The same happens upon using strftime in the select. I was able to produce AssertionError: Error col: strftime using the test set of EHRSQL.
With the query
select strftime('%j',admissions.dischtime) - strftime('%j',admissions.admittime) from admissions whereadmissions.subject_id=85169andadmissions.dischtimeis not nullorder byadmissions.admittimeasclimit1
This is somewhat more niche as strftime is SQLite syntax, but since Spider uses SQLite I was a bit surprised that this error occurred.
I adapted the whole test suite to use sqlglot in my fork now, so I can use strftime and projection aliases as well. Maybe it's also interesting for you.
Problem:
Adding an alias to a projection in the SELECT clause is a pretty standard syntax:
However, the evaluator breaks when trying to parse this kind of query.
Reproduce:
I went to the gold.txt file and changed the 3rd row from
to
When running
parse_sql
crashed with:thrown from
parse_col
when searching for the the not existing 'as' column in the schema.The text was updated successfully, but these errors were encountered: