Class UnknownTransform<S,T>

java.lang.Object
org.apache.iceberg.transforms.UnknownTransform<S,T>
All Implemented Interfaces:
Serializable, Transform<S,T>

public class UnknownTransform<S,T> extends Object implements Transform<S,T>
See Also:
  • Method Details

    • apply

      public T apply(S value)
      Description copied from interface: Transform
      Transforms a value to its corresponding partition value.
      Specified by:
      apply in interface Transform<S,T>
      Parameters:
      value - a source value
      Returns:
      a transformed partition value
    • bind

      public SerializableFunction<S,T> bind(Type type)
      Description copied from interface: Transform
      Returns a function that applies this transform to values of the given type.
      Specified by:
      bind in interface Transform<S,T>
      Parameters:
      type - an Iceberg Type
      Returns:
      a Function that applies this transform to values of the given type.
    • canTransform

      public boolean canTransform(Type type)
      Description copied from interface: Transform
      Checks whether this function can be applied to the given Type.
      Specified by:
      canTransform in interface Transform<S,T>
      Parameters:
      type - a type
      Returns:
      true if this transform can be applied to the type, false otherwise
    • getResultType

      public Type getResultType(Type type)
      Description copied from interface: Transform
      Returns the Type produced by this transform given a source type.
      Specified by:
      getResultType in interface Transform<S,T>
      Parameters:
      type - a type
      Returns:
      the result type created by the apply method for the given type
    • project

      public UnboundPredicate<T> project(String name, BoundPredicate<S> predicate)
      Description copied from interface: Transform
      Transforms a predicate to an inclusive predicate on the partition values produced by the transform.

      This inclusive transform guarantees that if pred(v) is true, then projected(apply(v)) is true.

      Specified by:
      project in interface Transform<S,T>
      Parameters:
      name - the field name for partition values
      predicate - a predicate for source values
      Returns:
      an inclusive predicate on partition values
    • projectStrict

      public UnboundPredicate<T> projectStrict(String name, BoundPredicate<S> predicate)
      Description copied from interface: Transform
      Transforms a predicate to a strict predicate on the partition values produced by the transform.

      This strict transform guarantees that if strict(apply(v)) is true, then pred(v) is also true.

      Specified by:
      projectStrict in interface Transform<S,T>
      Parameters:
      name - the field name for partition values
      predicate - a predicate for source values
      Returns:
      an inclusive predicate on partition values
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object