Class TimeFcts.FloorTimestampFunction
java.lang.Object
org.apache.cassandra.cql3.functions.AbstractFunction
org.apache.cassandra.cql3.functions.NativeFunction
org.apache.cassandra.cql3.functions.NativeScalarFunction
org.apache.cassandra.cql3.functions.TimeFcts.FloorTimestampFunction
- All Implemented Interfaces:
AssignmentTestable,Function,ScalarFunction
- Enclosing class:
- TimeFcts
Function that rounds a timestamp down to the closest multiple of a duration.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.cassandra.cql3.AssignmentTestable
AssignmentTestable.TestResult -
Field Summary
Fields inherited from class org.apache.cassandra.cql3.functions.AbstractFunction
argTypes, name, returnTypeFields inherited from interface org.apache.cassandra.cql3.functions.Function
UNRESOLVED -
Method Summary
Modifier and TypeMethodDescriptionfinal ByteBufferApplies this function to the specified arguments.protected ByteBufferfromTimeInMillis(long timeInMillis) Serializes the specified time.protected booleanisPartialApplicationMonotonic(List<ByteBuffer> partialParameters) Checks if a partial application of the function is monotonic.protected voidvalidateDuration(Duration duration) Validates that the duration has the correct precision.Methods inherited from class org.apache.cassandra.cql3.functions.NativeScalarFunction
isAggregate, isCalledOnNullInputMethods inherited from class org.apache.cassandra.cql3.functions.NativeFunction
isNative, isPure, newArguments, withLegacyNameMethods inherited from class org.apache.cassandra.cql3.functions.AbstractFunction
addFunctionsTo, argTypes, argumentsList, columnName, elementKeyspace, elementName, equals, getCompatibleTypeIfKnown, hashCode, name, referencesUserType, returnType, testAssignment, toCqlString, toString, typesMatchMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.cassandra.cql3.AssignmentTestable
getCompatibleTypeIfKnown, testAssignmentMethods inherited from interface org.apache.cassandra.cql3.functions.Function
addFunctionsTo, argTypes, columnName, compare, isNative, isPure, name, newArguments, referencesUserType, returnTypeMethods inherited from interface org.apache.cassandra.cql3.functions.ScalarFunction
isMonotonic, partialApplication
-
Method Details
-
newInstance
-
newInstanceWithStartTimeArgument
-
fromTimeInMillis
Serializes the specified time.- Parameters:
timeInMillis- the time in milliseconds- Returns:
- the serialized time
-
isPartialApplicationMonotonic
Description copied from class:NativeScalarFunctionChecks if a partial application of the function is monotonic.A function is monotonic if it is either entirely nonincreasing or nondecreasing.
- Overrides:
isPartialApplicationMonotonicin classNativeScalarFunction- Parameters:
partialParameters- the input parameters used to create the partial application of the function- Returns:
trueif the partial application of the function is monotonicfalseotherwise.
-
execute
Description copied from interface:ScalarFunctionApplies this function to the specified arguments.- Parameters:
arguments- the input arguments for the function- Returns:
- the result of applying this function to the arguments
-
validateDuration
Validates that the duration has the correct precision.- Parameters:
duration- the duration to validate.
-