Class FunctionArguments

java.lang.Object
org.apache.cassandra.cql3.functions.FunctionArguments
All Implemented Interfaces:
Arguments

public final class FunctionArguments extends Object implements Arguments
Default Arguments implementation.
  • Constructor Details

  • Method Details

    • newInstanceForUdf

      public static FunctionArguments newInstanceForUdf(ProtocolVersion version, List<UDFDataType> argTypes)
      Creates a new FunctionArguments for the specified types.
      Parameters:
      version - the protocol version
      argTypes - the argument types
      Returns:
      a new FunctionArguments for the specified types.
    • getProtocolVersion

      public ProtocolVersion getProtocolVersion()
      Description copied from interface: Arguments
      Returns the protocol version
      Specified by:
      getProtocolVersion in interface Arguments
      Returns:
      the protocol version
    • newNoopInstance

      public static FunctionArguments newNoopInstance(ProtocolVersion version, int numberOfArguments)
      Creates a new FunctionArguments that does not deserialize the arguments.
      Parameters:
      version - the protocol version
      numberOfArguments - the number of argument
      Returns:
      a new FunctionArguments for the specified types.
    • emptyInstance

      public static FunctionArguments emptyInstance(ProtocolVersion version)
      Creates an empty FunctionArguments.
      Parameters:
      version - the protocol version
      Returns:
      an empty FunctionArguments
    • newInstanceForNativeFunction

      public static FunctionArguments newInstanceForNativeFunction(ProtocolVersion version, List<AbstractType<?>> argTypes)
      Creates a new FunctionArguments for a native function.

      Native functions can use different ArgumentDeserializer to avoid instanciating primitive wrappers.

      Parameters:
      version - the protocol version
      argTypes - the argument types
      Returns:
      a new FunctionArguments for the specified types.
    • set

      public void set(int i, ByteBuffer buffer)
      Description copied from interface: Arguments
      Sets the specified value to the arguments
      Specified by:
      set in interface Arguments
      Parameters:
      i - the argument position
      buffer - the serialized argument
    • containsNulls

      public boolean containsNulls()
      Description copied from interface: Arguments
      Checks if at least one of the arguments is null.
      Specified by:
      containsNulls in interface Arguments
      Returns:
      true if at least one of the arguments is null, false otherwise.
    • get

      public <T> T get(int i)
      Description copied from interface: Arguments
      Returns the specified argument
      Specified by:
      get in interface Arguments
      Parameters:
      i - the argument index
      Returns:
      the specified argument
    • size

      public int size()
      Description copied from interface: Arguments
      Returns the current number of arguments.
      Specified by:
      size in interface Arguments
      Returns:
      the current number of arguments.