use of org.apache.druid.segment.column.ColumnCapabilitiesImpl in project druid by druid-io.
the class GroupByQueryEngineV2Test method testCanPushDownLimitForSegmentStringSelector.
@Test
public void testCanPushDownLimitForSegmentStringSelector() {
ColumnCapabilities capabilities = new ColumnCapabilitiesImpl().setType(ColumnType.STRING).setHasBitmapIndexes(true).setHasMultipleValues(false).setDictionaryEncoded(true).setDictionaryValuesSorted(true).setDictionaryValuesUnique(true);
EasyMock.expect(factory.getColumnCapabilities(DIM)).andReturn(capabilities).once();
EasyMock.replay(factory);
Assert.assertTrue(GroupByQueryEngineV2.canPushDownLimit(factory, DIM));
EasyMock.verify(factory);
}
use of org.apache.druid.segment.column.ColumnCapabilitiesImpl in project druid by druid-io.
the class GroupByQueryEngineV2Test method testCanPushDownLimitForJoinStringSelector.
@Test
public void testCanPushDownLimitForJoinStringSelector() {
ColumnCapabilities capabilities = new ColumnCapabilitiesImpl().setType(ColumnType.STRING).setHasBitmapIndexes(false).setHasMultipleValues(false).setDictionaryEncoded(true).setDictionaryValuesSorted(false).setDictionaryValuesUnique(false);
EasyMock.expect(factory.getColumnCapabilities(DIM)).andReturn(capabilities).once();
EasyMock.replay(factory);
Assert.assertFalse(GroupByQueryEngineV2.canPushDownLimit(factory, DIM));
EasyMock.verify(factory);
}
use of org.apache.druid.segment.column.ColumnCapabilitiesImpl in project druid by druid-io.
the class GroupByQueryEngineV2Test method testCanPushDownLimitForIncrementalStringSelector.
@Test
public void testCanPushDownLimitForIncrementalStringSelector() {
ColumnCapabilities capabilities = new ColumnCapabilitiesImpl().setType(ColumnType.STRING).setHasBitmapIndexes(false).setHasMultipleValues(false).setDictionaryEncoded(false).setDictionaryValuesSorted(false).setDictionaryValuesUnique(true);
EasyMock.expect(factory.getColumnCapabilities(DIM)).andReturn(capabilities).once();
EasyMock.replay(factory);
Assert.assertFalse(GroupByQueryEngineV2.canPushDownLimit(factory, DIM));
EasyMock.verify(factory);
}
use of org.apache.druid.segment.column.ColumnCapabilitiesImpl in project druid by druid-io.
the class GroupByQueryEngineV2Test method testCanPushDownLimitForNumericSelector.
@Test
public void testCanPushDownLimitForNumericSelector() {
ColumnCapabilitiesImpl capabilities = new ColumnCapabilitiesImpl().setType(ColumnType.LONG).setHasBitmapIndexes(false).setHasMultipleValues(false).setDictionaryEncoded(false).setDictionaryValuesSorted(false).setDictionaryValuesUnique(false);
EasyMock.expect(factory.getColumnCapabilities(DIM)).andReturn(capabilities).anyTimes();
EasyMock.replay(factory);
Assert.assertTrue(GroupByQueryEngineV2.canPushDownLimit(factory, DIM));
capabilities.setType(ColumnType.DOUBLE);
Assert.assertTrue(GroupByQueryEngineV2.canPushDownLimit(factory, DIM));
capabilities.setType(ColumnType.FLOAT);
Assert.assertTrue(GroupByQueryEngineV2.canPushDownLimit(factory, DIM));
EasyMock.verify(factory);
}
Aggregations