mirror of
https://github.com/NousResearch/atropos.git
synced 2026-04-19 12:57:58 +00:00
Quote fix
This commit is contained in:
parent
7d8123a526
commit
5a130a3a5b
1 changed files with 5 additions and 1 deletions
|
|
@ -12,6 +12,7 @@ from sql_executor import (
|
|||
create_table_from_wikisql,
|
||||
execute_sql,
|
||||
extract_boxed_sql,
|
||||
quote_identifiers_in_sql,
|
||||
results_match,
|
||||
)
|
||||
from tqdm.asyncio import tqdm_asyncio
|
||||
|
|
@ -191,8 +192,11 @@ class SQLQueryEnv(BaseEnv):
|
|||
except Exception:
|
||||
return -1.0, False
|
||||
|
||||
# Quote identifiers in gold SQL that need quoting (e.g., "State/territory")
|
||||
quoted_gold_sql = quote_identifiers_in_sql(gold_sql, header)
|
||||
|
||||
# Execute gold SQL
|
||||
gold_result = execute_sql(conn, gold_sql)
|
||||
gold_result = execute_sql(conn, quoted_gold_sql)
|
||||
if gold_result is None:
|
||||
conn.close()
|
||||
return -1.0, False
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue