Problem:
Adding an alias to a projection in the SELECT clause is a pretty standard syntax:
SELECT count(*) AS table_size FROM Table
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
SELECT Country FROM AIRLINES WHERE Airline = "JetBlue Airways" flight_2
to
SELECT Country AS my_c FROM AIRLINES WHERE Airline = "JetBlue Airways" flight_2`
When running
python evaluation.py --gold evaluation_examples/gold.txt --pred evaluation_examples/predict.txt --db database --etype match --plug_value --table tables.json
parse_sql crashed with:
AssertionError: Error col: as
thrown from parse_col when searching for the the not existing 'as' column in the schema.
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_sqlcrashed with:thrown from
parse_colwhen searching for the the not existing 'as' column in the schema.