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

TajoResultSetMetaData::getColumnType should use java.sql.Types

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Invalid
    • Affects Version/s: 0.8.0
    • Fix Version/s: None
    • Component/s: JDBC Driver
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: