feat: SQL between/hostvar-key alignment, class-condition parsing, gcov merge across scenario runs
This commit is contained in:
@@ -31,16 +31,16 @@ def _dedup(
|
||||
|
||||
def _hash(rec, keys):
|
||||
if keys:
|
||||
return tuple(rec.get(k, "") for k in keys)
|
||||
return tuple(sorted(rec.items()))
|
||||
return tuple(str(rec.get(k, "")) for k in keys)
|
||||
return tuple((k, str(v) if isinstance(v, (list, dict, set)) else v) for k, v in sorted(rec.items()))
|
||||
|
||||
for rec in additional_records:
|
||||
for rec in main_records:
|
||||
h = _hash(rec, key_fields)
|
||||
if h not in seen:
|
||||
seen.add(h)
|
||||
result.append(rec)
|
||||
|
||||
for rec in main_records:
|
||||
for rec in additional_records:
|
||||
h = _hash(rec, key_fields)
|
||||
if h not in seen:
|
||||
seen.add(h)
|
||||
|
||||
Reference in New Issue
Block a user