cache_values = cache[table_name][key]
for k in key:
constraints = [c for c in path_constraints if c[0] == k]
if len(constraints) > 0:
cache_values = cache_values[k][constraints[0][1]]
continue
else:
cache_values = cache_values[k]
for k, v in cache_values.items():
yield (k, v[1])
def build_csn2(dep_tree, table_keys, scopes, path_constraints=None, cache=None):
if path_constraints is None:
path_constraints = []
After Change
def get_constraint_values(key, table_name, path_constraints, cache):
cache_values = cache[table_name][key]
key_constraints = set(key)
path_constraints = [pc for pc in path_constraints if pc[0] in key_constraints]
def traverse_cache_values(cache_vals, path_constraints):
if len(path_constraints) > 0:
constraint = path_constraints[0]