@Override
  public ObjectInspector initialize(ObjectInspector rowInspector) throws HiveException {

    // We need to support field names like KEY.0, VALUE.1 between
    // map-reduce boundary.
    String[] names = expr.getColumn().split("\\.");
    String[] unionfields = names[0].split("\\:");
    if (names.length == 1 && unionfields.length == 1) {
      simpleCase = true;
      inspector = (StructObjectInspector) rowInspector;
      field = inspector.getStructFieldRef(names[0]);
      return outputOI = field.getFieldObjectInspector();
    }

    simpleCase = false;
    inspectors = new StructObjectInspector[names.length];
    fields = new StructField[names.length];
    unionField = new boolean[names.length];
    int unionIndex = -1;
    for (int i = 0; i < names.length; i++) {
      if (i == 0) {
        inspectors[0] = (StructObjectInspector) rowInspector;
      } else {
        if (unionIndex == -1) {
          inspectors[i] = (StructObjectInspector) fields[i - 1]
              .getFieldObjectInspector();
        } else {
          inspectors[i] = (StructObjectInspector) (
              (UnionObjectInspector)fields[i-1].getFieldObjectInspector()).
              getObjectInspectors().get(unionIndex);
        }
      }
      // to support names like _colx:1._coly
      unionfields = names[i].split("\\:");
      fields[i] = inspectors[i].getStructFieldRef(unionfields[0]);
      if (unionfields.length > 1) {
        unionIndex = Integer.parseInt(unionfields[1]);
        unionField[i] = true;
      } else {
        unionIndex = -1;
        unionField[i] = false;
      }
    }
    return outputOI = fields[names.length - 1].getFieldObjectInspector();
  }
This evaluator gets the column from the row object.
ql/src/java/org/apache/hadoop/hive/ql/exec/ExprNodeColumnEvaluator.java