Package org.apache.calcite.adapter.druid
Class ExtractionDimensionSpec
java.lang.Object
org.apache.calcite.adapter.druid.ExtractionDimensionSpec
- All Implemented Interfaces:
DimensionSpec
,DruidJson
Implementation of extraction function DimensionSpec.
The extraction function implementation returns dimension values transformed using the given extraction function.
-
Constructor Summary
ConstructorDescriptionExtractionDimensionSpec
(String dimension, ExtractionFunction extractionFunction, String outputName) ExtractionDimensionSpec
(String dimension, ExtractionFunction extractionFunction, String outputName, DruidType outputType) -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable Granularity
toQueryGranularity
(DimensionSpec dimensionSpec) Returns a validGranularity
of floor extract, or null when not possible.void
write
(com.fasterxml.jackson.core.JsonGenerator generator)
-
Constructor Details
-
ExtractionDimensionSpec
public ExtractionDimensionSpec(String dimension, ExtractionFunction extractionFunction, String outputName) -
ExtractionDimensionSpec
public ExtractionDimensionSpec(String dimension, ExtractionFunction extractionFunction, String outputName, DruidType outputType)
-
-
Method Details
-
getOutputName
- Specified by:
getOutputName
in interfaceDimensionSpec
-
getOutputType
- Specified by:
getOutputType
in interfaceDimensionSpec
-
getExtractionFn
- Specified by:
getExtractionFn
in interfaceDimensionSpec
-
getDimension
- Specified by:
getDimension
in interfaceDimensionSpec
-
write
- Specified by:
write
in interfaceDruidJson
- Throws:
IOException
-
toQueryGranularity
Returns a validGranularity
of floor extract, or null when not possible.- Parameters:
dimensionSpec
- Druid Dimension specification
-