Skip to content

Commit

Permalink
chore: fix decs for settings
Browse files Browse the repository at this point in the history
Signed-off-by: Chojan Shang <[email protected]>
  • Loading branch information
PsiACE committed Mar 14, 2023
1 parent f7fcd3e commit 58f2b22
Showing 1 changed file with 35 additions and 41 deletions.
76 changes: 35 additions & 41 deletions src/query/settings/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ impl Settings {
UserSettingValue::UInt64(65536),
),
level: ScopeLevel::Session,
desc: "Maximum block size for reading, default value: 65536.",
desc: "Sets the maximum byte size of a single data block that can be read.",
possible_values: None,
},
// max_threads
Expand All @@ -162,7 +162,7 @@ impl Settings {
UserSettingValue::UInt64(num_cpus),
),
level: ScopeLevel::Session,
desc: "The maximum number of threads to execute the request. By default the value is determined automatically.",
desc: "Sets the maximum number of threads to execute a request.",
possible_values: None,
},
// max_memory_usage
Expand All @@ -174,7 +174,7 @@ impl Settings {
UserSettingValue::UInt64(default_max_memory_usage),
),
level: ScopeLevel::Session,
desc: "The maximum memory usage for processing single query, in bytes. By default the value is determined automatically.",
desc: "Sets the maximum memory usage in bytes for processing a single query.",
possible_values: None,
},
// retention_period
Expand All @@ -183,7 +183,7 @@ impl Settings {
default_value: UserSettingValue::UInt64(12),
user_setting: UserSetting::create("retention_period", UserSettingValue::UInt64(12)),
level: ScopeLevel::Session,
desc: "The retention_period in hours. By default the value is 12 hours.",
desc: "Sets the retention period in hours.",
possible_values: None,
},
// max_storage_io_requests
Expand All @@ -194,7 +194,7 @@ impl Settings {
UserSettingValue::UInt64(default_max_storage_io_requests),
),
level: ScopeLevel::Session,
desc: "The maximum number of concurrent IO requests. By default the value is determined automatically.",
desc: "Sets the maximum number of concurrent I/O requests.",
possible_values: None,
},
// storage_io_min_bytes_for_seek
Expand All @@ -205,8 +205,8 @@ impl Settings {
UserSettingValue::UInt64(48),
),
level: ScopeLevel::Session,
desc: "If the distance between two IO ranges to be read in one file is less than storage_io_min_bytes_for_seek, then Databend sequentially reads a range of file that contains both ranges, thus avoiding extra seek. \
Default value is 48Bytes",
desc: "Sets the minimum byte size of data that must be read from storage in a single I/O operation \
when seeking a new location in the data file.",
possible_values: None,
},
// storage_io_max_page_bytes_for_read
Expand All @@ -217,7 +217,7 @@ impl Settings {
UserSettingValue::UInt64(512 * 1024),
),
level: ScopeLevel::Session,
desc: "The maximum bytes of one IO request to read. Default the value is 512KB",
desc: "Sets the maximum byte size of data pages that can be read from storage in a single I/O operation.",
possible_values: None,
},
// flight_client_timeout
Expand All @@ -228,7 +228,7 @@ impl Settings {
UserSettingValue::UInt64(60),
),
level: ScopeLevel::Session,
desc: "Max duration the flight client request is allowed to take in seconds. By default, it is 60 seconds.",
desc: "Sets the maximum time in seconds that a flight client request can be processed.",
possible_values: None,
},
// storage_read_buffer_size
Expand All @@ -239,7 +239,7 @@ impl Settings {
UserSettingValue::UInt64(1024 * 1024),
),
level: ScopeLevel::Session,
desc: "The size of buffer in bytes for buffered reader of dal. By default, it is 1MB.",
desc: "Sets the byte size of the buffer used for reading data into memory.",
possible_values: None,
},
SettingValue {
Expand All @@ -249,7 +249,7 @@ impl Settings {
UserSettingValue::UInt64(1024 * 1024),
),
level: ScopeLevel::Session,
desc: "The size of buffer in bytes for input with format. By default, it is 1MB.",
desc: "Sets the memory size in bytes allocated to the buffer used by the buffered reader to read data from storage.",
possible_values: None,
},
SettingValue {
Expand All @@ -259,7 +259,7 @@ impl Settings {
UserSettingValue::String("UTC".to_owned()),
),
level: ScopeLevel::Session,
desc: "Timezone, default value: \"UTC\".",
desc: "Sets the timezone.",
possible_values: None,
},
SettingValue {
Expand All @@ -269,14 +269,14 @@ impl Settings {
UserSettingValue::UInt64(20000),
),
level: ScopeLevel::Session,
desc: "The threshold of keys to open two-level aggregation, default value: 20000.",
desc: "Sets the number of keys in a GROUP BY operation that will trigger a two-level aggregation.",
possible_values: None,
},
SettingValue {
default_value: UserSettingValue::UInt64(3),
user_setting: UserSetting::create("max_inlist_to_or", UserSettingValue::UInt64(3)),
level: ScopeLevel::Session,
desc: "Max size in inlist expression that will convert to or combinator, default value: 3.",
desc: "Sets the maximum number of values that can be included in an IN expression to be converted to an OR operator.",
possible_values: None,
},
SettingValue {
Expand All @@ -286,7 +286,7 @@ impl Settings {
UserSettingValue::UInt64(0),
),
level: ScopeLevel::Session,
desc: "Case sensitivity of unquoted identifiers, default value: 0 (aka case-insensitive).",
desc: "Determines whether Databend treats unquoted identifiers as case-sensitive.",
possible_values: None,
},
SettingValue {
Expand All @@ -296,7 +296,7 @@ impl Settings {
UserSettingValue::UInt64(1),
),
level: ScopeLevel::Session,
desc: "Case sensitivity of quoted identifiers, default value: 1 (aka case-sensitive).",
desc: "Determines whether Databend treats quoted identifiers as case-sensitive.",
possible_values: None,
},
SettingValue {
Expand All @@ -306,14 +306,14 @@ impl Settings {
UserSettingValue::String("PostgreSQL".to_owned()),
),
level: ScopeLevel::Session,
desc: "SQL dialect, support \"PostgreSQL\" \"MySQL\" and \"Hive\", default value: \"PostgreSQL\".",
desc: "Sets the SQL dialect. Available values include \"PostgreSQL\", \"MySQL\", and \"Hive\".",
possible_values: Some(vec!["PostgreSQL", "MySQL", "Hive"]),
},
SettingValue {
default_value: UserSettingValue::UInt64(1),
user_setting: UserSetting::create("enable_cbo", UserSettingValue::UInt64(1)),
level: ScopeLevel::Session,
desc: "If enable cost based optimization, default value: 1.",
desc: "Enables cost-based optimization.",
possible_values: None,
},
SettingValue {
Expand All @@ -331,7 +331,7 @@ impl Settings {
default_value: UserSettingValue::UInt64(0),
user_setting: UserSetting::create("max_execute_time", UserSettingValue::UInt64(0)),
level: ScopeLevel::Session,
desc: "The maximum query execution time. it means no limit if the value is zero. default value: 0.",
desc: "Sets the maximum query execution time in seconds. Setting it to 0 means no limit.",
possible_values: None,
},
SettingValue {
Expand All @@ -341,7 +341,7 @@ impl Settings {
UserSettingValue::String("binary".to_owned()),
),
level: ScopeLevel::Session,
desc: "Char collation, support \"binary\" \"utf8\" default value: binary",
desc: "Sets the character collation. Available values include \"binary\" and \"utf8\".",
possible_values: Some(vec!["binary", "utf8"]),
},
#[cfg(feature = "hive")]
Expand Down Expand Up @@ -370,7 +370,7 @@ impl Settings {
default_value: UserSettingValue::UInt64(0),
user_setting: UserSetting::create("max_result_rows", UserSettingValue::UInt64(0)),
level: ScopeLevel::Session,
desc: "Auto limit max result rows if user not specify the limit, default is 0 means no limit",
desc: "Sets the maximum number of rows that can be returned in a query result when no specific row count is specified. Setting it to 0 means no limit.",
possible_values: None,
},
SettingValue {
Expand All @@ -380,7 +380,7 @@ impl Settings {
UserSettingValue::UInt64(1),
),
level: ScopeLevel::Session,
desc: "If enable distributed eval index, default value: 1",
desc: "Enables evaluated indexes to be created and maintained across multiple nodes.",
possible_values: None,
},
SettingValue {
Expand All @@ -390,7 +390,7 @@ impl Settings {
UserSettingValue::UInt64(1),
),
level: ScopeLevel::Session,
desc: "If enable broadcast join, default value: 1",
desc: "Enables broadcast join.",
possible_values: None,
},
SettingValue {
Expand All @@ -400,7 +400,7 @@ impl Settings {
UserSettingValue::UInt64(2),
),
level: ScopeLevel::Session,
desc: "The max number of part each read cycle.",
desc: "Sets the number of partitions that are fetched in parallel from storage during query execution.",
possible_values: None,
},
SettingValue {
Expand All @@ -410,7 +410,7 @@ impl Settings {
UserSettingValue::UInt64(24 * 7),
),
level: ScopeLevel::Session,
desc: "How many hours will the COPY file metadata expired in the metasrv, default value: 24*7=7days",
desc: "Sets the hours that the metadata of files you load data from with COPY INTO will expire in.",
possible_values: None,
},
SettingValue {
Expand All @@ -420,7 +420,7 @@ impl Settings {
UserSettingValue::UInt64(1),
),
level: ScopeLevel::Session,
desc: "Ignore options while rendering the result of show create table.",
desc: "Hides table-relevant information, such as SNAPSHOT_LOCATION and STORAGE_FORMAT, at the end of the result of SHOW TABLE CREATE.",
possible_values: None,
},
SettingValue {
Expand All @@ -430,7 +430,7 @@ impl Settings {
UserSettingValue::String("".to_string()),
),
level: ScopeLevel::Session,
desc: "Inject a custom sandbox_tenant into this session, it's only for testing purpose and take effect when the internal_enable_sandbox_tenant is on",
desc: "Injects a custom 'sandbox_tenant' into this session. This is only for testing purposes and will take effect only when 'internal_enable_sandbox_tenant' is turned on.",
possible_values: None,
},
SettingValue {
Expand All @@ -440,14 +440,14 @@ impl Settings {
UserSettingValue::UInt64(2 * 1024 * 1024),
),
level: ScopeLevel::Session,
desc: "Parquet decompresses buffer size. default: 2MB",
desc: "Sets the byte size of the buffer used for reading Parquet files.",
possible_values: None,
},
SettingValue {
default_value: UserSettingValue::UInt64(0),
user_setting: UserSetting::create("enable_bushy_join", UserSettingValue::UInt64(0)),
level: ScopeLevel::Session,
desc: "Enable generating bushy join plan in optimizer",
desc: "Enables generating a bushy join plan with the optimizer.",
possible_values: None,
},
SettingValue {
Expand All @@ -457,10 +457,7 @@ impl Settings {
UserSettingValue::UInt64(0),
),
level: ScopeLevel::Session,
desc: "Enable the query result caching of SQL queries in Databend. \
When this setting is enabled, Databend will store the results of queries in storage. \
This can improve query performance by reducing the amount of time required to re-execute the same query multiple times. \
Default is disabled.",
desc: "Enables caching query results to improve performance for identical queries.",
possible_values: None,
},
SettingValue {
Expand All @@ -470,7 +467,7 @@ impl Settings {
UserSettingValue::UInt64(1048576),
),
level: ScopeLevel::Session,
desc: "The maximum bytes of the query result cache for one query, default: 1048576 bytes (1MB).",
desc: "Sets the maximum byte size of cache for a single query result.",
possible_values: None,
},
SettingValue {
Expand All @@ -480,9 +477,8 @@ impl Settings {
UserSettingValue::UInt64(300),
),
level: ScopeLevel::Session,
desc: "The time-to-live (TTL) for cached query results, in seconds. \
Once the TTL for a cached result has expired, the result is considered stale and will not be used for new queries. \
Default: 300 seconds (5 minutes).",
desc: "Sets the time-to-live (TTL) in seconds for cached query results. \
Once the TTL for a cached result has expired, the result is considered stale and will not be used for new queries.",
possible_values: None,
},
SettingValue {
Expand All @@ -492,9 +488,7 @@ impl Settings {
UserSettingValue::UInt64(0),
),
level: ScopeLevel::Session,
desc: "Controls whether inconsistent cached results can be used for queries. \
When this setting is set to TRUE, Databend will use cached results even if they may be inconsistent due to changes in the underlying data. \
Default is FALSE (disabled).",
desc: "Determines whether Databend will return cached query results that are inconsistent with the underlying data.",
possible_values: None,
},
SettingValue {
Expand All @@ -504,7 +498,7 @@ impl Settings {
UserSettingValue::UInt64(0),
),
level: ScopeLevel::Session,
desc: "When the memory used by the aggregator exceeds the set value, the data will overflow into the storage. disable if it's 0.",
desc: "Sets the maximum amount of memory in bytes that an aggregator can use before spilling data to storage during query execution.",
possible_values: None,
},
];
Expand Down

0 comments on commit 58f2b22

Please sign in to comment.