Skip to main content

Class ExecuteProcRequest

java.lang.Object
com.gpudb.protocol.ExecuteProcRequest
All Implemented Interfaces:
org.apache.avro.generic.GenericContainer, org.apache.avro.generic.IndexedRecord

public class ExecuteProcRequest extends Object implements org.apache.avro.generic.IndexedRecord
A set of parameters for GPUdb.executeProc.

Executes a proc. This endpoint is asynchronous and does not wait for the proc to complete before returning.

If the proc being executed is distributed, inputTableNames and inputColumnNames may be passed to the proc to use for reading data, and outputTableNames may be passed to the proc to use for writing data.

If the proc being executed is non-distributed, these table parameters will be ignored.

  • Constructor Details

    • ExecuteProcRequest

      public ExecuteProcRequest()
      Constructs an ExecuteProcRequest object with default parameters.
    • ExecuteProcRequest

      public ExecuteProcRequest(String procName, Map<String,String> params, Map<String,ByteBuffer> binParams, List<String> inputTableNames, Map<String,List<String>> inputColumnNames, List<String> outputTableNames, Map<String,String> options)
      Constructs an ExecuteProcRequest object with the specified parameters.
      Parameters:
      procName - Name of the proc to execute. Must be the name of a currently existing proc.
      params - A map containing named parameters to pass to the proc. Each key/value pair specifies the name of a parameter and its value. The default value is an empty Map.
      binParams - A map containing named binary parameters to pass to the proc. Each key/value pair specifies the name of a parameter and its value. The default value is an empty Map.
      inputTableNames - Names of the tables containing data to be passed to the proc. Each name specified must be the name of a currently existing table, in [schema_name.]table_name format, using standard name resolution rules. If no table names are specified, no data will be passed to the proc. This parameter is ignored if the proc has a non-distributed execution mode. The default value is an empty List.
      inputColumnNames - Map of table names from inputTableNames to lists of names of columns from those tables that will be passed to the proc. Each column name specified must be the name of an existing column in the corresponding table. If a table name from inputTableNames is not included, all columns from that table will be passed to the proc. This parameter is ignored if the proc has a non-distributed execution mode. The default value is an empty Map.
      outputTableNames - Names of the tables to which output data from the proc will be written, each in [schema_name.]table_name format, using standard name resolution rules and meeting table naming criteria. If a specified table does not exist, it will automatically be created with the same schema as the corresponding table (by order) from inputTableNames, excluding any primary and shard keys. If a specified table is a non-persistent result table, it must not have primary or shard keys. If no table names are specified, no output data can be returned from the proc. This parameter is ignored if the proc has a non-distributed execution mode. The default value is an empty List.
      options - Optional parameters.The default value is an empty Map.
  • Method Details

    • getClassSchema

      public static org.apache.avro.Schema getClassSchema()
      This method supports the Avro framework and is not intended to be called directly by the user.
      Returns:
      The schema for the class.
    • getProcName

      public String getProcName()
      Name of the proc to execute. Must be the name of a currently existing proc.
      Returns:
      The current value of procName.
    • setProcName

      public ExecuteProcRequest setProcName(String procName)
      Name of the proc to execute. Must be the name of a currently existing proc.
      Parameters:
      procName - The new value for procName.
      Returns:
      this to mimic the builder pattern.
    • getParams

      public Map<String,String> getParams()
      A map containing named parameters to pass to the proc. Each key/value pair specifies the name of a parameter and its value. The default value is an empty Map.
      Returns:
      The current value of params.
    • setParams

      public ExecuteProcRequest setParams(Map<String,String> params)
      A map containing named parameters to pass to the proc. Each key/value pair specifies the name of a parameter and its value. The default value is an empty Map.
      Parameters:
      params - The new value for params.
      Returns:
      this to mimic the builder pattern.
    • getBinParams

      public Map<String,ByteBuffer> getBinParams()
      A map containing named binary parameters to pass to the proc. Each key/value pair specifies the name of a parameter and its value. The default value is an empty Map.
      Returns:
      The current value of binParams.
    • setBinParams

      public ExecuteProcRequest setBinParams(Map<String,ByteBuffer> binParams)
      A map containing named binary parameters to pass to the proc. Each key/value pair specifies the name of a parameter and its value. The default value is an empty Map.
      Parameters:
      binParams - The new value for binParams.
      Returns:
      this to mimic the builder pattern.
    • getInputTableNames

      public List<String> getInputTableNames()
      Names of the tables containing data to be passed to the proc. Each name specified must be the name of a currently existing table, in [schema_name.]table_name format, using standard name resolution rules. If no table names are specified, no data will be passed to the proc. This parameter is ignored if the proc has a non-distributed execution mode. The default value is an empty List.
      Returns:
      The current value of inputTableNames.
    • setInputTableNames

      public ExecuteProcRequest setInputTableNames(List<String> inputTableNames)
      Names of the tables containing data to be passed to the proc. Each name specified must be the name of a currently existing table, in [schema_name.]table_name format, using standard name resolution rules. If no table names are specified, no data will be passed to the proc. This parameter is ignored if the proc has a non-distributed execution mode. The default value is an empty List.
      Parameters:
      inputTableNames - The new value for inputTableNames.
      Returns:
      this to mimic the builder pattern.
    • getInputColumnNames

      public Map<String,List<String>> getInputColumnNames()
      Map of table names from inputTableNames to lists of names of columns from those tables that will be passed to the proc. Each column name specified must be the name of an existing column in the corresponding table. If a table name from inputTableNames is not included, all columns from that table will be passed to the proc. This parameter is ignored if the proc has a non-distributed execution mode. The default value is an empty Map.
      Returns:
      The current value of inputColumnNames.
    • setInputColumnNames

      public ExecuteProcRequest setInputColumnNames(Map<String,List<String>> inputColumnNames)
      Map of table names from inputTableNames to lists of names of columns from those tables that will be passed to the proc. Each column name specified must be the name of an existing column in the corresponding table. If a table name from inputTableNames is not included, all columns from that table will be passed to the proc. This parameter is ignored if the proc has a non-distributed execution mode. The default value is an empty Map.
      Parameters:
      inputColumnNames - The new value for inputColumnNames.
      Returns:
      this to mimic the builder pattern.
    • getOutputTableNames

      public List<String> getOutputTableNames()
      Names of the tables to which output data from the proc will be written, each in [schema_name.]table_name format, using standard name resolution rules and meeting table naming criteria. If a specified table does not exist, it will automatically be created with the same schema as the corresponding table (by order) from inputTableNames, excluding any primary and shard keys. If a specified table is a non-persistent result table, it must not have primary or shard keys. If no table names are specified, no output data can be returned from the proc. This parameter is ignored if the proc has a non-distributed execution mode. The default value is an empty List.
      Returns:
      The current value of outputTableNames.
    • setOutputTableNames

      public ExecuteProcRequest setOutputTableNames(List<String> outputTableNames)
      Names of the tables to which output data from the proc will be written, each in [schema_name.]table_name format, using standard name resolution rules and meeting table naming criteria. If a specified table does not exist, it will automatically be created with the same schema as the corresponding table (by order) from inputTableNames, excluding any primary and shard keys. If a specified table is a non-persistent result table, it must not have primary or shard keys. If no table names are specified, no output data can be returned from the proc. This parameter is ignored if the proc has a non-distributed execution mode. The default value is an empty List.
      Parameters:
      outputTableNames - The new value for outputTableNames.
      Returns:
      this to mimic the builder pattern.
    • getOptions

      public Map<String,String> getOptions()
      Optional parameters.The default value is an empty Map.
      Returns:
      The current value of options.
    • setOptions

      public ExecuteProcRequest setOptions(Map<String,String> options)
      Optional parameters.The default value is an empty Map.
      Parameters:
      options - The new value for options.
      Returns:
      this to mimic the builder pattern.
    • getSchema

      public org.apache.avro.Schema getSchema()
      This method supports the Avro framework and is not intended to be called directly by the user.
      Specified by:
      getSchema in interface org.apache.avro.generic.GenericContainer
      Returns:
      The schema object describing this class.
    • get

      public Object get(int index)
      This method supports the Avro framework and is not intended to be called directly by the user.
      Specified by:
      get in interface org.apache.avro.generic.IndexedRecord
      Parameters:
      index - the position of the field to get
      Returns:
      value of the field with the given index.
      Throws:
    • put

      public void put(int index, Object value)
      This method supports the Avro framework and is not intended to be called directly by the user.
      Specified by:
      put in interface org.apache.avro.generic.IndexedRecord
      Parameters:
      index - the position of the field to set
      value - the value to set
      Throws:
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object