Skip to content

Commit 164f88c

Browse files
authored
[DENG-10266] Speed up query formatting by caching config (#8514)
* [DENG-10266] Speed up query formatting by caching config * trigger formatting * Undo formatting
1 parent 43b0f03 commit 164f88c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

bigquery_etl/format_sql/format.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import os
55
import os.path
66
import sys
7-
from functools import partial
7+
from functools import cache, partial
88
from multiprocessing.pool import Pool
99
from pathlib import Path
1010
from typing import Tuple
@@ -16,6 +16,7 @@
1616
from bigquery_etl.util.common import qualify_table_references_in_file
1717

1818

19+
@cache
1920
def skip_format():
2021
"""Return a list of configured queries for which formatting should be skipped."""
2122
return [
@@ -25,6 +26,7 @@ def skip_format():
2526
]
2627

2728

29+
@cache
2830
def skip_qualifying_references():
2931
"""Return a list of configured queries where fully qualifying references should be skipped."""
3032
return [

0 commit comments

Comments
 (0)