public ColumnHolder build() { Preconditions.checkState(type != null, "Type must be set."); return new SimpleColumnHolder( new ColumnCapabilitiesImpl() .setType(type) .setDictionaryEncoded(dictionaryEncoded) .setHasBitmapIndexes(bitmapIndex != null) .setHasSpatialIndexes(spatialIndex != null) .setHasMultipleValues(hasMultipleValues) .setFilterable(filterable), columnSupplier, bitmapIndex, spatialIndex ); } }
dimsKey != null && handler.getLengthOfEncodedKeyComponent(dimsKey) > 1) { capabilities.setHasMultipleValues(true);
TestColumn(ValueType type) { columnCapabilities = new ColumnCapabilitiesImpl() .setType(type) .setDictionaryEncoded(type == ValueType.STRING) // set a fake value to make string columns .setHasBitmapIndexes(type == ValueType.STRING) .setHasSpatialIndexes(false) .setHasMultipleValues(false); }
timeCapabilities = new ColumnCapabilitiesImpl().setType(ValueType.LONG).setHasMultipleValues(false);
@Test public void testSerde() throws Exception { String json = mapper.writeValueAsString(new ColumnCapabilitiesImpl() .setDictionaryEncoded(true) .setHasBitmapIndexes(true) .setHasMultipleValues(true) .setHasSpatialIndexes(true) .setType(ValueType.COMPLEX) .setFilterable(true)); Assert.assertFalse(json.contains("filterable")); ColumnCapabilities cc = mapper.readValue(json, ColumnCapabilitiesImpl.class); Assert.assertEquals(ValueType.COMPLEX, cc.getType()); Assert.assertTrue(cc.isDictionaryEncoded()); Assert.assertFalse(cc.isRunLengthEncoded()); Assert.assertTrue(cc.hasSpatialIndexes()); Assert.assertTrue(cc.hasMultipleValues()); Assert.assertTrue(cc.hasBitmapIndexes()); Assert.assertFalse(cc.isFilterable()); }
public ColumnHolder build() { Preconditions.checkState(type != null, "Type must be set."); return new SimpleColumnHolder( new ColumnCapabilitiesImpl() .setType(type) .setDictionaryEncoded(dictionaryEncoded) .setHasBitmapIndexes(bitmapIndex != null) .setHasSpatialIndexes(spatialIndex != null) .setHasMultipleValues(hasMultipleValues) .setFilterable(filterable), columnSupplier, bitmapIndex, spatialIndex ); } }
dimsKey != null && handler.getLengthOfEncodedKeyComponent(dimsKey) > 1) { capabilities.setHasMultipleValues(true);
timeCapabilities = new ColumnCapabilitiesImpl().setType(ValueType.LONG).setHasMultipleValues(false);