mirror of
https://github.com/datahub-project/datahub.git
synced 2025-08-16 21:27:03 +00:00
feat(ingest): bump sqlglot parser (#9155)
This commit is contained in:
parent
d231497603
commit
55f14530a3
@ -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 = (
|
||||||
|
@ -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(
|
||||||
"""
|
"""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user