use of org.apache.druid.query.aggregation.TestLongColumnSelector in project druid by druid-io.
the class FloatFirstAggregationTest method setup.
@Before
public void setup() {
floatFirstAggregatorFactory = new FloatFirstAggregatorFactory("billy", "nilly", null);
combiningAggFactory = (FloatFirstAggregatorFactory) floatFirstAggregatorFactory.getCombiningFactory();
timeSelector = new TestLongColumnSelector(times);
customTimeSelector = new TestLongColumnSelector(customTimes);
valueSelector = new TestFloatColumnSelector(floats);
objectSelector = new TestObjectColumnSelector<>(pairs);
colSelectorFactory = EasyMock.createMock(ColumnSelectorFactory.class);
EasyMock.expect(colSelectorFactory.makeColumnValueSelector(ColumnHolder.TIME_COLUMN_NAME)).andReturn(timeSelector);
EasyMock.expect(colSelectorFactory.makeColumnValueSelector("customTime")).andReturn(customTimeSelector);
EasyMock.expect(colSelectorFactory.makeColumnValueSelector("nilly")).andReturn(valueSelector).atLeastOnce();
EasyMock.expect(colSelectorFactory.makeColumnValueSelector("billy")).andReturn(objectSelector).atLeastOnce();
EasyMock.replay(colSelectorFactory);
}
use of org.apache.druid.query.aggregation.TestLongColumnSelector in project druid by druid-io.
the class LongAnyAggregationTest method setup.
@Before
public void setup() {
longAnyAggFactory = new LongAnyAggregatorFactory("billy", "nilly");
combiningAggFactory = (LongAnyAggregatorFactory) longAnyAggFactory.getCombiningFactory();
valueSelector = new TestLongColumnSelector(longs);
objectSelector = new TestObjectColumnSelector<>(objects);
colSelectorFactory = EasyMock.createMock(ColumnSelectorFactory.class);
EasyMock.expect(colSelectorFactory.makeColumnValueSelector("nilly")).andReturn(valueSelector);
EasyMock.expect(colSelectorFactory.makeColumnValueSelector("billy")).andReturn(objectSelector);
EasyMock.replay(colSelectorFactory);
}
Aggregations