Skip to content

Commit 197f46a

Browse files
committed
add setting "input_read_buffer_size".
1 parent 6749386 commit 197f46a

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

src/query/service/tests/it/storages/system/settings_table.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ async fn test_settings_table() -> Result<()> {
4242
"| enable_planner_v2 | 1 | 1 | SESSION | Enable planner v2 by setting this variable to 1, default value: 1 | UInt64 |",
4343
"| field_delimiter | , | , | SESSION | Format field delimiter, default value: , | String |",
4444
"| flight_client_timeout | 60 | 60 | SESSION | Max duration the flight client request is allowed to take in seconds. By default, it is 60 seconds | UInt64 |",
45+
"| input_read_buffer_size | 1048576 | 1048576 | SESSION | The size of buffer in bytes for input with format. By default, it is 1MB. | UInt64 |",
4546
"| group_by_two_level_threshold | 10000 | 10000 | SESSION | The threshold of keys to open two-level aggregation, default value: 10000 | UInt64 |",
4647
"| max_block_size | 10000 | 10000 | SESSION | Maximum block size for reading | UInt64 |",
4748
"| max_execute_time | 0 | 0 | SESSION | The maximum query execution time. it means no limit if the value is zero. default value: 0 | UInt64 |",

src/query/settings/src/lib.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,16 @@ impl Settings {
150150
desc: "The size of buffer in bytes for buffered reader of dal. By default, it is 1MB.",
151151
possible_values: None,
152152
},
153+
SettingValue {
154+
default_value: UserSettingValue::UInt64(1024 * 1024),
155+
user_setting: UserSetting::create(
156+
"input_read_buffer_size",
157+
UserSettingValue::UInt64(1024 * 1024),
158+
),
159+
level: ScopeLevel::Session,
160+
desc: "The size of buffer in bytes for input with format. By default, it is 1MB.",
161+
possible_values: None,
162+
},
153163
// enable_new_processor_framework
154164
SettingValue {
155165
default_value: UserSettingValue::UInt64(1),
@@ -368,6 +378,11 @@ impl Settings {
368378
self.try_get_u64(key)
369379
}
370380

381+
pub fn get_input_read_buffer_size(&self) -> Result<u64> {
382+
let key = "input_read_buffer_size";
383+
self.try_get_u64(key)
384+
}
385+
371386
pub fn get_enable_new_processor_framework(&self) -> Result<u64> {
372387
let key = "enable_new_processor_framework";
373388
self.try_get_u64(key)

0 commit comments

Comments
 (0)