Skip to content

Commit 3d5edc3

Browse files
committed
add setting "input_read_buffer_size".
1 parent 60476bd commit 3d5edc3

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
@@ -152,6 +152,16 @@ impl Settings {
152152
desc: "The size of buffer in bytes for buffered reader of dal. By default, it is 1MB.",
153153
possible_values: None,
154154
},
155+
SettingValue {
156+
default_value: UserSettingValue::UInt64(1024 * 1024),
157+
user_setting: UserSetting::create(
158+
"input_read_buffer_size",
159+
UserSettingValue::UInt64(1024 * 1024),
160+
),
161+
level: ScopeLevel::Session,
162+
desc: "The size of buffer in bytes for input with format. By default, it is 1MB.",
163+
possible_values: None,
164+
},
155165
// enable_new_processor_framework
156166
SettingValue {
157167
default_value: UserSettingValue::UInt64(1),
@@ -370,6 +380,11 @@ impl Settings {
370380
self.try_get_u64(key)
371381
}
372382

383+
pub fn get_input_read_buffer_size(&self) -> Result<u64> {
384+
let key = "input_read_buffer_size";
385+
self.try_get_u64(key)
386+
}
387+
373388
pub fn get_enable_new_processor_framework(&self) -> Result<u64> {
374389
let key = "enable_new_processor_framework";
375390
self.try_get_u64(key)

0 commit comments

Comments
 (0)