public void testWhereReferenceInStringList() throws Exception {
// where name in ("alpha", "bravo", "charlie")
Reference ref = name_ref;
FunctionImplementation inListImpl = functions.get(
new FunctionIdent(InOperator.NAME,
Arrays.<DataType>asList(DataTypes.STRING, new SetType(DataTypes.STRING))
));
ImmutableSet<BytesRef> list = ImmutableSet.of(
new BytesRef("alpha"), new BytesRef("bravo"), new BytesRef("charlie"));
Literal set = Literal.newLiteral(new SetType(DataTypes.STRING), list);
Function inList = new Function(inListImpl.info(), Arrays.<Symbol>asList(ref, set));
BytesReference reference = generator.convert(new WhereClause(inList));
Tuple<XContentType, Map<String, Object>> actualMap =
XContentHelper.convertToMap(reference, true);