@Override
  public Object evaluate(DeferredObject[] arguments) throws HiveException {

    DeferredObject argument = arguments[0];
    if (argument == null || argument.get() == null) {
      return null;
    } else {
      evaluator.apply(argument);
    }

    return result;
  }
GenericUDFIcebergBucket - UDF that wraps around Iceberg's bucket transform function
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/udf/GenericUDFIcebergBucket.java