A set of parameters for GPUdb::aggregateUnique. More…
#include <gpudb/protocol/aggregate_unique.h>
Public Member Functions | |
| AggregateUniqueRequest () | |
| Constructs an AggregateUniqueRequest object with default parameters. | |
| AggregateUniqueRequest (const std::string &tableName_, const std::string &columnName_, const int64_t offset_, const int64_t limit_, const std::map< std::string, std::string > &options_) | |
| Constructs an AggregateUniqueRequest object with the specified parameters. | |
| AggregateUniqueRequest (const std::string &tableName_, const std::string &columnName_, const int64_t offset_, const int64_t limit_, const std::string &encoding_, const std::map< std::string, std::string > &options_) | |
| Constructs an AggregateUniqueRequest object with the specified parameters. | |
Public Attributes | |
| std::string | tableName |
| Name of an existing table or view on which the operation will be performed, in [ schema_name. ]table_name format, using standard name resolution rules. | |
| std::string | columnName |
| Name of the column or an expression containing one or more column names on which the unique function would be applied. | |
| int64_t | offset |
| A positive integer indicating the number of initial results to skip (this can be useful for paging through the results). | |
| int64_t | limit |
| A positive integer indicating the maximum number of results to be returned, or END_OF_SET (-9999) to indicate that the maximum number of results allowed by the server should be returned. | |
| std::string | encoding |
| Specifies the encoding for returned records. | |
| std::map< std::string, std::string > | options |
| Optional parameters. | |
Detailed Description
A set of parameters for GPUdb::aggregateUnique.
Returns all the unique values from a particular column (specified by columnName) of a particular table or view (specified by tableName). If columnName is a numeric column, the values will be in binaryEncodedResponse. Otherwise if columnName is a string column, the values will be in jsonEncodedResponse. The results can be paged via offset and limit parameters.
”limit”:“10”,“sort_order”:“descending”
The response is returned as a dynamic schema. For details see: dynamic schemas documentation.
If a result_table name is specified in the options, the results are stored in a new table with that name–no results are returned in the response. Both the table name and resulting column name must adhere to standard naming conventions; any column expression will need to be aliased. If the source table’s shard key is used as the columnName, the result table will be sharded, in all other cases it will be replicated. Sorting will properly function only if the result table is replicated or if there is only one processing node and should not be relied upon in other cases. Not available if the value of columnName is an unrestricted-length string.
Definition at line 49 of file aggregate_unique.h.
Constructor & Destructor Documentation
◆ AggregateUniqueRequest() [1/3]
| inline |
Constructs an AggregateUniqueRequest object with default parameters.
Definition at line 54 of file aggregate_unique.h.
◆ AggregateUniqueRequest() [2/3]
| inline |
Constructs an AggregateUniqueRequest object with the specified parameters.
| [in] | tableName_ | Name of an existing table or view on which the operation will be performed, in [schema_name.]table_name format, using standard name resolution rules. |
| [in] | columnName_ | Name of the column or an expression containing one or more column names on which the unique function would be applied. |
| [in] | offset_ | A positive integer indicating the number of initial results to skip (this can be useful for paging through the results). The default value is 0. The minimum allowed value is 0. The maximum allowed value is MAX_INT. |
| [in] | limit_ | A positive integer indicating the maximum number of results to be returned, or END_OF_SET (-9999) to indicate that the maximum number of results allowed by the server should be returned. The number of records returned will never exceed the server’s own limit, defined by the max_get_records_size parameter in the server configuration. Use hasMoreRecords to see if more records exist in the result to be fetched, and offset_ and limit_ to request subsequent pages of results. The default value is -9999. |
| [in] | options_ | Optional parameters.
|
Definition at line 300 of file aggregate_unique.h.
◆ AggregateUniqueRequest() [3/3]
| inline |
Constructs an AggregateUniqueRequest object with the specified parameters.
| [in] | tableName_ | Name of an existing table or view on which the operation will be performed, in [schema_name.]table_name format, using standard name resolution rules. |
| [in] | columnName_ | Name of the column or an expression containing one or more column names on which the unique function would be applied. |
| [in] | offset_ | A positive integer indicating the number of initial results to skip (this can be useful for paging through the results). The default value is 0. The minimum allowed value is 0. The maximum allowed value is MAX_INT. |
| [in] | limit_ | A positive integer indicating the maximum number of results to be returned, or END_OF_SET (-9999) to indicate that the maximum number of results allowed by the server should be returned. The number of records returned will never exceed the server’s own limit, defined by the max_get_records_size parameter in the server configuration. Use hasMoreRecords to see if more records exist in the result to be fetched, and offset_ and limit_ to request subsequent pages of results. The default value is -9999. |
| [in] | encoding_ | Specifies the encoding for returned records. Supported values:
|
| [in] | options_ | Optional parameters.
|
Definition at line 561 of file aggregate_unique.h.
Member Data Documentation
◆ columnName
| std::string gpudb::AggregateUniqueRequest::columnName |
Name of the column or an expression containing one or more column names on which the unique function would be applied.
Definition at line 583 of file aggregate_unique.h.
◆ encoding
| std::string gpudb::AggregateUniqueRequest::encoding |
Specifies the encoding for returned records.
Supported values:
- aggregate_unique_binary: Indicates that the returned records should be binary encoded.
- aggregate_unique_json: Indicates that the returned records should be JSON-encoded.
The default value is aggregate_unique_binary.
Definition at line 621 of file aggregate_unique.h.
◆ limit
| int64_t gpudb::AggregateUniqueRequest::limit |
A positive integer indicating the maximum number of results to be returned, or END_OF_SET (-9999) to indicate that the maximum number of results allowed by the server should be returned.
The number of records returned will never exceed the server’s own limit, defined by the max_get_records_size parameter in the server configuration. Use hasMoreRecords to see if more records exist in the result to be fetched, and offset and limit to request subsequent pages of results. The default value is -9999.
Definition at line 606 of file aggregate_unique.h.
◆ offset
| int64_t gpudb::AggregateUniqueRequest::offset |
A positive integer indicating the number of initial results to skip (this can be useful for paging through the results).
The default value is 0. The minimum allowed value is 0. The maximum allowed value is MAX_INT.
Definition at line 591 of file aggregate_unique.h.
◆ options
| std::map<std::string, std::string> gpudb::AggregateUniqueRequest::options |
Optional parameters.
- aggregate_unique_create_temp_table: If true, a unique temporary table name will be generated in the sys_temp schema and used in place of result_table. If result_table_persist is false (or unspecified), then this is always allowed even if the caller does not have permission to create tables. The generated name is returned in qualified_result_table_name. Supported values:The default value is aggregate_unique_false.
- aggregate_unique_collection_name: [DEPRECATED–please specify the containing schema as part of result_table and use GPUdb::createSchema to create the schema if non-existent] Name of a schema which is to contain the table specified in result_table. If the schema provided is non-existent, it will be automatically created.
- aggregate_unique_expression: Filter expression to apply to the table.
- aggregate_unique_sort_order: String indicating how the returned values should be sorted. Supported values:The default value is aggregate_unique_ascending.
- aggregate_unique_order_by: Comma-separated list of the columns to be sorted by as well as the sort direction, e.g., ‘timestamp asc, x desc’. The default value is ”.
- aggregate_unique_result_table: The name of the table used to store the results, in [schema_name.]table_name format, using standard name resolution rules and meeting table naming criteria. If present, no results are returned in the response. Not available if columnName is an unrestricted-length string.
- aggregate_unique_result_table_persist: If true, then the result table specified in result_table will be persisted and will not expire unless a ttl is specified. If false, then the result table will be an in-memory table and will expire unless a ttl is specified otherwise. Supported values:The default value is aggregate_unique_false.
- aggregate_unique_result_table_force_replicated: Force the result table to be replicated (ignores any sharding). Must be used in combination with the result_table option. Supported values:The default value is aggregate_unique_false.
- aggregate_unique_result_table_generate_pk: If true then set a primary key for the result table. Must be used in combination with the result_table option. Supported values:The default value is aggregate_unique_false.
- aggregate_unique_ttl: Sets the TTL of the table specified in result_table.
- aggregate_unique_chunk_size: Indicates the number of records per chunk to be used for the result table. Must be used in combination with the result_table option.
- aggregate_unique_chunk_column_max_memory: Indicates the target maximum data size for each column in a chunk to be used for the result table. Must be used in combination with the result_table option.
- aggregate_unique_chunk_max_memory: Indicates the target maximum data size for all columns in a chunk to be used for the result table. Must be used in combination with the result_table option.
- aggregate_unique_compression_codec: The default compression codec for the result table’s columns.
- aggregate_unique_view_id: ID of view of which the result table will be a member. The default value is ”.
The default value is an empty map.
Definition at line 766 of file aggregate_unique.h.
◆ tableName
| std::string gpudb::AggregateUniqueRequest::tableName |
Name of an existing table or view on which the operation will be performed, in [ schema_name. ]table_name format, using standard name resolution rules.
Definition at line 577 of file aggregate_unique.h.
The documentation for this struct was generated from the following file:
- gpudb/protocol/aggregate_unique.h