Class NativeFunction
java.lang.Object
org.apache.cassandra.cql3.functions.AbstractFunction
org.apache.cassandra.cql3.functions.NativeFunction
- All Implemented Interfaces:
AssignmentTestable,Function
- Direct Known Subclasses:
NativeAggregateFunction,NativeScalarFunction
Base class for our native/hardcoded functions.
-
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 -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedNativeFunction(String name, AbstractType<?> returnType, AbstractType<?>... argTypes) -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanisNative()Checks whether the function is a native/hard coded one or not.booleanisPure()Checks whether the function is a pure function (as in doesn't depend on, nor produces side effects) or not.newArguments(ProtocolVersion version) Creates some new input arguments for this function.Returns a copy of this function using its old pre-5.0 name before the adoption of snake-cased function names.Methods 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.functions.Function
compare, isAggregate
-
Constructor Details
-
NativeFunction
-
-
Method Details
-
isNative
public final boolean isNative()Description copied from interface:FunctionChecks whether the function is a native/hard coded one or not.- Returns:
trueif the function is a native/hard coded one,falseotherwise.
-
isPure
public boolean isPure()Description copied from interface:FunctionChecks whether the function is a pure function (as in doesn't depend on, nor produces side effects) or not.- Returns:
trueif the function is a pure function,falseotherwise.
-
withLegacyName
Returns a copy of this function using its old pre-5.0 name before the adoption of snake-cased function names. Those naming conventions were adopted in 5.0, but we still need to support the old names for compatibility. See CASSANDRA-18037 for further details.- Returns:
- a copy of this function using its old pre-5.0 deprecated name, or
nullif the pre-5.0 function name already satisfied the naming conventions.
-
newArguments
Description copied from interface:FunctionCreates some new input arguments for this function.- Parameters:
version- the protocol version- Returns:
- some new input arguments for this function
-