return new FieldDataType("string");
}
@Test
public void testFieldCacheExpression() throws Exception {
BooleanColumnReference booleanColumn = new BooleanColumnReference(fieldName().name());
booleanColumn.startCollect(ctx);
booleanColumn.setNextReader(readerContext);
IndexSearcher searcher = new IndexSearcher(readerContext.reader());
TopDocs topDocs = searcher.search(new MatchAllDocsQuery(), 20);
int i = 0;
for (ScoreDoc doc : topDocs.scoreDocs) {
booleanColumn.setNextDocId(doc.doc);
assertThat(booleanColumn.value(), is(i%2==0));
i++;
}
}