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