Skip to content

Commit

Permalink
remove deadcode
Browse files Browse the repository at this point in the history
Signed-off-by: Ruihang Xia <[email protected]>
  • Loading branch information
waynexia committed Dec 24, 2023
1 parent b8df79e commit 8b92ab4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 41 deletions.
13 changes: 0 additions & 13 deletions src/metric-engine/src/engine/read.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,19 +216,6 @@ impl MetricEngineInner {
let logical_columns = self
.load_logical_columns(physical_region_id, logical_region_id)
.await?;
// .into_iter()
// .map(|col| col.column_schema.name)
// .collect::<Vec<_>>();
// let physical_metadata = self
// .mito
// .get_metadata(physical_region_id)
// .await
// .context(MitoReadOperationSnafu)?;

// let mut logical_metadata = physical_metadata
// .project(&logical_columns)
// .context(InvalidMetadataSnafu)?;
// logical_metadata.region_id = logical_region_id;

let primary_keys = logical_columns
.iter()
Expand Down
29 changes: 1 addition & 28 deletions src/metric-engine/src/engine/region_metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use crate::error::Result;
impl MetricEngineInner {
/// Load column metadata of a logical region.
///
/// The return value is ordered.
/// The return value is ordered on [ColumnId].
pub async fn load_logical_columns(
&self,
physical_region_id: RegionId,
Expand All @@ -41,33 +41,6 @@ impl MetricEngineInner {
.into_iter()
.map(|(_, column_metadata)| column_metadata)
.collect::<Vec<_>>();
// let physical_columns = self
// .data_region
// .physical_columns(physical_region_id)
// .await?
// .into_iter()
// .map(|col| (col.column_schema.name.clone(), col))
// .collect::<HashMap<String, ColumnMetadata>>();
// let mut logical_column_metadata = physical_columns
// .into_iter()
// .filter_map(|mut col| {
// // recover the semantic type of logical columns
// logical_columns
// .get(&col.column_schema.name)
// .map(|semantic_type| {
// col.semantic_type = *semantic_type;
// col
// })
// })
// .collect::<Vec<_>>();
// let logical_column_metadata = logical_columns
// .into_iter()
// .map(|(name, semantic_type)| {
// let mut col = physical_columns.get(&name).unwrap().clone();
// col.semantic_type = col.semantic_type;
// col
// })
// .collect::<Vec<_>>();

// sort columns on column id to ensure the order
logical_column_metadata.sort_unstable_by_key(|col| col.column_id);
Expand Down

0 comments on commit 8b92ab4

Please sign in to comment.