A simple wrapper around bolt::Config. Defines constants for query config properties and accessor methods. Create per query context. Does not have a singleton instance. Does not allow altering properties on the fly. Only at creation time.
| 40 | /// Create per query context. Does not have a singleton instance. |
| 41 | /// Does not allow altering properties on the fly. Only at creation time. |
| 42 | class QueryConfig { |
| 43 | public: |
| 44 | explicit QueryConfig( |
| 45 | const std::unordered_map<std::string, std::string>& values); |
| 46 | |
| 47 | explicit QueryConfig(std::unordered_map<std::string, std::string>&& values); |
| 48 | |
| 49 | static constexpr const char* kCodegenEnabled = "codegen.enabled"; |
| 50 | |
| 51 | /// Maximum memory that a query can use on a single host. |
| 52 | static constexpr const char* kQueryMaxMemoryPerNode = |
| 53 | "query_max_memory_per_node"; |
| 54 | |
| 55 | static constexpr const char* kCodegenConfigurationFilePath = |
| 56 | "codegen.configuration_file_path"; |
| 57 | |
| 58 | static constexpr const char* kCodegenLazyLoading = "codegen.lazy_loading"; |
| 59 | |
| 60 | /// User provided session timezone. Stores a string with the actual timezone |
| 61 | /// name, e.g: "America/Los_Angeles". |
| 62 | static constexpr const char* kSessionTimezone = "session_timezone"; |
| 63 | |
| 64 | /// If true, timezone-less timestamp conversions (e.g. string to timestamp, |
| 65 | /// when the string does not specify a timezone) will be adjusted to the user |
| 66 | /// provided session timezone (if any). |
| 67 | /// |
| 68 | /// For instance: |
| 69 | /// |
| 70 | /// if this option is true and user supplied "America/Los_Angeles", |
| 71 | /// "1970-01-01" will be converted to -28800 instead of 0. |
| 72 | /// |
| 73 | /// False by default. |
| 74 | static constexpr const char* kAdjustTimestampToTimezone = |
| 75 | "adjust_timestamp_to_session_timezone"; |
| 76 | |
| 77 | /// Whether to use the simplified expression evaluation path. False by |
| 78 | /// default. |
| 79 | static constexpr const char* kExprEvalSimplified = |
| 80 | "expression.eval_simplified"; |
| 81 | |
| 82 | /// Whether to enable the FlatNoNulls fast path for expression evaluation. |
| 83 | /// True by default. |
| 84 | static constexpr const char* kExprEvalFlatNoNulls = |
| 85 | "expression.eval_flat_no_nulls"; |
| 86 | |
| 87 | /// Whether to track CPU usage for individual expressions (supported by call |
| 88 | /// and cast expressions). False by default. Can be expensive when processing |
| 89 | /// small batches, e.g. < 10K rows. |
| 90 | static constexpr const char* kExprTrackCpuUsage = |
| 91 | "expression.track_cpu_usage"; |
| 92 | |
| 93 | /// Whether to track CPU usage for stages of individual operators. True by |
| 94 | /// default. Can be expensive when processing small batches, e.g. < 10K rows. |
| 95 | static constexpr const char* kOperatorTrackCpuUsage = |
| 96 | "track_operator_cpu_usage"; |
| 97 | |
| 98 | /// Flags used to configure the CAST operator: |
| 99 |
no outgoing calls