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

[sc-28620] Catch RecursionError in TLL parsing #981

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
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,11 @@
if not _is_truncated_insert_into_with_values(sql):
logger.warning(f"Cannot parse sql with SQLGlot, query_id = {query_id}")
return Result()
except RecursionError:
logger.warning(

Check warning on line 154 in metaphor/common/sql/table_level_lineage/table_level_lineage.py

View check run for this annotation

Codecov / codecov/patch

metaphor/common/sql/table_level_lineage/table_level_lineage.py#L153-L154

Added lines #L153 - L154 were not covered by tests
f"Cannot parse sql with SQLGlot (max recursion level exceeded), query_id = {query_id}"
)
return Result()

Check warning on line 157 in metaphor/common/sql/table_level_lineage/table_level_lineage.py

View check run for this annotation

Codecov / codecov/patch

metaphor/common/sql/table_level_lineage/table_level_lineage.py#L157

Added line #L157 was not covered by tests

try:
return Result(
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "metaphor-connectors"
version = "0.14.102"
version = "0.14.103"
license = "Apache-2.0"
description = "A collection of Python-based 'connectors' that extract metadata from various sources to ingest into the Metaphor app."
authors = ["Metaphor <[email protected]>"]
Expand Down
Loading