Skip to content

Commit

Permalink
fix: physical table statistics info
Browse files Browse the repository at this point in the history
  • Loading branch information
killme2008 committed Nov 12, 2024
1 parent 84aa5b7 commit 02a8b2f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion src/catalog/src/system_schema/information_schema/tables.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ use datatypes::vectors::{
};
use futures::TryStreamExt;
use snafu::{OptionExt, ResultExt};
use store_api::metric_engine_consts::PHYSICAL_TABLE_METADATA_KEY;
use store_api::storage::{RegionId, ScanRequest, TableId};
use table::metadata::{TableInfo, TableType};

Expand Down Expand Up @@ -259,7 +260,13 @@ impl InformationSchemaTablesBuilder {
let table_info = table.table_info();

// TODO(dennis): make it working for metric engine
let table_region_stats = if table_info.meta.engine == MITO_ENGINE {
let table_region_stats = if table_info.meta.engine == MITO_ENGINE
|| table_info
.meta
.options
.extra_options
.contains_key(PHYSICAL_TABLE_METADATA_KEY)
{
let region_ids = table_info
.meta
.region_numbers
Expand Down
2 changes: 1 addition & 1 deletion src/common/meta/src/datanode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ pub struct RegionStat {
pub rcus: i64,
/// The write capacity units during this period
pub wcus: i64,
/// Approximate bytes of this region
/// Approximate disk bytes of this region, including sst, index, manifest and wal
pub approximate_bytes: u64,
/// The engine name.
pub engine: String,
Expand Down

0 comments on commit 02a8b2f

Please sign in to comment.