Skip to content

Commit

Permalink
feat(ingest): bump sqlglot parser (#9155)
Browse files Browse the repository at this point in the history
  • Loading branch information
hsheth2 authored Nov 1, 2023
1 parent d231497 commit 55f1453
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion metadata-ingestion/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
sqlglot_lib = {
# Using an Acryl fork of sqlglot.
# 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 = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -676,9 +676,13 @@ def test_teradata_default_normalization():


def test_teradata_strange_operators():
# This is a test for the following operators:
# - `SEL` (select)
# - `EQ` (equals)
# - `MINUS` (except)
assert_sql_result(
"""
select col1, col2 from dbc.table1
sel col1, col2 from dbc.table1
where col1 eq 'value1'
minus
select col1, col2 from dbc.table2
Expand All @@ -689,6 +693,19 @@ def test_teradata_strange_operators():
)


@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():
assert_sql_result(
"""
Expand Down

0 comments on commit 55f1453

Please sign in to comment.