sql/src/main/java/org/apache/druid/sql/calcite/planner/Calcites.java
/**
   * Calcite expects TIME literals to be represented by TimeStrings in the local time zone.
   *
   * @param dateTime joda timestamp
   * @param timeZone session time zone
   *
   * @return Calcite style Calendar, appropriate for literals
   */
Calcite expects TIME literals to be represented by TimeStrings in the local time zone.
@param dateTime joda timestamp
@param timeZone session time zone

@return Calcite style Calendar, appropriate for literals
Calcite expects TIME literals to be represented by TimeStrings in the local time zone . @param dateTime joda timestamp @param timeZone session time zone @return Calcite style Calendar appropriate for literals
public static TimeString jodaToCalciteTimeString(final DateTime dateTime, final DateTimeZone timeZone)
  {
    String timeString = TRAILING_ZEROS
        .matcher(CALCITE_TIME_PRINTER.print(dateTime.withZone(timeZone)))
        .replaceAll("");
    return new TimeString(timeString);
  }
public static TimeString jodaToCalciteTimeString ( final DateTime dateTime , final DateTimeZone timeZone ) { String timeString = TRAILING_ZEROS . matcher ( CALCITE_TIME_PRINTER . print ( dateTime . withZone ( timeZone ) ) ) . replaceAll ( "" ) ; return new TimeString ( timeString ) ; }
Calcite expects TIME literals to be represented by TimeStrings in the local time zone.
Calcite expects TIME literals to be represented by TimeStrings in the local time zone .
// The replaceAll is because Calcite doesn't like trailing zeroes in its fractional seconds part.