If I do a query with a `where mvfield in ('a', 'b'...
# troubleshooting
k
If I do a query with a
where mvfield in ('a', 'b') group by mvfield
, and
mvfield
is a multi-valued field, I get a result with groups for values from
mvfield
that aren’t in my where clause. I assume I’m getting groups for every value found in
mvfield
from rows where
mvfield
contains a match for my filter, but it seems wrong…am I missing something?
m
You need the
value_in
udf. Let me find an example
@Jackie ^^
k
Thanks for the hint, found an example in the code. Should be
select VALUEIN(mvfield, 'a', 'b') as groups from table group by groups
👍 1
m
Yeah, there you go
k
Where should I add documentation for this UDF?
Perhaps suggest where you would have looked.
k
OK - I was looking in documentation about grouping. So maybe a note there about when grouping on a multi-valued field that’s also been used for filtering?
m
yeah, makes sense