use of org.apache.druid.segment.column.ColumnCapabilities in project druid by apache.
the class RowBasedColumnSelectorFactoryTest method testCapabilitiesComplex.
@Test
public void testCapabilitiesComplex() {
ColumnCapabilities caps = RowBasedColumnSelectorFactory.getColumnCapabilities(ROW_SIGNATURE, COMPLEX_COLUMN_NAME);
Assert.assertEquals(SOME_COMPLEX, caps.toColumnType());
Assert.assertFalse(caps.hasBitmapIndexes());
Assert.assertFalse(caps.isDictionaryEncoded().isTrue());
Assert.assertFalse(caps.areDictionaryValuesSorted().isTrue());
Assert.assertFalse(caps.areDictionaryValuesUnique().isTrue());
Assert.assertTrue(caps.hasMultipleValues().isUnknown());
Assert.assertFalse(caps.hasSpatialIndexes());
}
use of org.apache.druid.segment.column.ColumnCapabilities in project druid by apache.
the class RowBasedColumnSelectorFactoryTest method testCapabilitiesDouble.
@Test
public void testCapabilitiesDouble() {
ColumnCapabilities caps = RowBasedColumnSelectorFactory.getColumnCapabilities(ROW_SIGNATURE, DOUBLE_COLUMN_NAME);
Assert.assertEquals(ValueType.DOUBLE, caps.getType());
Assert.assertFalse(caps.hasBitmapIndexes());
Assert.assertFalse(caps.isDictionaryEncoded().isTrue());
Assert.assertFalse(caps.areDictionaryValuesSorted().isTrue());
Assert.assertFalse(caps.areDictionaryValuesUnique().isTrue());
Assert.assertFalse(caps.hasMultipleValues().isMaybeTrue());
Assert.assertFalse(caps.hasSpatialIndexes());
}
use of org.apache.druid.segment.column.ColumnCapabilities in project druid by apache.
the class RowBasedColumnSelectorFactoryTest method testCapabilitiesUnknownColumn.
@Test
public void testCapabilitiesUnknownColumn() {
ColumnCapabilities caps = RowBasedColumnSelectorFactory.getColumnCapabilities(ROW_SIGNATURE, "wat");
Assert.assertNull(caps);
}
use of org.apache.druid.segment.column.ColumnCapabilities in project druid by apache.
the class RowBasedStorageAdapterTest method test_getColumnCapabilities_float.
@Test
public void test_getColumnCapabilities_float() {
final RowBasedStorageAdapter<Integer> adapter = createIntAdapter(0, 1, 2);
final ColumnCapabilities capabilities = adapter.getColumnCapabilities(ValueType.FLOAT.name());
Assert.assertEquals(ValueType.FLOAT, capabilities.getType());
Assert.assertFalse(capabilities.hasMultipleValues().isMaybeTrue());
}
use of org.apache.druid.segment.column.ColumnCapabilities in project druid by apache.
the class RowBasedStorageAdapterTest method test_getColumnCapabilities_string.
@Test
public void test_getColumnCapabilities_string() {
final RowBasedStorageAdapter<Integer> adapter = createIntAdapter(0, 1, 2);
final ColumnCapabilities capabilities = adapter.getColumnCapabilities(ValueType.STRING.name());
Assert.assertEquals(ValueType.STRING, capabilities.getType());
// Note: unlike numeric types, STRING-typed columns might have multiple values, so they report as incomplete. It
// would be good in the future to support some way of changing this, when it is known ahead of time that
// multi-valuedness is definitely happening or is definitely impossible.
Assert.assertTrue(capabilities.hasMultipleValues().isUnknown());
}
Aggregations