Commit e016621 1 parent fb384ad commit e016621 Copy full SHA for e016621
File tree 3 files changed +5
-56
lines changed
3 files changed +5
-56
lines changed Original file line number Diff line number Diff line change 95
95
# Using an Acryl fork of sqlglot.
96
96
# https://github.com/tobymao/sqlglot/compare/main...hsheth2:sqlglot:hsheth?expand=1
97
97
"acryl-sqlglot==21.1.2.dev9" ,
98
+ "wrapt_timeout_decorator" ,
98
99
}
99
100
100
101
sql_common = (
Original file line number Diff line number Diff line change 12
12
import sqlglot .optimizer .annotate_types
13
13
import sqlglot .optimizer .optimizer
14
14
import sqlglot .optimizer .qualify
15
+ import wrapt_timeout_decorator
15
16
16
17
from datahub .cli .env_utils import get_boolean_env_variable
17
18
from datahub .ingestion .graph .client import DataHubGraph
45
46
is_dialect_instance ,
46
47
parse_statement ,
47
48
)
48
- from datahub .utilities .timeout import timeout
49
49
50
50
logger = logging .getLogger (__name__ )
51
51
@@ -311,6 +311,9 @@ class SqlUnderstandingError(Exception):
311
311
312
312
313
313
# TODO: Break this up into smaller functions.
314
+ @wrapt_timeout_decorator .timeout (
315
+ SQL_LINEAGE_TIMEOUT_SECONDS if SQL_LINEAGE_TIMEOUT_ENABLED else None ,
316
+ )
314
317
def _column_level_lineage ( # noqa: C901
315
318
statement : sqlglot .exp .Expression ,
316
319
dialect : sqlglot .Dialect ,
@@ -766,7 +769,6 @@ def _translate_internal_column_lineage(
766
769
)
767
770
768
771
769
- @timeout (enabled = SQL_LINEAGE_TIMEOUT_ENABLED , seconds = SQL_LINEAGE_TIMEOUT_SECONDS )
770
772
def _sqlglot_lineage_inner (
771
773
sql : sqlglot .exp .ExpOrStr ,
772
774
schema_resolver : SchemaResolverInterface ,
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments