Package org.apache.iceberg.transforms
Class UnknownTransform<S,T>
- java.lang.Object
-
- org.apache.iceberg.transforms.UnknownTransform<S,T>
-
- All Implemented Interfaces:
java.io.Serializable
,Transform<S,T>
public class UnknownTransform<S,T> extends java.lang.Object implements Transform<S,T>
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
apply(S value)
Transforms a value to its corresponding partition value.boolean
canTransform(Type type)
Checks whether this function can be applied to the givenType
.boolean
equals(java.lang.Object other)
Type
getResultType(Type type)
Returns theType
produced by this transform given a source type.int
hashCode()
UnboundPredicate<T>
project(java.lang.String name, BoundPredicate<S> predicate)
Transforms apredicate
to an inclusive predicate on the partition values produced byTransform.apply(Object)
.UnboundPredicate<T>
projectStrict(java.lang.String name, BoundPredicate<S> predicate)
Transforms apredicate
to a strict predicate on the partition values produced byTransform.apply(Object)
.java.lang.String
toString()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.iceberg.transforms.Transform
dedupName, isIdentity, preservesOrder, satisfiesOrderOf, toHumanString
-
-
-
-
Method Detail
-
apply
public T apply(S value)
Description copied from interface:Transform
Transforms a value to its corresponding partition value.
-
canTransform
public boolean canTransform(Type type)
Description copied from interface:Transform
Checks whether this function can be applied to the givenType
.- Specified by:
canTransform
in interfaceTransform<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 theType
produced by this transform given a source type.- Specified by:
getResultType
in interfaceTransform<S,T>
- Parameters:
type
- a type- Returns:
- the result type created by the apply method for the given type
-
project
public UnboundPredicate<T> project(java.lang.String name, BoundPredicate<S> predicate)
Description copied from interface:Transform
Transforms apredicate
to an inclusive predicate on the partition values produced byTransform.apply(Object)
.This inclusive transform guarantees that if pred(v) is true, then projected(apply(v)) is true.
-
projectStrict
public UnboundPredicate<T> projectStrict(java.lang.String name, BoundPredicate<S> predicate)
Description copied from interface:Transform
Transforms apredicate
to a strict predicate on the partition values produced byTransform.apply(Object)
.This strict transform guarantees that if strict(apply(v)) is true, then pred(v) is also true.
- Specified by:
projectStrict
in interfaceTransform<S,T>
- Parameters:
name
- the field name for partition valuespredicate
- a predicate for source values- Returns:
- an inclusive predicate on partition values
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-