sql/src/main/java/org/apache/druid/sql/calcite/planner/Calcites.java
/**
   * Like RelDataTypeFactory.createSqlTypeWithNullability, but creates types that align best with how Druid
   * represents them.
   */
Like RelDataTypeFactory.createSqlTypeWithNullability, but creates types that align best with how Druid
represents them.
Like RelDataTypeFactory . createSqlTypeWithNullability but creates types that align best with how Druid represents them .
public static RelDataType createSqlTypeWithNullability(
      final RelDataTypeFactory typeFactory,
      final SqlTypeName typeName,
      final boolean nullable
  )
  {
    final RelDataType dataType;
    switch (typeName) {
      case TIMESTAMP:
        dataType = typeFactory.createSqlType(typeName, 3);
        break;
      case CHAR:
      case VARCHAR:
        dataType = typeFactory.createTypeWithCharsetAndCollation(
            typeFactory.createSqlType(typeName),
            Calcites.defaultCharset(),
            SqlCollation.IMPLICIT
        );
        break;
      default:
        dataType = typeFactory.createSqlType(typeName);
    }
    return typeFactory.createTypeWithNullability(dataType, nullable);
  }
public static RelDataType createSqlTypeWithNullability ( final RelDataTypeFactory typeFactory , final SqlTypeName typeName , final boolean nullable ) { final RelDataType dataType ; switch ( typeName ) { case TIMESTAMP : dataType = typeFactory . createSqlType ( typeName , 3 ) ; break ; case CHAR : case VARCHAR : dataType = typeFactory . createTypeWithCharsetAndCollation ( typeFactory . createSqlType ( typeName ) , Calcites . defaultCharset ( ) , SqlCollation . IMPLICIT ) ; break ; default : dataType = typeFactory . createSqlType ( typeName ) ; } return typeFactory . createTypeWithNullability ( dataType , nullable ) ; }
Like RelDataTypeFactory.createSqlTypeWithNullability, but creates types that align best with how Druid
 represents them.
Like RelDataTypeFactory . createSqlTypeWithNullability but creates types that align best with how Druid represents them .
// Our timestamps are down to the millisecond (precision = 3).