return new FieldDataType("double");
}
@Test
public void testFieldCacheExpression() throws Exception {
DoubleColumnReference doubleColumn = new DoubleColumnReference(fieldName().name());
doubleColumn.startCollect(ctx);
doubleColumn.setNextReader(readerContext);
IndexSearcher searcher = new IndexSearcher(readerContext.reader());
TopDocs topDocs = searcher.search(new MatchAllDocsQuery(), 10);
double d = 0.5;
for (ScoreDoc doc : topDocs.scoreDocs) {
doubleColumn.setNextDocId(doc.doc);
assertThat(doubleColumn.value(), is(d));
d++;
}
}