Skip to content

Commit 4e1075d

Browse files
committed
Migrate DUMMY_TABLE_INDEX
Signed-off-by: Xuanwo <github@xuanwo.io>
1 parent 2f5cb73 commit 4e1075d

File tree

6 files changed

+6
-5
lines changed

6 files changed

+6
-5
lines changed

src/query/planner/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@
2323
2424
mod metadata;
2525
pub use metadata::IndexType;
26+
pub use metadata::DUMMY_TABLE_INDEX;

src/query/planner/src/metadata.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,6 @@
1616
///
1717
/// This type will be used across the whole planner.
1818
pub type IndexType = usize;
19+
20+
/// Use IndexType::MAX to represent dummy table.
21+
pub static DUMMY_TABLE_INDEX: IndexType = IndexType::MAX;

src/query/service/src/sql/executor/format.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ use common_exception::ErrorCode;
1717
use common_exception::Result;
1818
use common_legacy_planners::StageKind;
1919
use common_planner::IndexType;
20+
use common_planner::DUMMY_TABLE_INDEX;
2021
use itertools::Itertools;
2122

2223
use super::AggregateFinal;
@@ -32,7 +33,6 @@ use super::Sort;
3233
use super::TableScan;
3334
use super::UnionAll;
3435
use crate::sql::MetadataRef;
35-
use crate::sql::DUMMY_TABLE_INDEX;
3636

3737
impl PhysicalPlan {
3838
pub fn format(&self, metadata: MetadataRef) -> Result<String> {

src/query/service/src/sql/executor/physical_plan_builder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ use common_legacy_planners::Extras;
2626
use common_legacy_planners::PrewhereInfo;
2727
use common_legacy_planners::Projection;
2828
use common_legacy_planners::StageKind;
29+
use common_planner::DUMMY_TABLE_INDEX;
2930
use common_storages_fuse::TableContext;
3031
use itertools::Itertools;
3132

@@ -60,7 +61,6 @@ use crate::sql::plans::Scalar;
6061
use crate::sql::Metadata;
6162
use crate::sql::MetadataRef;
6263
use crate::sql::ScalarExpr;
63-
use crate::sql::DUMMY_TABLE_INDEX;
6464
use crate::storages::ToReadDataSourcePlan;
6565

6666
pub struct PhysicalPlanBuilder {

src/query/service/src/sql/planner/metadata.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ use parking_lot::RwLock;
2525
use crate::sql::optimizer::ColumnSet;
2626
use crate::storages::Table;
2727

28-
pub static DUMMY_TABLE_INDEX: IndexType = IndexType::MAX;
29-
3028
pub type MetadataRef = Arc<RwLock<Metadata>>;
3129

3230
#[derive(Clone)]

src/query/service/src/sql/planner/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ pub use metadata::ColumnEntry;
4242
pub use metadata::Metadata;
4343
pub use metadata::MetadataRef;
4444
pub use metadata::TableEntry;
45-
pub use metadata::DUMMY_TABLE_INDEX;
4645
pub use semantic::normalize_identifier;
4746
pub use semantic::IdentifierNormalizer;
4847
pub use semantic::NameResolutionContext;

0 commit comments

Comments
 (0)