public static UnboundTerm<Object> toTerm(String columnName, TransformSpec transformSpec) {
    if (transformSpec == null) {
      return null;
    }
    switch (transformSpec.getTransformType()) {
      case YEAR:
        return Expressions.year(columnName);
      case MONTH:
        return Expressions.month(columnName);
      case DAY:
        return Expressions.day(columnName);
      case HOUR:
        return Expressions.hour(columnName);
      case TRUNCATE:
        return Expressions.truncate(columnName, transformSpec.getTransformParam().get());
      case BUCKET:
        return Expressions.bucket(columnName, transformSpec.getTransformParam().get());
      case IDENTITY:
        return null;
      default:
        throw new UnsupportedOperationException("Unknown transformSpec: " + transformSpec);
    }
  }
Translate leaf nodes from Hive operator to Iceberg operator.
@param leaf Leaf node
@return Expression fully translated from Hive PredicateLeaf
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergFilterFactory.java