@Override
  public ObjectInspector initialize(ObjectInspector rowInspector) throws HiveException {
    leftInspector = leftEvaluator.initialize(rowInspector);
    if (expr.getIsList()) {
      structObjectInspector = (StructObjectInspector) ((ListObjectInspector) leftInspector)
          .getListElementObjectInspector();
    } else {
      structObjectInspector = (StructObjectInspector) leftInspector;
    }
    field = structObjectInspector.getStructFieldRef(expr.getFieldName());
    structFieldObjectInspector = field.getFieldObjectInspector();

    if (expr.getIsList()) {
      resultObjectInspector = ObjectInspectorFactory
          .getStandardListObjectInspector(structFieldObjectInspector);
    } else {
      resultObjectInspector = structFieldObjectInspector;
    }
    return outputOI = resultObjectInspector;
  }
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