feat(stage): impl get_block_compact_thresholds for StageTable.
@@ -19,6 +19,7 @@ use std::sync::Arc;
use common_base::base::uuid;
use common_catalog::table::Table;
use common_catalog::table_context::TableContext;
+use common_datablocks::BlockCompactThresholds;
use common_datablocks::DataBlock;
use common_exception::ErrorCode;
use common_exception::Result;
@@ -49,6 +50,7 @@ pub struct StageTable {
// fn get_table_info(&self) -> &TableInfo).
table_info_placeholder: TableInfo,
input_context: Mutex<Option<Arc<InputContext>>>,
+ block_compact_threshold: Mutex<Option<BlockCompactThresholds>>,
}
impl StageTable {
@@ -59,6 +61,7 @@ impl StageTable {
table_info,
table_info_placeholder,
input_context: Default::default(),
+ block_compact_threshold: Default::default(),
}))
}
@@ -200,4 +203,14 @@ impl Table for StageTable {
"S3 external table truncate() unimplemented yet!",
))
}
+
+ fn get_block_compact_thresholds(&self) -> BlockCompactThresholds {
+ let guard = self.block_compact_threshold.lock();
+ (*guard).expect("must success")
+ }
+
+ fn set_block_compact_thresholds(&self, thresholds: BlockCompactThresholds) {
+ let mut guard = self.block_compact_threshold.lock();
+ (*guard) = Some(thresholds)
+ }
}
