A set of parameters for GPUdb::executeSql.
More...
#include <gpudb/protocol/execute_sql.h>
|
| ExecuteSqlRequest () |
| Constructs an ExecuteSqlRequest object with default parameters. More...
|
|
| ExecuteSqlRequest (const std::string &statement_, const int64_t offset_, const int64_t limit_, const std::string &requestSchemaStr_, const std::vector< std::vector< uint8_t > > &data_, const std::map< std::string, std::string > &options_) |
| Constructs an ExecuteSqlRequest object with the specified parameters. More...
|
|
| ExecuteSqlRequest (const std::string &statement_, const int64_t offset_, const int64_t limit_, const std::string &encoding_, const std::string &requestSchemaStr_, const std::vector< std::vector< uint8_t > > &data_, const std::map< std::string, std::string > &options_) |
| Constructs an ExecuteSqlRequest object with the specified parameters. More...
|
|
|
std::string | statement |
| SQL statement (query, DML, or DDL) to be executed. More...
|
|
int64_t | offset |
| A positive integer indicating the number of initial results to skip (this can be useful for paging through the results). More...
|
|
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. More...
|
|
std::string | encoding |
| Specifies the encoding for returned records; either 'binary' or 'json'. More...
|
|
std::string | requestSchemaStr |
| Avro schema of data. More...
|
|
std::vector< std::vector< uint8_t > > | data |
| An array of binary-encoded data for the records to be binded to the SQL query. More...
|
|
std::map< std::string, std::string > | options |
| Optional parameters. More...
|
|
A set of parameters for GPUdb::executeSql.
Execute a SQL statement (query, DML, or DDL).
See SQL Support for the complete set of supported SQL commands.
Definition at line 22 of file execute_sql.h.
◆ ExecuteSqlRequest() [1/3]
gpudb::ExecuteSqlRequest::ExecuteSqlRequest |
( |
| ) |
|
|
inline |
◆ ExecuteSqlRequest() [2/3]
gpudb::ExecuteSqlRequest::ExecuteSqlRequest |
( |
const std::string & |
statement_, |
|
|
const int64_t |
offset_, |
|
|
const int64_t |
limit_, |
|
|
const std::string & |
requestSchemaStr_, |
|
|
const std::vector< std::vector< uint8_t > > & |
data_, |
|
|
const std::map< std::string, std::string > & |
options_ |
|
) |
| |
|
inline |
Constructs an ExecuteSqlRequest object with the specified parameters.
- Parameters
-
[in] | statement_ | SQL statement (query, DML, or DDL) to be executed |
[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_ & limit_ to request subsequent pages of results. The default value is -9999. |
[in] | requestSchemaStr_ | Avro schema of data_. The default value is ''. |
[in] | data_ | An array of binary-encoded data for the records to be binded to the SQL query. Or use query_parameters to pass the data in JSON format. The default value is an empty vector. |
[in] | options_ | Optional parameters.
-
execute_sql_cost_based_optimization: If false, disables the cost-based optimization of the given query. Supported values:
The default value is execute_sql_false.
-
execute_sql_distributed_joins: If true, enables the use of distributed joins in servicing the given query. Any query requiring a distributed join will succeed, though hints can be used in the query to change the distribution of the source data to allow the query to succeed. Supported values:
The default value is execute_sql_false.
-
execute_sql_distributed_operations: If true, enables the use of distributed operations in servicing the given query. Any query requiring a distributed join will succeed, though hints can be used in the query to change the distribution of the source data to allow the query to succeed. Supported values:
The default value is execute_sql_false.
-
execute_sql_ignore_existing_pk: Specifies the record collision error-suppression policy for inserting into or updating a table with a primary key, only used when primary key record collisions are rejected (update_on_existing_pk is false). If set to true, any record insert/update that is rejected for resulting in a primary key collision with an existing table record will be ignored with no error generated. If false, the rejection of any insert/update for resulting in a primary key collision will cause an error to be reported. If the specified table does not have a primary key or if update_on_existing_pk is true, then this option has no effect. Supported values:
-
execute_sql_true: Ignore inserts/updates that result in primary key collisions with existing records
-
execute_sql_false: Treat as errors any inserts/updates that result in primary key collisions with existing records
The default value is execute_sql_false.
-
execute_sql_late_materialization: If true, Joins/Filters results will always be materialized ( saved to result tables format). Supported values:
The default value is execute_sql_false.
-
execute_sql_paging_table: When empty or the specified paging table not exists, the system will create a paging table and return when query output has more records than the user asked. If the paging table exists in the system, the records from the paging table are returned without evaluating the query.
-
execute_sql_paging_table_ttl: Sets the TTL of the paging table.
-
execute_sql_parallel_execution: If false, disables the parallel step execution of the given query. Supported values:
The default value is execute_sql_true.
-
execute_sql_plan_cache: If false, disables plan caching for the given query. Supported values:
The default value is execute_sql_true.
-
execute_sql_prepare_mode: If true, compiles a query into an execution plan and saves it in query cache. Query execution is not performed and an empty response will be returned to user. Supported values:
The default value is execute_sql_false.
-
execute_sql_preserve_dict_encoding: If true, then columns that were dict encoded in the source table will be dict encoded in the projection table. Supported values:
The default value is execute_sql_true.
-
execute_sql_query_parameters: Query parameters in JSON array or arrays (for inserting multiple rows). This can be used instead of data_ and requestSchemaStr_.
-
execute_sql_results_caching: If false, disables caching of the results of the given query. Supported values:
The default value is execute_sql_true.
-
execute_sql_rule_based_optimization: If false, disables rule-based rewrite optimizations for the given query. Supported values:
The default value is execute_sql_true.
-
execute_sql_ssq_optimization: If false, scalar subqueries will be translated into joins. Supported values:
The default value is execute_sql_true.
-
execute_sql_ttl: Sets the TTL of the intermediate result tables used in query execution.
-
execute_sql_update_on_existing_pk: Specifies the record collision policy for inserting into or updating a table with a primary key. If set to true, any existing table record with primary key values that match those of a record being inserted or updated will be replaced by that record. If set to false, any such primary key collision will result in the insert/update being rejected and the error handled as determined by ignore_existing_pk. If the specified table does not have a primary key, then this option has no effect. Supported values:
-
execute_sql_true: Replace the collided-into record with the record inserted or updated when a new/modified record causes a primary key collision with an existing record
-
execute_sql_false: Reject the insert or update when it results in a primary key collision with an existing record
The default value is execute_sql_false.
-
execute_sql_validate_change_column: When changing a column using alter table, validate the change before applying it. If true, then validate all values. A value too large (or too long) for the new type will prevent any change. If false, then when a value is too large or long, it will be truncated. Supported values:
The default value is execute_sql_true.
-
execute_sql_current_schema: Use the supplied value as the default schema when processing this SQL command.
The default value is an empty map. |
Definition at line 405 of file execute_sql.h.
◆ ExecuteSqlRequest() [3/3]
gpudb::ExecuteSqlRequest::ExecuteSqlRequest |
( |
const std::string & |
statement_, |
|
|
const int64_t |
offset_, |
|
|
const int64_t |
limit_, |
|
|
const std::string & |
encoding_, |
|
|
const std::string & |
requestSchemaStr_, |
|
|
const std::vector< std::vector< uint8_t > > & |
data_, |
|
|
const std::map< std::string, std::string > & |
options_ |
|
) |
| |
|
inline |
Constructs an ExecuteSqlRequest object with the specified parameters.
- Parameters
-
[in] | statement_ | SQL statement (query, DML, or DDL) to be executed |
[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_ & limit_ to request subsequent pages of results. The default value is -9999. |
[in] | encoding_ | Specifies the encoding for returned records; either 'binary' or 'json'. Supported values:
The default value is execute_sql_binary. |
[in] | requestSchemaStr_ | Avro schema of data_. The default value is ''. |
[in] | data_ | An array of binary-encoded data for the records to be binded to the SQL query. Or use query_parameters to pass the data in JSON format. The default value is an empty vector. |
[in] | options_ | Optional parameters.
-
execute_sql_cost_based_optimization: If false, disables the cost-based optimization of the given query. Supported values:
The default value is execute_sql_false.
-
execute_sql_distributed_joins: If true, enables the use of distributed joins in servicing the given query. Any query requiring a distributed join will succeed, though hints can be used in the query to change the distribution of the source data to allow the query to succeed. Supported values:
The default value is execute_sql_false.
-
execute_sql_distributed_operations: If true, enables the use of distributed operations in servicing the given query. Any query requiring a distributed join will succeed, though hints can be used in the query to change the distribution of the source data to allow the query to succeed. Supported values:
The default value is execute_sql_false.
-
execute_sql_ignore_existing_pk: Specifies the record collision error-suppression policy for inserting into or updating a table with a primary key, only used when primary key record collisions are rejected (update_on_existing_pk is false). If set to true, any record insert/update that is rejected for resulting in a primary key collision with an existing table record will be ignored with no error generated. If false, the rejection of any insert/update for resulting in a primary key collision will cause an error to be reported. If the specified table does not have a primary key or if update_on_existing_pk is true, then this option has no effect. Supported values:
-
execute_sql_true: Ignore inserts/updates that result in primary key collisions with existing records
-
execute_sql_false: Treat as errors any inserts/updates that result in primary key collisions with existing records
The default value is execute_sql_false.
-
execute_sql_late_materialization: If true, Joins/Filters results will always be materialized ( saved to result tables format). Supported values:
The default value is execute_sql_false.
-
execute_sql_paging_table: When empty or the specified paging table not exists, the system will create a paging table and return when query output has more records than the user asked. If the paging table exists in the system, the records from the paging table are returned without evaluating the query.
-
execute_sql_paging_table_ttl: Sets the TTL of the paging table.
-
execute_sql_parallel_execution: If false, disables the parallel step execution of the given query. Supported values:
The default value is execute_sql_true.
-
execute_sql_plan_cache: If false, disables plan caching for the given query. Supported values:
The default value is execute_sql_true.
-
execute_sql_prepare_mode: If true, compiles a query into an execution plan and saves it in query cache. Query execution is not performed and an empty response will be returned to user. Supported values:
The default value is execute_sql_false.
-
execute_sql_preserve_dict_encoding: If true, then columns that were dict encoded in the source table will be dict encoded in the projection table. Supported values:
The default value is execute_sql_true.
-
execute_sql_query_parameters: Query parameters in JSON array or arrays (for inserting multiple rows). This can be used instead of data_ and requestSchemaStr_.
-
execute_sql_results_caching: If false, disables caching of the results of the given query. Supported values:
The default value is execute_sql_true.
-
execute_sql_rule_based_optimization: If false, disables rule-based rewrite optimizations for the given query. Supported values:
The default value is execute_sql_true.
-
execute_sql_ssq_optimization: If false, scalar subqueries will be translated into joins. Supported values:
The default value is execute_sql_true.
-
execute_sql_ttl: Sets the TTL of the intermediate result tables used in query execution.
-
execute_sql_update_on_existing_pk: Specifies the record collision policy for inserting into or updating a table with a primary key. If set to true, any existing table record with primary key values that match those of a record being inserted or updated will be replaced by that record. If set to false, any such primary key collision will result in the insert/update being rejected and the error handled as determined by ignore_existing_pk. If the specified table does not have a primary key, then this option has no effect. Supported values:
-
execute_sql_true: Replace the collided-into record with the record inserted or updated when a new/modified record causes a primary key collision with an existing record
-
execute_sql_false: Reject the insert or update when it results in a primary key collision with an existing record
The default value is execute_sql_false.
-
execute_sql_validate_change_column: When changing a column using alter table, validate the change before applying it. If true, then validate all values. A value too large (or too long) for the new type will prevent any change. If false, then when a value is too large or long, it will be truncated. Supported values:
The default value is execute_sql_true.
-
execute_sql_current_schema: Use the supplied value as the default schema when processing this SQL command.
The default value is an empty map. |
Definition at line 795 of file execute_sql.h.
◆ data
std::vector<std::vector<uint8_t> > gpudb::ExecuteSqlRequest::data |
An array of binary-encoded data for the records to be binded to the SQL query.
Or use query_parameters to pass the data in JSON format. The default value is an empty vector.
Definition at line 857 of file execute_sql.h.
◆ encoding
std::string gpudb::ExecuteSqlRequest::encoding |
Specifies the encoding for returned records; either 'binary' or 'json'.
Supported values:
The default value is execute_sql_binary.
Definition at line 844 of file execute_sql.h.
◆ limit
int64_t gpudb::ExecuteSqlRequest::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 & limit to request subsequent pages of results. The default value is -9999.
Definition at line 831 of file execute_sql.h.
◆ offset
int64_t gpudb::ExecuteSqlRequest::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 817 of file execute_sql.h.
◆ options
std::map<std::string, std::string> gpudb::ExecuteSqlRequest::options |
Optional parameters.
-
execute_sql_cost_based_optimization: If false, disables the cost-based optimization of the given query. Supported values:
The default value is execute_sql_false.
-
execute_sql_distributed_joins: If true, enables the use of distributed joins in servicing the given query. Any query requiring a distributed join will succeed, though hints can be used in the query to change the distribution of the source data to allow the query to succeed. Supported values:
The default value is execute_sql_false.
-
execute_sql_distributed_operations: If true, enables the use of distributed operations in servicing the given query. Any query requiring a distributed join will succeed, though hints can be used in the query to change the distribution of the source data to allow the query to succeed. Supported values:
The default value is execute_sql_false.
-
execute_sql_ignore_existing_pk: Specifies the record collision error-suppression policy for inserting into or updating a table with a primary key, only used when primary key record collisions are rejected (update_on_existing_pk is false). If set to true, any record insert/update that is rejected for resulting in a primary key collision with an existing table record will be ignored with no error generated. If false, the rejection of any insert/update for resulting in a primary key collision will cause an error to be reported. If the specified table does not have a primary key or if update_on_existing_pk is true, then this option has no effect. Supported values:
-
execute_sql_true: Ignore inserts/updates that result in primary key collisions with existing records
-
execute_sql_false: Treat as errors any inserts/updates that result in primary key collisions with existing records
The default value is execute_sql_false.
-
execute_sql_late_materialization: If true, Joins/Filters results will always be materialized ( saved to result tables format). Supported values:
The default value is execute_sql_false.
-
execute_sql_paging_table: When empty or the specified paging table not exists, the system will create a paging table and return when query output has more records than the user asked. If the paging table exists in the system, the records from the paging table are returned without evaluating the query.
-
execute_sql_paging_table_ttl: Sets the TTL of the paging table.
-
execute_sql_parallel_execution: If false, disables the parallel step execution of the given query. Supported values:
The default value is execute_sql_true.
-
execute_sql_plan_cache: If false, disables plan caching for the given query. Supported values:
The default value is execute_sql_true.
-
execute_sql_prepare_mode: If true, compiles a query into an execution plan and saves it in query cache. Query execution is not performed and an empty response will be returned to user. Supported values:
The default value is execute_sql_false.
-
execute_sql_preserve_dict_encoding: If true, then columns that were dict encoded in the source table will be dict encoded in the projection table. Supported values:
The default value is execute_sql_true.
-
execute_sql_query_parameters: Query parameters in JSON array or arrays (for inserting multiple rows). This can be used instead of data and requestSchemaStr.
-
execute_sql_results_caching: If false, disables caching of the results of the given query. Supported values:
The default value is execute_sql_true.
-
execute_sql_rule_based_optimization: If false, disables rule-based rewrite optimizations for the given query. Supported values:
The default value is execute_sql_true.
-
execute_sql_ssq_optimization: If false, scalar subqueries will be translated into joins. Supported values:
The default value is execute_sql_true.
-
execute_sql_ttl: Sets the TTL of the intermediate result tables used in query execution.
-
execute_sql_update_on_existing_pk: Specifies the record collision policy for inserting into or updating a table with a primary key. If set to true, any existing table record with primary key values that match those of a record being inserted or updated will be replaced by that record. If set to false, any such primary key collision will result in the insert/update being rejected and the error handled as determined by ignore_existing_pk. If the specified table does not have a primary key, then this option has no effect. Supported values:
-
execute_sql_true: Replace the collided-into record with the record inserted or updated when a new/modified record causes a primary key collision with an existing record
-
execute_sql_false: Reject the insert or update when it results in a primary key collision with an existing record
The default value is execute_sql_false.
-
execute_sql_validate_change_column: When changing a column using alter table, validate the change before applying it. If true, then validate all values. A value too large (or too long) for the new type will prevent any change. If false, then when a value is too large or long, it will be truncated. Supported values:
The default value is execute_sql_true.
-
execute_sql_current_schema: Use the supplied value as the default schema when processing this SQL command.
The default value is an empty map.
Definition at line 1089 of file execute_sql.h.
◆ requestSchemaStr
std::string gpudb::ExecuteSqlRequest::requestSchemaStr |
◆ statement
std::string gpudb::ExecuteSqlRequest::statement |
SQL statement (query, DML, or DDL) to be executed.
Definition at line 809 of file execute_sql.h.
The documentation for this struct was generated from the following file: