SQL TRUE -> 1=1
@@ -31,7 +31,7 @@ def _sql_gen_where_condition(link_type, unique_id_cols):
id_expr_r = _sql_gen_composite_unique_id(unique_id_cols, "r")
if link_type == "two_dataset_link_only":
- where_condition = " where true "
+ where_condition = " where 1=1 "
elif link_type in ["link_and_dedupe", "dedupe_only"]:
where_condition = f"where {id_expr_l} < {id_expr_r}"
elif link_type == "link_only":
@@ -76,7 +76,7 @@ def block_using_rules(linker):
# you create a cartesian product, rather than having separate code
# that generates a cross join for the case of no blocking rules
if not blocking_rules:
- blocking_rules = ["true"]
+ blocking_rules = ["1=1"]
for matchkey_number, rule in enumerate(blocking_rules):
not_previous_rules_statement = _sql_gen_and_not_previous_rules(previous_rules)
