Class DruidTypeSystem

java.lang.Object
org.apache.druid.sql.calcite.planner.DruidTypeSystem
All Implemented Interfaces:
org.apache.calcite.rel.type.RelDataTypeSystem

public class DruidTypeSystem extends Object implements org.apache.calcite.rel.type.RelDataTypeSystem
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Druid uses millisecond precision for timestamps internally.
    static final DruidTypeSystem
     
    static final org.apache.calcite.rel.type.RelDataTypeFactory
     

    Fields inherited from interface org.apache.calcite.rel.type.RelDataTypeSystem

    DEFAULT
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.calcite.rel.type.RelDataType
    deriveAvgAggType(org.apache.calcite.rel.type.RelDataTypeFactory typeFactory, org.apache.calcite.rel.type.RelDataType argumentType)
     
    org.apache.calcite.rel.type.RelDataType
    deriveCovarType(org.apache.calcite.rel.type.RelDataTypeFactory typeFactory, org.apache.calcite.rel.type.RelDataType arg0Type, org.apache.calcite.rel.type.RelDataType arg1Type)
     
    org.apache.calcite.rel.type.RelDataType
    deriveFractionalRankType(org.apache.calcite.rel.type.RelDataTypeFactory typeFactory)
     
    org.apache.calcite.rel.type.RelDataType
    deriveRankType(org.apache.calcite.rel.type.RelDataTypeFactory typeFactory)
     
    org.apache.calcite.rel.type.RelDataType
    deriveSumType(org.apache.calcite.rel.type.RelDataTypeFactory typeFactory, org.apache.calcite.rel.type.RelDataType argumentType)
     
    int
    getDefaultPrecision(org.apache.calcite.sql.type.SqlTypeName typeName)
     
    getLiteral(org.apache.calcite.sql.type.SqlTypeName typeName, boolean isPrefix)
     
    int
     
    int
     
    int
    getMaxPrecision(org.apache.calcite.sql.type.SqlTypeName typeName)
     
    int
    getMaxScale(org.apache.calcite.sql.type.SqlTypeName typeName)
     
    int
    getNumTypeRadix(org.apache.calcite.sql.type.SqlTypeName typeName)
     
    boolean
    isAutoincrement(org.apache.calcite.sql.type.SqlTypeName typeName)
     
    boolean
    isCaseSensitive(org.apache.calcite.sql.type.SqlTypeName typeName)
     
    boolean
     
    boolean
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.apache.calcite.rel.type.RelDataTypeSystem

    deriveDecimalDivideType, deriveDecimalModType, deriveDecimalMultiplyType, deriveDecimalPlusType, deriveTimeFrameSet, shouldUseDoubleMultiplication
  • Field Details

    • INSTANCE

      public static final DruidTypeSystem INSTANCE
    • TYPE_FACTORY

      public static final org.apache.calcite.rel.type.RelDataTypeFactory TYPE_FACTORY
    • DEFAULT_TIMESTAMP_PRECISION

      public static final int DEFAULT_TIMESTAMP_PRECISION
      Druid uses millisecond precision for timestamps internally. This is also the default at the SQL layer.
      See Also:
  • Method Details

    • getMaxScale

      public int getMaxScale(org.apache.calcite.sql.type.SqlTypeName typeName)
      Specified by:
      getMaxScale in interface org.apache.calcite.rel.type.RelDataTypeSystem
    • getDefaultPrecision

      public int getDefaultPrecision(org.apache.calcite.sql.type.SqlTypeName typeName)
      Specified by:
      getDefaultPrecision in interface org.apache.calcite.rel.type.RelDataTypeSystem
    • getMaxPrecision

      public int getMaxPrecision(org.apache.calcite.sql.type.SqlTypeName typeName)
      Specified by:
      getMaxPrecision in interface org.apache.calcite.rel.type.RelDataTypeSystem
    • getMaxNumericScale

      public int getMaxNumericScale()
      Specified by:
      getMaxNumericScale in interface org.apache.calcite.rel.type.RelDataTypeSystem
    • getMaxNumericPrecision

      public int getMaxNumericPrecision()
      Specified by:
      getMaxNumericPrecision in interface org.apache.calcite.rel.type.RelDataTypeSystem
    • getLiteral

      public String getLiteral(org.apache.calcite.sql.type.SqlTypeName typeName, boolean isPrefix)
      Specified by:
      getLiteral in interface org.apache.calcite.rel.type.RelDataTypeSystem
    • isCaseSensitive

      public boolean isCaseSensitive(org.apache.calcite.sql.type.SqlTypeName typeName)
      Specified by:
      isCaseSensitive in interface org.apache.calcite.rel.type.RelDataTypeSystem
    • isAutoincrement

      public boolean isAutoincrement(org.apache.calcite.sql.type.SqlTypeName typeName)
      Specified by:
      isAutoincrement in interface org.apache.calcite.rel.type.RelDataTypeSystem
    • getNumTypeRadix

      public int getNumTypeRadix(org.apache.calcite.sql.type.SqlTypeName typeName)
      Specified by:
      getNumTypeRadix in interface org.apache.calcite.rel.type.RelDataTypeSystem
    • deriveSumType

      public org.apache.calcite.rel.type.RelDataType deriveSumType(org.apache.calcite.rel.type.RelDataTypeFactory typeFactory, org.apache.calcite.rel.type.RelDataType argumentType)
      Specified by:
      deriveSumType in interface org.apache.calcite.rel.type.RelDataTypeSystem
    • deriveAvgAggType

      public org.apache.calcite.rel.type.RelDataType deriveAvgAggType(org.apache.calcite.rel.type.RelDataTypeFactory typeFactory, org.apache.calcite.rel.type.RelDataType argumentType)
      Specified by:
      deriveAvgAggType in interface org.apache.calcite.rel.type.RelDataTypeSystem
    • deriveCovarType

      public org.apache.calcite.rel.type.RelDataType deriveCovarType(org.apache.calcite.rel.type.RelDataTypeFactory typeFactory, org.apache.calcite.rel.type.RelDataType arg0Type, org.apache.calcite.rel.type.RelDataType arg1Type)
      Specified by:
      deriveCovarType in interface org.apache.calcite.rel.type.RelDataTypeSystem
    • deriveFractionalRankType

      public org.apache.calcite.rel.type.RelDataType deriveFractionalRankType(org.apache.calcite.rel.type.RelDataTypeFactory typeFactory)
      Specified by:
      deriveFractionalRankType in interface org.apache.calcite.rel.type.RelDataTypeSystem
    • deriveRankType

      public org.apache.calcite.rel.type.RelDataType deriveRankType(org.apache.calcite.rel.type.RelDataTypeFactory typeFactory)
      Specified by:
      deriveRankType in interface org.apache.calcite.rel.type.RelDataTypeSystem
    • isSchemaCaseSensitive

      public boolean isSchemaCaseSensitive()
      Specified by:
      isSchemaCaseSensitive in interface org.apache.calcite.rel.type.RelDataTypeSystem
    • shouldConvertRaggedUnionTypesToVarying

      public boolean shouldConvertRaggedUnionTypesToVarying()
      Specified by:
      shouldConvertRaggedUnionTypesToVarying in interface org.apache.calcite.rel.type.RelDataTypeSystem