File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -105,9 +105,9 @@ def get_active_release_names(trans, source_table="releases_json"):
105
105
# - All releases referenced by a Rule or a Active Scheduled Rule Change
106
106
# - All releases referenced by a Release from the above query
107
107
query_release_mapping = f"""SELECT DISTINCT releases.* \
108
- FROM { source_table } as releases, rules, rules_scheduled_changes \
109
- WHERE ( releases.name IN (rules.mapping, rules.fallbackMapping))
110
- OR ( rules_scheduled_changes.complete = 0 AND
108
+ FROM { source_table } as releases \
109
+ WHERE EXISTS(SELECT 1 FROM rules WHERE releases.name IN (rules.mapping, rules.fallbackMapping))
110
+ OR EXISTS(SELECT 1 FROM rules_scheduled_changes WHERE rules_scheduled_changes.complete = 0 AND
111
111
releases.name IN (rules_scheduled_changes.base_mapping, rules_scheduled_changes.base_fallbackMapping))
112
112
"""
113
113
result = trans .execute (query_release_mapping ).fetchall ()
You can’t perform that action at this time.
0 commit comments