Skip to content

Commit

Permalink
feat(ingest): bump acryl-sqlglot (#8882)
Browse files Browse the repository at this point in the history
  • Loading branch information
hsheth2 authored Sep 21, 2023
1 parent 5f06dbf commit 2a0200b
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 1 deletion.
2 changes: 1 addition & 1 deletion metadata-ingestion/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def get_long_description():
sqlglot_lib = {
# Using an Acryl fork of sqlglot.
# https://github.com/tobymao/sqlglot/compare/main...hsheth2:sqlglot:hsheth?expand=1
"acryl-sqlglot==18.0.2.dev15",
"acryl-sqlglot==18.5.2.dev45",
}

aws_common = {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"query_type": "SELECT",
"in_tables": [
"urn:li:dataset:(urn:li:dataPlatform:hive,t1,PROD)",
"urn:li:dataset:(urn:li:dataPlatform:hive,t2,PROD)"
],
"out_tables": [],
"column_lineage": [
{
"downstream": {
"table": null,
"column": "a"
},
"upstreams": []
},
{
"downstream": {
"table": null,
"column": "b"
},
"upstreams": []
},
{
"downstream": {
"table": null,
"column": "c"
},
"upstreams": []
}
]
}
10 changes: 10 additions & 0 deletions metadata-ingestion/tests/unit/sql_parsing/test_sqlglot_lineage.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,16 @@ def test_select_from_union():
)


def test_select_ambiguous_column_no_schema():
assert_sql_result(
"""
select A, B, C from t1 inner join t2 on t1.id = t2.id
""",
dialect="hive",
expected_file=RESOURCE_DIR / "test_select_ambiguous_column_no_schema.json",
)


def test_merge_from_union():
# TODO: We don't support merge statements yet, but the union should still get handled.

Expand Down

0 comments on commit 2a0200b

Please sign in to comment.