kyuubi-hive-jdbc/src/main/java/org/apache/kyuubi/jdbc/hive/KyuubiArrowBasedResultSet.java [431:553]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  @Override
  public Timestamp getTimestamp(String columnName) throws SQLException {
    return getTimestamp(findColumn(columnName));
  }

  @Override
  public Timestamp getTimestamp(int columnIndex, Calendar cal) throws SQLException {
    Timestamp value = getTimestamp(columnIndex);
    if (value == null) {
      return null;
    }
    try {
      return parseTimestamp(value, cal);
    } catch (IllegalArgumentException e) {
      throw new KyuubiSQLException(
          "Cannot convert column " + columnIndex + " to timestamp: " + e, e);
    }
  }

  @Override
  public Timestamp getTimestamp(String columnLabel, Calendar cal) throws SQLException {
    return this.getTimestamp(findColumn(columnLabel), cal);
  }

  private Timestamp parseTimestamp(Timestamp timestamp, Calendar cal) {
    if (cal == null) {
      cal = Calendar.getInstance();
    }
    long v = timestamp.getTime();
    cal.setTimeInMillis(v);
    timestamp = new Timestamp(cal.getTime().getTime());
    return timestamp;
  }

  @Override
  public Time getTime(int columnIndex) throws SQLException {
    Object obj = getObject(columnIndex);
    if (obj == null) {
      return null;
    }
    if (obj instanceof Time) {
      return (Time) obj;
    }
    if (obj instanceof String) {
      return Time.valueOf((String) obj);
    }
    throw new KyuubiSQLException("Illegal conversion");
  }

  @Override
  public Time getTime(String columnLabel) throws SQLException {
    return getTime(findColumn(columnLabel));
  }

  @Override
  public Time getTime(int columnIndex, Calendar cal) throws SQLException {
    Time value = getTime(columnIndex);
    if (value == null) {
      return null;
    }
    try {
      return parseTime(value, cal);
    } catch (IllegalArgumentException e) {
      throw new KyuubiSQLException("Cannot convert column " + columnIndex + " to time: " + e, e);
    }
  }

  @Override
  public Time getTime(String columnLabel, Calendar cal) throws SQLException {
    return this.getTime(findColumn(columnLabel), cal);
  }

  private Time parseTime(Time date, Calendar cal) {
    if (cal == null) {
      cal = Calendar.getInstance();
    }
    long v = date.getTime();
    cal.setTimeInMillis(v);
    date = new Time(cal.getTime().getTime());
    return date;
  }

  @Override
  public int getType() throws SQLException {
    return ResultSet.TYPE_FORWARD_ONLY;
  }

  @Override
  public boolean rowDeleted() throws SQLException {
    return false;
  }

  @Override
  public boolean rowInserted() throws SQLException {
    return false;
  }

  @Override
  public boolean rowUpdated() throws SQLException {
    return false;
  }

  @Override
  public SQLWarning getWarnings() throws SQLException {
    return warningChain;
  }

  @Override
  public void clearWarnings() throws SQLException {
    warningChain = null;
  }

  @Override
  public boolean wasNull() throws SQLException {
    return wasNull;
  }

  protected void setSchema(TTableSchema schema) {
    this.schema = schema;
  }

  protected TTableSchema getSchema() {
    return schema;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



kyuubi-hive-jdbc/src/main/java/org/apache/kyuubi/jdbc/hive/KyuubiBaseResultSet.java [507:629]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  @Override
  public Timestamp getTimestamp(String columnName) throws SQLException {
    return getTimestamp(findColumn(columnName));
  }

  @Override
  public Timestamp getTimestamp(int columnIndex, Calendar cal) throws SQLException {
    Timestamp value = getTimestamp(columnIndex);
    if (value == null) {
      return null;
    }
    try {
      return parseTimestamp(value, cal);
    } catch (IllegalArgumentException e) {
      throw new KyuubiSQLException(
          "Cannot convert column " + columnIndex + " to timestamp: " + e, e);
    }
  }

  @Override
  public Timestamp getTimestamp(String columnLabel, Calendar cal) throws SQLException {
    return this.getTimestamp(findColumn(columnLabel), cal);
  }

  private Timestamp parseTimestamp(Timestamp timestamp, Calendar cal) {
    if (cal == null) {
      cal = Calendar.getInstance();
    }
    long v = timestamp.getTime();
    cal.setTimeInMillis(v);
    timestamp = new Timestamp(cal.getTime().getTime());
    return timestamp;
  }

  @Override
  public Time getTime(int columnIndex) throws SQLException {
    Object obj = getObject(columnIndex);
    if (obj == null) {
      return null;
    }
    if (obj instanceof Time) {
      return (Time) obj;
    }
    if (obj instanceof String) {
      return Time.valueOf((String) obj);
    }
    throw new KyuubiSQLException("Illegal conversion");
  }

  @Override
  public Time getTime(String columnLabel) throws SQLException {
    return getTime(findColumn(columnLabel));
  }

  @Override
  public Time getTime(int columnIndex, Calendar cal) throws SQLException {
    Time value = getTime(columnIndex);
    if (value == null) {
      return null;
    }
    try {
      return parseTime(value, cal);
    } catch (IllegalArgumentException e) {
      throw new KyuubiSQLException("Cannot convert column " + columnIndex + " to time: " + e, e);
    }
  }

  @Override
  public Time getTime(String columnLabel, Calendar cal) throws SQLException {
    return this.getTime(findColumn(columnLabel), cal);
  }

  private Time parseTime(Time date, Calendar cal) {
    if (cal == null) {
      cal = Calendar.getInstance();
    }
    long v = date.getTime();
    cal.setTimeInMillis(v);
    date = new Time(cal.getTime().getTime());
    return date;
  }

  @Override
  public int getType() throws SQLException {
    return ResultSet.TYPE_FORWARD_ONLY;
  }

  @Override
  public boolean rowDeleted() throws SQLException {
    return false;
  }

  @Override
  public boolean rowInserted() throws SQLException {
    return false;
  }

  @Override
  public boolean rowUpdated() throws SQLException {
    return false;
  }

  @Override
  public SQLWarning getWarnings() throws SQLException {
    return warningChain;
  }

  @Override
  public void clearWarnings() throws SQLException {
    warningChain = null;
  }

  @Override
  public boolean wasNull() throws SQLException {
    return wasNull;
  }

  protected void setSchema(TTableSchema schema) {
    this.schema = schema;
  }

  protected TTableSchema getSchema() {
    return schema;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



