Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ingest): bump sqlglot parser #9155

Merged
merged 1 commit into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading