feat(ingest): bump sqlglot parser (#9155)

This commit is contained in:
Harshal Sheth 2023-11-01 00:12:52 -07:00 committed by GitHub
parent d231497603
commit 55f14530a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 2 deletions

View File

@ -108,7 +108,7 @@ usage_common = {
sqlglot_lib = { sqlglot_lib = {
# Using an Acryl fork of sqlglot. # Using an Acryl fork of sqlglot.
# https://github.com/tobymao/sqlglot/compare/main...hsheth2:sqlglot:hsheth?expand=1 # https://github.com/tobymao/sqlglot/compare/main...hsheth2:sqlglot:hsheth?expand=1
"acryl-sqlglot==18.17.1.dev16", "acryl-sqlglot==19.0.2.dev10",
} }
sql_common = ( sql_common = (

View File

@ -676,9 +676,13 @@ create table demo_user.test_lineage2 as
def test_teradata_strange_operators(): def test_teradata_strange_operators():
# This is a test for the following operators:
# - `SEL` (select)
# - `EQ` (equals)
# - `MINUS` (except)
assert_sql_result( assert_sql_result(
""" """
select col1, col2 from dbc.table1 sel col1, col2 from dbc.table1
where col1 eq 'value1' where col1 eq 'value1'
minus minus
select col1, col2 from dbc.table2 select col1, col2 from dbc.table2
@ -689,6 +693,19 @@ select col1, col2 from dbc.table2
) )
@pytest.mark.skip("sqlglot doesn't support this cast syntax yet")
def test_teradata_cast_syntax():
assert_sql_result(
"""
SELECT my_table.date_col MONTH(4) AS month_col
FROM my_table
""",
dialect="teradata",
default_schema="dbc",
expected_file=RESOURCE_DIR / "test_teradata_cast_syntax.json",
)
def test_snowflake_update_hardcoded(): def test_snowflake_update_hardcoded():
assert_sql_result( assert_sql_result(
""" """