private Object getColumnValue(int columnIndex) throws SQLException {
    if (row == null) {
      throw new SQLException("No row found");
    }
    if (row.length == 0) {
      throw new SQLException("RowSet does not contain any columns");
    }
    // the first column is 1, the second is 2, ...
    if (columnIndex <= 0 || columnIndex > row.length) {
      throw new SQLException("Invalid columnIndex: " + columnIndex);
    }

    final Object value = row[columnIndex - 1];
    if (useConvertedResultSet) {
      // Conversion has been done already so just return the object
      wasNull = value == null;
      return value;
    }

    final Type columnType = getSchema().getColumnDescriptorAt(columnIndex - 1).getType();

    try {
      final Object evaluated = evaluate(columnType, value);
      wasNull = evaluated == null;
      return evaluated;
    } catch (Exception e) {
      throw new SQLException("Failed to evaluate " + columnType + " [" + value + "]", e);
    }
  }
Retrieves the value of the designated column in the current row of this
ResultSet object as a boolean in the Java programming language. If the
designated column has a datatype of CHAR or VARCHAR and contains a "0" or
has a datatype of BIT, TINYINT, SMALLINT, INTEGER or BIGINT and contains a
0, a value of false is returned.

For a true value, this implementation relaxes the JDBC specs. If the
designated column has a datatype of CHAR or VARCHAR and contains a values
other than "0" or has a datatype of BIT, TINYINT, SMALLINT, INTEGER or
BIGINT and contains a value other than 0, a value of true is returned.

@param columnLabel the label for the column specified with the SQL AS
         clause. If the SQL AS clause was not specified, then the label is
         the name of the column
@return the column value; if the value is SQL NULL, the value returned is
        false
@throws SQLException if the columnIndex is not valid; if a database access error occurs
          or this method is called on a closed result set
@see ResultSet#getBoolean(String)
jdbc/src/java/org/apache/hive/jdbc/HiveBaseResultSet.java