Package org.apache.iceberg.transforms
Class Hours<T>
java.lang.Object
org.apache.iceberg.transforms.Hours<T>
- All Implemented Interfaces:
- Serializable,- Transform<T,- Integer> 
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionReturns a function that applies this transform to values of the giventype.booleancanTransform(Type type) Checks whether this function can be applied to the givenType.Return the unique transform name to check if similar transforms for the same source field are added multiple times in partition spec builder.protected static <R> RfromSourceType(Type type, R dateResult, R microsResult, R nanosResult) getResultType(Type sourceType) Returns theTypeproduced by this transform given a source type.protected ChronoUnitbooleanWhether the transform preserves the order of values (is monotonic).project(String name, BoundPredicate<T> predicate) Transforms apredicateto an inclusive predicate on the partition values produced by the transform.projectStrict(String name, BoundPredicate<T> predicate) Transforms apredicateto a strict predicate on the partition values produced by the transform.booleansatisfiesOrderOf(Transform<?, ?> other) Whether ordering by this transform's result satisfies the ordering of another transform's result.toHumanString(Type alwaysInt, Integer value) toString()Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.iceberg.transforms.Transformapply, isIdentity, isVoid, toHumanString
- 
Constructor Details- 
Hourspublic Hours()
 
- 
- 
Method Details- 
granularity
- 
toEnum
- 
canTransformDescription copied from interface:TransformChecks whether this function can be applied to the givenType.- Specified by:
- canTransformin interface- Transform<T,- Integer> 
- Parameters:
- type- a type
- Returns:
- true if this transform can be applied to the type, false otherwise
 
- 
getResultTypeDescription copied from interface:TransformReturns theTypeproduced by this transform given a source type.- Parameters:
- sourceType- a type
- Returns:
- the result type created by the apply method for the given type
 
- 
toHumanString
- 
toString
- 
fromSourceType
- 
bindDescription copied from interface:TransformReturns a function that applies this transform to values of the giventype.
- 
preservesOrderpublic boolean preservesOrder()Description copied from interface:TransformWhether the transform preserves the order of values (is monotonic).A transform preserves order for values when for any given a and b, if a < b then apply(a) <= apply(b). - Specified by:
- preservesOrderin interface- Transform<S,- Integer> 
- Returns:
- true if the transform preserves the order of values
 
- 
satisfiesOrderOfDescription copied from interface:TransformWhether ordering by this transform's result satisfies the ordering of another transform's result.For example, sorting by day(ts) will produce an ordering that is also by month(ts) or year(ts). However, sorting by day(ts) will not satisfy the order of hour(ts) or identity(ts). - Specified by:
- satisfiesOrderOfin interface- Transform<S,- Integer> 
- Returns:
- true if ordering by this transform is equivalent to ordering by the other transform
 
- 
projectDescription copied from interface:TransformTransforms apredicateto 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. 
- 
projectStrictDescription copied from interface:TransformTransforms apredicateto 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:
- projectStrictin interface- Transform<S,- Integer> 
- Parameters:
- name- the field name for partition values
- predicate- a predicate for source values
- Returns:
- an inclusive predicate on partition values
 
- 
dedupNameDescription copied from interface:TransformReturn the unique transform name to check if similar transforms for the same source field are added multiple times in partition spec builder.
 
-