contains op does not give error when number value is passed
Closed this issue · 2 comments
schristley commented
contains
should only work for string.
schristley commented
the original test was passing a number but because the field is a string in the schema, so the value is transformed into a string for the query, thus why the test passed.
{
"filters": {
"op":"contains",
"content": {
"field":"sample.cell_phenotype",
"value":45
}
}
}
To actually test that contains is restricted to string, we should change the test to a field that is a number or other non-string.
schristley commented
Updated reference implementation so that it throws query error for contains
on a non-string. Also added a couple of tests to check.