Function whereClause = new Function(new FunctionInfo(
new FunctionIdent(EqOperator.NAME, Arrays.<DataType>asList(DataTypes.DOUBLE, DataTypes.DOUBLE)),
DataTypes.BOOLEAN),
Arrays.<Symbol>asList(minScore_ref, Literal.newLiteral(0.4))
);
QueryThenFetchNode node = new QueryThenFetchNode(new Routing(),
ImmutableList.<Symbol>of(), null, null, null, null, null, new WhereClause(whereClause), null);
BytesReference bytesReference = generator.convert(node);
assertThat(bytesReference.toUtf8(),
is("{\"_source\":false,\"query\":{\"match_all\":{}},\"min_score\":0.4,\"from\":0,\"size\":10000}"));