Skip to content

Commit

Permalink
fix: resolve PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelScofield committed Dec 19, 2023
1 parent 41f4836 commit d1e43fc
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/common/meta/src/key/table_route.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ impl TableRouteKey {
#[derive(Debug, PartialEq, Serialize, Deserialize, Clone)]
pub enum TableRouteValue {
Mito(MitoTableRouteValue),
File(FileTableRouteValue),
Metrics(MetricsTableRouteValue),
}

Expand All @@ -49,6 +50,10 @@ pub struct MitoTableRouteValue {
version: u64,
}

// TODO(LFC): Make file engine table use its own table route.
#[derive(Debug, PartialEq, Serialize, Deserialize, Clone)]
pub struct FileTableRouteValue;

#[derive(Debug, PartialEq, Serialize, Deserialize, Clone)]
pub struct MetricsTableRouteValue {
// TODO(LFC): Add table route for MetricsEngine table.
Expand Down Expand Up @@ -88,6 +93,10 @@ impl TableRouteValue {
.cloned()
}

/// Gets the [RegionRoute]s of this table route.
///
/// # Panics
/// The engine type of this table is not "`Mito`".
pub fn region_routes(&self) -> &Vec<RegionRoute> {
&self.mito_table_route().region_routes
}
Expand Down

0 comments on commit d1e43fc

Please sign in to comment.