@Override public Object evaluate(DeferredObject[] arguments) throws HiveException {
    if (arguments[0] == null) {
      return null;
    }
    Timestamp ts = PrimitiveObjectInspectorUtils.getTimestamp(arguments[0].get(), timestampOI);
    HiveIntervalDayTime idt = PrimitiveObjectInspectorUtils.getHiveIntervalDayTime(arguments[1].get(), intervalOI);
    Timestamp
        origin =
        originTsOI == null ?
            Timestamp.ofEpochMilli(0) :
            PrimitiveObjectInspectorUtils.getTimestamp(arguments[2].get(), originTsOI);
    timestampResult.set(Timestamp.ofEpochMilli(truncate(ts, idt, origin)));
    return timestampResult;
  }
Evaluate the GenericUDF with the arguments.

@param arguments timestamp and interval.

@return The truncated timestamp to the beginning of tumbled window interval.
ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFTumbledWindow.java