fix(sqlglot): use Athena dialect for awsathena parsing (#36747)

This commit is contained in:
ankitajhanwar2001
2026-01-12 23:36:46 +05:30
committed by GitHub
parent 911d72c957
commit d8f7ae83ee
2 changed files with 15 additions and 1 deletions

View File

@@ -2891,6 +2891,20 @@ def test_singlestore_engine_mapping():
assert "COUNT(*)" in formatted
def test_awsathena_engine_mapping():
"""
Test the `awsathena` dialect is properly mapped to ATHENA instead of PRESTO.
"""
sql = (
"USING EXTERNAL FUNCTION my_func(x INT) RETURNS INT LAMBDA 'lambda_name' "
"SELECT my_func(id) FROM my_table"
)
statement = SQLStatement(sql, engine="awsathena")
# Should parse without errors using Athena dialect
statement.format()
def test_remove_quotes() -> None:
"""
Test the `remove_quotes` helper function.