Search in sources :

Example 1 with ParseSpec

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

the class OrcHadoopInputRowParserTest method testTypeFromParseSpec.

@Test
public void testTypeFromParseSpec() {
    ParseSpec parseSpec = new TimeAndDimsParseSpec(new TimestampSpec("timestamp", "auto", null), new DimensionsSpec(ImmutableList.<DimensionSchema>of(new StringDimensionSchema("col1"), new StringDimensionSchema("col2")), null, null));
    String typeString = OrcHadoopInputRowParser.typeStringFromParseSpec(parseSpec);
    String expected = "struct<timestamp:string,col1:string,col2:string>";
    Assert.assertEquals(expected, typeString);
}
Also used : TimeAndDimsParseSpec(io.druid.data.input.impl.TimeAndDimsParseSpec) TimeAndDimsParseSpec(io.druid.data.input.impl.TimeAndDimsParseSpec) ParseSpec(io.druid.data.input.impl.ParseSpec) TimestampSpec(io.druid.data.input.impl.TimestampSpec) DimensionsSpec(io.druid.data.input.impl.DimensionsSpec) StringDimensionSchema(io.druid.data.input.impl.StringDimensionSchema) DimensionSchema(io.druid.data.input.impl.DimensionSchema) StringDimensionSchema(io.druid.data.input.impl.StringDimensionSchema) Test(org.junit.Test)

Aggregations

DimensionSchema (io.druid.data.input.impl.DimensionSchema)1 DimensionsSpec (io.druid.data.input.impl.DimensionsSpec)1 ParseSpec (io.druid.data.input.impl.ParseSpec)1 StringDimensionSchema (io.druid.data.input.impl.StringDimensionSchema)1 TimeAndDimsParseSpec (io.druid.data.input.impl.TimeAndDimsParseSpec)1 TimestampSpec (io.druid.data.input.impl.TimestampSpec)1 Test (org.junit.Test)1