private static VectorExpressionWriter genVectorExpressionWritableIntervalDayTime(
      SettableHiveIntervalDayTimeObjectInspector fieldObjInspector) throws HiveException {

    return new VectorExpressionWriterIntervalDayTime() {
      private Object obj;
      private HiveIntervalDayTime interval;

      public VectorExpressionWriter init(SettableHiveIntervalDayTimeObjectInspector objInspector)
          throws HiveException {
        super.init(objInspector);
        interval = new HiveIntervalDayTime();
        obj = initValue(null);
        return this;
      }

      @Override
      public Object writeValue(HiveIntervalDayTimeWritable value) throws HiveException {
        interval.set(value.getHiveIntervalDayTime());
        return ((SettableHiveIntervalDayTimeObjectInspector) this.objectInspector).set(obj, interval);
      }

      @Override
      public Object writeValue(HiveIntervalDayTime value) throws HiveException {
        interval.set(value);
        return ((SettableHiveIntervalDayTimeObjectInspector) this.objectInspector).set(obj, interval);
      }

      @Override
      public Object setValue(Object field, HiveIntervalDayTimeWritable value) {
        if (null == field) {
          field = initValue(null);
        }
        interval.set(value.getHiveIntervalDayTime());
        return ((SettableHiveIntervalDayTimeObjectInspector) this.objectInspector).set(field, interval);
      }

      @Override
      public Object setValue(Object field, HiveIntervalDayTime value) {
        if (null == field) {
          field = initValue(null);
        }
        interval.set(value);
        return ((SettableHiveIntervalDayTimeObjectInspector) this.objectInspector).set(field, interval);
      }

      @Override
      public Object initValue(Object ignored) {
        return ((SettableHiveIntervalDayTimeObjectInspector) this.objectInspector)
            .create(new HiveIntervalDayTime());
      }
   }.init(fieldObjInspector);
  }
Compiles the appropriate vector expression writers based on a struct object
inspector.
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/VectorExpressionWriterFactory.java