File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change 6
6
"is_none_or_str" ,
7
7
]
8
8
9
- # import json
9
+ import json
10
10
import logging
11
11
from contextlib import contextmanager
12
12
from typing import Any , Iterator , Sequence , Union
@@ -120,12 +120,5 @@ def build_filter_conditions(filters: Json) -> str:
120
120
if not filters :
121
121
return ""
122
122
123
- def format_condition (key : str , value : Any ) -> str :
124
- if isinstance (value , str ):
125
- return f'doc.{ key } == "{ value } "'
126
-
127
- return f"doc.{ key } == { value } "
128
-
129
- # conditions = [f"doc.{k} == {json.dumps(v)}" for k, v in filters.items()]
130
- conditions = [format_condition (k , v ) for k , v in filters .items ()]
123
+ conditions = [f"doc.{ k } == { json .dumps (v )} " for k , v in filters .items ()]
131
124
return "FILTER " + " AND " .join (conditions )
You can’t perform that action at this time.
0 commit comments