mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2026-10-13 01:42:00 -05:00
ETA possibility of raw json not having conditions field
This commit is contained in:
1 parent
f7bfec0da1
commit
4d330a9787
1 file changed
+4
-1
+4
-1
@@ -31,7 +31,10 @@ public class PineconeFilterParser implements FilteredDatasetParser {
|
||||
@Override
|
||||
public String parse(String raw) {
|
||||
logger.debug(() -> "Parsing: " + raw);
|
||||
JsonObject conditions = JsonParser.parseString(raw).getAsJsonObject().get(CONDITIONS).getAsJsonObject();
|
||||
JsonObject preconditions = JsonParser.parseString(raw).getAsJsonObject();
|
||||
JsonObject conditions = preconditions.has(CONDITIONS) ?
|
||||
preconditions.get(CONDITIONS).getAsJsonObject() :
|
||||
preconditions;
|
||||
return filter.applyFilter(conditions);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user