Skip to content

Commit

Permalink
Remove println! statement, introduce is_external_source variable.
Browse files Browse the repository at this point in the history
  • Loading branch information
shanicky committed Sep 19, 2023
1 parent 33da8d1 commit 26c8e1f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 13 deletions.
2 changes: 0 additions & 2 deletions src/common/src/util/row_id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ pub type RowId = i64;
pub fn extract_vnode_id_from_row_id(id: RowId) -> VirtualNode {
let vnode_id = ((id >> VNODE_ID_SHIFT_BITS) & (VNODE_ID_UPPER_BOUND as i64 - 1)) as u32;
assert!(vnode_id < VNODE_ID_UPPER_BOUND);

println!("row id {}, vnode {} ", id, vnode_id);
VirtualNode::from_index(vnode_id as usize)
}

Expand Down
8 changes: 4 additions & 4 deletions src/frontend/src/handler/create_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,8 @@ fn gen_table_plan_inner(
let connection_id =
resolve_connection_in_with_option(&mut with_options, &schema_name, &session)?;

let is_external_source = source_info.is_some();

let source = source_info.map(|source_info| PbSource {
id: TableId::placeholder().table_id,
schema_id,
Expand All @@ -681,10 +683,8 @@ fn gen_table_plan_inner(
});

let source_catalog = source.as_ref().map(|source| Rc::new((source).into()));

println!("source catalog {:?}", source_catalog);
let source_node: PlanRef = LogicalSource::new(
source_catalog.clone(),
source_catalog,
columns.clone(),
row_id_index,
false,
Expand Down Expand Up @@ -727,7 +727,7 @@ fn gen_table_plan_inner(
append_only,
watermark_descs,
version,
source_catalog.is_some(),
is_external_source,
)?;

let mut table = materialize.table().to_prost(schema_id, database_id);
Expand Down
7 changes: 0 additions & 7 deletions src/frontend/src/optimizer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,22 @@ use std::collections::HashMap;
use std::ops::DerefMut;

pub mod plan_node;

pub use plan_node::{Explain, PlanRef};

pub mod property;

mod delta_join_solver;
mod heuristic_optimizer;
mod plan_rewriter;

pub use plan_rewriter::PlanRewriter;

mod plan_visitor;

pub use plan_visitor::{
ExecutionModeDecider, PlanVisitor, RelationCollectorVisitor, SysTableVisitor,
};

mod logical_optimization;
mod optimizer_context;
mod plan_expr_rewriter;
mod plan_expr_visitor;
mod rule;

use fixedbitset::FixedBitSet;
use itertools::Itertools as _;
pub use logical_optimization::*;
Expand Down

0 comments on commit 26c8e1f

Please sign in to comment.