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

public abstract class NativeFunction extends AbstractFunction
Base class for our native/hardcoded functions.
  • Constructor Details

  • Method Details

    • isNative

      public final boolean isNative()
      Description copied from interface: Function
      Checks whether the function is a native/hard coded one or not.
      Returns:
      true if the function is a native/hard coded one, false otherwise.
    • isPure

      public boolean isPure()
      Description copied from interface: Function
      Checks whether the function is a pure function (as in doesn't depend on, nor produces side effects) or not.
      Returns:
      true if the function is a pure function, false otherwise.
    • withLegacyName

      @Nullable public NativeFunction 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 null if the pre-5.0 function name already satisfied the naming conventions.
    • newArguments

      public Arguments newArguments(ProtocolVersion version)
      Description copied from interface: Function
      Creates some new input arguments for this function.
      Parameters:
      version - the protocol version
      Returns:
      some new input arguments for this function