private int getColIndex(final String internalName) {
    // The above line should have been all the implementation that
    // we need, but due to a bug in that impl which recognizes
    // only single-digit columns, we need another impl here.
    final Matcher m = internalPattern.matcher(internalName);
    return m.matches() ? Integer.parseInt(m.group(1)) : -1;
  }
Look up a column based on its index.

@param internalName The name of the column
@return The index of the field or -1 if the field name does not contain its
        index number too
serde/src/java/org/apache/hadoop/hive/serde2/json/HiveJsonReader.java