Class DruidSqlCastConverter

    • Constructor Detail

      • DruidSqlCastConverter

        public DruidSqlCastConverter()
    • Method Detail

      • toDruidExpression

        public java.lang.String toDruidExpression​(RexNode rexNode,
                                                  RelDataType topRel,
                                                  DruidQuery druidQuery)
        Description copied from interface: DruidSqlOperatorConverter
        Translate rexNode to valid Druid expression.
        Specified by:
        toDruidExpression in interface DruidSqlOperatorConverter
        rexNode - rexNode to translate to Druid expression
        topRel - row type associated with rexNode
        druidQuery - druid query used to figure out configs/fields related like timeZone
        valid Druid expression or null if it can not convert the rexNode
      • castCharToDateTime

        private static java.lang.String castCharToDateTime​(java.util.TimeZone timeZone,
                                                           java.lang.String operand,
                                                           SqlTypeName toType,
                                                           java.lang.String format)
      • castDateTimeToChar

        private static java.lang.String castDateTimeToChar​(java.util.TimeZone timeZone,
                                                           java.lang.String operand,
                                                           SqlTypeName fromType)
      • dateTimeFormatString

        public static java.lang.String dateTimeFormatString​(SqlTypeName sqlTypeName)