@Override
  protected Object _evaluate(Object row, int version) throws HiveException {

    // Get the result in leftInspectableObject
    Object left = leftEvaluator.evaluate(row, version);

    if (expr.getIsList()) {
      List<?> list = ((ListObjectInspector) leftInspector).getList(left);
      if (list == null) {
        return null;
      } else {
        cachedList.clear();
        for (int i = 0; i < list.size(); i++) {
          cachedList.add(structObjectInspector.getStructFieldData(list.get(i),
              field));
        }
        return cachedList;
      }
    } else {
      return structObjectInspector.getStructFieldData(left, field);
    }
  }
This Evaluator can evaluate s.f for s as both struct and list of struct. If s
is struct, then s.f is the field. If s is list of struct, then s.f is the
list of struct field.
ql/src/java/org/apache/hadoop/hive/ql/exec/ExprNodeFieldEvaluator.java