From d795a004649f119211eaaa698f3c634b42c2a416 Mon Sep 17 00:00:00 2001 From: parkervg Date: Tue, 22 Oct 2024 15:00:38 -0400 Subject: [PATCH] Account for exp.Field in set_ingredient_nodes_to_true() This is where the 2nd argument to an 'IN' clause shows up, e.g. 'WHERE x IN {{Ingredient()}}' --- blendsql/parse/_transforms.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/blendsql/parse/_transforms.py b/blendsql/parse/_transforms.py index 8b57787..8e7b04c 100644 --- a/blendsql/parse/_transforms.py +++ b/blendsql/parse/_transforms.py @@ -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