Class TimeFcts.FloorDateFunction
- 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.FloorDateFunction
-
- All Implemented Interfaces:
AssignmentTestable,Function,ScalarFunction
- Enclosing class:
- TimeFcts
public static final class TimeFcts.FloorDateFunction extends NativeScalarFunction
Function that rounds a date 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, returnType
-
Fields inherited from interface org.apache.cassandra.cql3.functions.Function
UNRESOLVED
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.nio.ByteBufferfromTimeInMillis(long timeInMillis)Serializes the specified time.static TimeFcts.FloorDateFunctionnewInstance()static TimeFcts.FloorDateFunctionnewInstanceWithStartTimeArgument()protected java.lang.LongtoStartingTimeInMillis(java.nio.ByteBuffer bytes)Deserializes the specified starting time.protected java.lang.LongtoTimeInMillis(java.nio.ByteBuffer bytes)Deserializes the specified input time.protected voidvalidateDuration(Duration duration)Validates that the duration has the correct precision.-
Methods inherited from class org.apache.cassandra.cql3.functions.NativeScalarFunction
isAggregate, isCalledOnNullInput
-
Methods inherited from class org.apache.cassandra.cql3.functions.NativeFunction
isNative, isPure
-
Methods inherited from class org.apache.cassandra.cql3.functions.AbstractFunction
addFunctionsTo, argTypes, argumentsList, columnName, elementKeyspace, elementName, equals, hashCode, name, referencesUserType, returnType, testAssignment, toCqlString, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.cassandra.cql3.AssignmentTestable
testAssignment
-
Methods inherited from interface org.apache.cassandra.cql3.functions.Function
addFunctionsTo, argTypes, columnName, compare, isNative, isPure, name, referencesUserType, returnType
-
Methods inherited from interface org.apache.cassandra.cql3.functions.ScalarFunction
isMonotonic, partialApplication
-
-
-
-
Method Detail
-
newInstance
public static TimeFcts.FloorDateFunction newInstance()
-
newInstanceWithStartTimeArgument
public static TimeFcts.FloorDateFunction newInstanceWithStartTimeArgument()
-
fromTimeInMillis
protected java.nio.ByteBuffer fromTimeInMillis(long timeInMillis)
Serializes the specified time.- Parameters:
timeInMillis- the time in milliseconds- Returns:
- the serialized time
-
toStartingTimeInMillis
protected java.lang.Long toStartingTimeInMillis(java.nio.ByteBuffer bytes)
Deserializes the specified starting time.- Parameters:
bytes- the serialized starting time- Returns:
- the starting time in milliseconds
-
toTimeInMillis
protected java.lang.Long toTimeInMillis(java.nio.ByteBuffer bytes)
Deserializes the specified input time.- Parameters:
bytes- the serialized time- Returns:
- the time in milliseconds
-
validateDuration
protected void validateDuration(Duration duration)
Validates that the duration has the correct precision.- Parameters:
duration- the duration to validate.
-
-