From de7e11495bfe7a0233f7862cdcafbd585ee1b767 Mon Sep 17 00:00:00 2001 From: Masatake YAMATO Date: Thu, 22 Jun 2023 11:28:47 +0900 Subject: [PATCH] lsfd: (filter) weakly support ARRAY_STRING and ARRAY_NUMBER json types We will have operators for array types in the future. Till having them, we treat the types as STRING. So we can use string operators for the column having types. Signed-off-by: Masatake YAMATO --- misc-utils/lsfd-filter.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/misc-utils/lsfd-filter.c b/misc-utils/lsfd-filter.c index ff55bb7f15..6f5561bc78 100644 --- a/misc-utils/lsfd-filter.c +++ b/misc-utils/lsfd-filter.c @@ -772,6 +772,10 @@ static struct node *dparser_compile1(struct parser *parser, struct node *last) int ntype; switch (jtype) { case SCOLS_JSON_STRING: + case SCOLS_JSON_ARRAY_STRING: + case SCOLS_JSON_ARRAY_NUMBER: + /* We handles SCOLS_JSON_ARRAY_* as a string + * till we implement operators for arrays. */ ntype = NODE_STR; break; case SCOLS_JSON_NUMBER: -- 2.47.3