Skip to content

Commit

Permalink
Account for exp.Field in set_ingredient_nodes_to_true()
Browse files Browse the repository at this point in the history
This is where the 2nd argument to an 'IN' clause shows up, e.g. 'WHERE x IN {{Ingredient()}}'
  • Loading branch information
parkervg committed Oct 22, 2024
1 parent ea09d82 commit d795a00
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion blendsql/parse/_transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,11 @@ def set_ingredient_nodes_to_true(node) -> Union[exp.Expression, None]:
if isinstance(node, exp.Predicate):
if any(
check.is_ingredient_node(x)
for x in {node.args.get("this", None), node.args.get("expression", None)}
for x in {
node.args.get("this", None),
node.args.get("expression", None),
node.args.get("field", None),
}
):
return exp.true()
return node
Expand Down

0 comments on commit d795a00

Please sign in to comment.