Search in sources :

Example 1 with FloatDimensionSchema

use of io.druid.data.input.impl.FloatDimensionSchema in project druid by druid-io.

the class IndexMergerTest method getIndexWithNumericDims.

private IncrementalIndex getIndexWithNumericDims() throws Exception {
    IncrementalIndex index = getIndexWithDimsFromSchemata(Arrays.asList(new LongDimensionSchema("dimA"), new FloatDimensionSchema("dimB"), new StringDimensionSchema("dimC")));
    index.add(new MapBasedInputRow(1, Arrays.asList("dimA", "dimB", "dimC"), ImmutableMap.<String, Object>of("dimA", 100L, "dimB", 4000.567, "dimC", "Hello")));
    index.add(new MapBasedInputRow(1, Arrays.asList("dimA", "dimB", "dimC"), ImmutableMap.<String, Object>of("dimA", 72L, "dimB", 60000.789, "dimC", "World")));
    index.add(new MapBasedInputRow(1, Arrays.asList("dimA", "dimB", "dimC"), ImmutableMap.<String, Object>of("dimA", 3001L, "dimB", 1.2345, "dimC", "Foobar")));
    index.add(new MapBasedInputRow(1, Arrays.asList("dimA", "dimB", "dimC"), ImmutableMap.<String, Object>of("dimC", "Nully Row")));
    return index;
}
Also used : IncrementalIndex(io.druid.segment.incremental.IncrementalIndex) OnheapIncrementalIndex(io.druid.segment.incremental.OnheapIncrementalIndex) LongDimensionSchema(io.druid.data.input.impl.LongDimensionSchema) FloatDimensionSchema(io.druid.data.input.impl.FloatDimensionSchema) MapBasedInputRow(io.druid.data.input.MapBasedInputRow) StringDimensionSchema(io.druid.data.input.impl.StringDimensionSchema)

Aggregations

MapBasedInputRow (io.druid.data.input.MapBasedInputRow)1 FloatDimensionSchema (io.druid.data.input.impl.FloatDimensionSchema)1 LongDimensionSchema (io.druid.data.input.impl.LongDimensionSchema)1 StringDimensionSchema (io.druid.data.input.impl.StringDimensionSchema)1 IncrementalIndex (io.druid.segment.incremental.IncrementalIndex)1 OnheapIncrementalIndex (io.druid.segment.incremental.OnheapIncrementalIndex)1