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 acryl-sqlglot #8882

Merged
merged 1 commit into from
Sep 21, 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 @@ -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",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is this built and published from?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}

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
Loading