@Override
  public int findColumn(final String columnName) throws SQLException {
    if (columnName == null) {
      throw new SQLException("null column name not supported");
    }
    final String lcColumnName = columnName.toLowerCase();
    final Integer result = this.columnNameIndexCache.computeIfAbsent(lcColumnName, cn -> {
      int columnIndex = 0;
      for (final String normalizedColumnName : normalizedColumnNames) {
        ++columnIndex;
        final int idx = normalizedColumnName.lastIndexOf('.');
        final String name = (idx == -1) ? normalizedColumnName : normalizedColumnName.substring(1 + idx);
        if (name.equals(cn) || normalizedColumnName.equals(cn)) {
          return columnIndex;
        }
      }
      return null;
    });
    if (result == null) {
      throw new SQLException("Could not find " + columnName + " in " + normalizedColumnNames);
    }
    return result.intValue();
  }
Data independent base class which implements the common part of all Hive
result sets.
jdbc/src/java/org/apache/hive/jdbc/HiveBaseResultSet.java