Skip to content

Commit

Permalink
[sc-28620] Catch RecursionError in TLL parsing (#981)
Browse files Browse the repository at this point in the history
  • Loading branch information
usefulalgorithm authored Sep 9, 2024
1 parent fddb6a9 commit 9ebb5a7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,11 @@ def extract_table_level_lineage(
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(
f"Cannot parse sql with SQLGlot (max recursion level exceeded), query_id = {query_id}"
)
return Result()

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

0 comments on commit 9ebb5a7

Please sign in to comment.