Details
Description
We need to handle queries better where there is an array-valued field that also has a non-array value. (E.g., a list of strings or an atomic string, e.g., the empty string being abused to represent missing data.) We return a runtime error in this case if you do an existential condition on the array - we should probably warn instead.
Ex:
WITH MixedData AS ([{"id":1,"words":["plural", "list"]}, {"id":2, "words":"singular"}])
SELECT VALUE m FROM MixedData m
WHERE (SOME w IN m.words SATISFIES w = "list" END);
This query works happily in N1QL for Query but gets a runtime type error in N1QL for Analytics. In the latter case it should probably warn and return the same result as the Query service! This is annoying for users of both (or even just users of Analytics).