Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
sundy-li committed Feb 21, 2023
1 parent 7949661 commit c000ade
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions scripts/ci/deploy/config/databend-query-node-1.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ cluster_id = "test_cluster"

table_engine_memory_enabled = true
default_storage_format = 'parquet'
default_compression = 'zstd'

# [[query.users]]
# name = "admin"
Expand Down
1 change: 1 addition & 0 deletions scripts/ci/deploy/config/databend-query-node-2.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ cluster_id = "test_cluster"

table_engine_memory_enabled = true
default_storage_format = 'parquet'
default_compression = 'zstd'

[log]

Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/deploy/config/databend-query-node-3.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ cluster_id = "test_cluster"

table_engine_memory_enabled = true
default_storage_format = 'parquet'

default_compression = 'zstd'

[log]

Expand Down
1 change: 1 addition & 0 deletions scripts/ci/deploy/config/databend-query-node-shared.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ cluster_id = "test_cluster"

table_engine_memory_enabled = true
default_storage_format = 'parquet'
default_compression = 'zstd'

share_endpoint_address = "127.0.0.1:33003" # receive shared information from open sharing
# [[query.users]]
Expand Down
6 changes: 6 additions & 0 deletions src/query/config/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1160,6 +1160,9 @@ pub struct QueryConfig {
#[clap(long, default_value = "auto")]
pub default_storage_format: String,

#[clap(long, default_value = "auto")]
pub default_compression: String,

#[clap(skip)]
users: Vec<UserConfig>,

Expand Down Expand Up @@ -1280,6 +1283,7 @@ impl TryInto<InnerQueryConfig> for QueryConfig {
async_insert_busy_timeout: self.async_insert_busy_timeout,
async_insert_stale_timeout: self.async_insert_stale_timeout,
default_storage_format: self.default_storage_format,
default_compression: self.default_compression,
idm: InnerIDMConfig {
users: users_to_inner(self.users)?,
},
Expand Down Expand Up @@ -1339,6 +1343,8 @@ impl From<InnerQueryConfig> for QueryConfig {
async_insert_busy_timeout: inner.async_insert_busy_timeout,
async_insert_stale_timeout: inner.async_insert_stale_timeout,
default_storage_format: inner.default_storage_format,
default_compression: inner.default_compression,

users: users_from_inner(inner.idm.users),
share_endpoint_address: inner.share_endpoint_address,
share_endpoint_auth_token_file: inner.share_endpoint_auth_token_file,
Expand Down
2 changes: 2 additions & 0 deletions src/query/config/src/inner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ pub struct QueryConfig {
pub async_insert_busy_timeout: u64,
pub async_insert_stale_timeout: u64,
pub default_storage_format: String,
pub default_compression: String,
pub idm: IDMConfig,
pub share_endpoint_address: String,
pub share_endpoint_auth_token_file: String,
Expand Down Expand Up @@ -207,6 +208,7 @@ impl Default for QueryConfig {
async_insert_busy_timeout: 200,
async_insert_stale_timeout: 0,
default_storage_format: "auto".to_string(),
default_compression: "auto".to_string(),
idm: IDMConfig::default(),
share_endpoint_address: "".to_string(),
share_endpoint_auth_token_file: "".to_string(),
Expand Down
2 changes: 1 addition & 1 deletion src/query/storages/fuse/src/fuse_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ impl FuseTable {
.options()
.get(OPT_KEY_TABLE_COMPRESSION)
.cloned()
.unwrap_or_default();
.unwrap_or_default(|| config.query.default_compression.clone());

let part_prefix = table_info.meta.part_prefix.clone();

Expand Down

0 comments on commit c000ade

Please sign in to comment.