Skip to main content

Class CreateUnionRequest

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

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

Merges data from one or more tables with comparable data types into a new table.

The following merges are supported:

UNION (DISTINCT/ALL) - For data set union details and examples, see Union. For limitations, see Union Limitations and Cautions.

INTERSECT (DISTINCT/ALL) - For data set intersection details and examples, see Intersect. For limitations, see Intersect Limitations.

EXCEPT (DISTINCT/ALL) - For data set subtraction details and examples, see Except. For limitations, see Except Limitations.

  • Constructor Details

    • CreateUnionRequest

      public CreateUnionRequest()
      Constructs a CreateUnionRequest object with default parameters.
    • CreateUnionRequest

      public CreateUnionRequest(String tableName, List<String> tableNames, List<List<String>> inputColumnNames, List<String> outputColumnNames, Map<String,String> options)
      Constructs a CreateUnionRequest object with the specified parameters.
      Parameters:
      tableName - Name of the table to be created, in [schema_name.]table_name format, using standard name resolution rules and meeting table naming criteria.
      tableNames - The list of table names to merge, in [schema_name.]table_name format, using standard name resolution rules. Must contain the names of one or more existing tables.
      inputColumnNames - The list of columns from each of the corresponding input tables.
      outputColumnNames - The list of names of the columns to be stored in the output table.
      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.
    • getTableName

      public String getTableName()
      Name of the table to be created, in [schema_name.]table_name format, using standard name resolution rules and meeting table naming criteria.
      Returns:
      The current value of tableName.
    • setTableName

      public CreateUnionRequest setTableName(String tableName)
      Name of the table to be created, in [schema_name.]table_name format, using standard name resolution rules and meeting table naming criteria.
      Parameters:
      tableName - The new value for tableName.
      Returns:
      this to mimic the builder pattern.
    • getTableNames

      public List<String> getTableNames()
      The list of table names to merge, in [schema_name.]table_name format, using standard name resolution rules. Must contain the names of one or more existing tables.
      Returns:
      The current value of tableNames.
    • setTableNames

      public CreateUnionRequest setTableNames(List<String> tableNames)
      The list of table names to merge, in [schema_name.]table_name format, using standard name resolution rules. Must contain the names of one or more existing tables.
      Parameters:
      tableNames - The new value for tableNames.
      Returns:
      this to mimic the builder pattern.
    • getInputColumnNames

      public List<List<String>> getInputColumnNames()
      The list of columns from each of the corresponding input tables.
      Returns:
      The current value of inputColumnNames.
    • setInputColumnNames

      public CreateUnionRequest setInputColumnNames(List<List<String>> inputColumnNames)
      The list of columns from each of the corresponding input tables.
      Parameters:
      inputColumnNames - The new value for inputColumnNames.
      Returns:
      this to mimic the builder pattern.
    • getOutputColumnNames

      public List<String> getOutputColumnNames()
      The list of names of the columns to be stored in the output table.
      Returns:
      The current value of outputColumnNames.
    • setOutputColumnNames

      public CreateUnionRequest setOutputColumnNames(List<String> outputColumnNames)
      The list of names of the columns to be stored in the output table.
      Parameters:
      outputColumnNames - The new value for outputColumnNames.
      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 CreateUnionRequest 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