Uploaded image for project: 'Tajo (Retired)'
  1. Tajo (Retired)
  2. TAJO-764

TajoResultSetMetaData::getColumnType should use java.sql.Types

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Invalid
    • 0.8.0
    • None
    • JDBC Driver
    • None

    Description

      See the title.

      Currently, getColumnType method uses the following function. It returns invalid integer values. We should fix it.

      public static int tajoTypeToSqlType(TajoDataTypes.DataType type) throws SQLException {
          switch (type.getType()) {
          case BOOLEAN:
            return Types.BOOLEAN;
          case INT1:
            return Types.TINYINT;
          case INT2:
            return Types.SMALLINT;
          case INT4:
            return Types.INTEGER;
          case INT8:
            return Types.BIGINT;
          case FLOAT4:
            return Types.FLOAT;
          case FLOAT8:
            return Types.DOUBLE;
          case NUMERIC:
            return Types.NUMERIC;
          case DATE:
            return Types.TIMESTAMP;
          case VARCHAR:
            return Types.VARCHAR;
          case TEXT:
            return Types.VARCHAR;
          default:
            throw new SQLException("Unrecognized column type: " + type);
          }
        }
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            hyunsik Hyunsik Choi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: