Skip to content

Commit

Permalink
chore: remove unused _row_number (#17336)
Browse files Browse the repository at this point in the history
remove unused codes

Co-authored-by: Jk Xu <[email protected]>
  • Loading branch information
zhyass and Dousir9 authored Jan 25, 2025
1 parent e057f2e commit b0c410a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
2 changes: 0 additions & 2 deletions src/query/expression/src/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ pub const CHANGE_ACTION_COL_NAME: &str = "change$action";
pub const CHANGE_IS_UPDATE_COL_NAME: &str = "change$is_update";
pub const CHANGE_ROW_ID_COL_NAME: &str = "change$row_id";

pub const ROW_NUMBER_COL_NAME: &str = "_row_number";
pub const PREDICATE_COLUMN_NAME: &str = "_predicate";

// stream column id.
Expand Down Expand Up @@ -94,7 +93,6 @@ pub static INTERNAL_COLUMNS: LazyLock<HashSet<&'static str>> = LazyLock::new(||
CHANGE_ACTION_COL_NAME,
CHANGE_IS_UPDATE_COL_NAME,
CHANGE_ROW_ID_COL_NAME,
ROW_NUMBER_COL_NAME,
PREDICATE_COLUMN_NAME,
ORIGIN_VERSION_COL_NAME,
ORIGIN_BLOCK_ID_COL_NAME,
Expand Down
13 changes: 0 additions & 13 deletions src/query/sql/src/executor/physical_plans/physical_hash_join.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ use databend_common_expression::DataField;
use databend_common_expression::DataSchemaRef;
use databend_common_expression::DataSchemaRefExt;
use databend_common_expression::RemoteExpr;
use databend_common_expression::ROW_NUMBER_COL_NAME;
use databend_common_functions::BUILTIN_FUNCTIONS;
use databend_storages_common_table_meta::table::get_change_type;

Expand Down Expand Up @@ -375,12 +374,6 @@ impl PhysicalPlanBuilder {
None
};

// for distributed merge into, there is a field called "_row_number", but
// it's not an internal row_number, we need to add it here
if let Some((index, _)) = build_schema.column_with_name(ROW_NUMBER_COL_NAME) {
build_projections.insert(index);
}

let mut merged_fields =
Vec::with_capacity(probe_projections.len() + build_projections.len());
let mut probe_fields = Vec::with_capacity(probe_projections.len());
Expand Down Expand Up @@ -503,12 +496,6 @@ impl PhysicalPlanBuilder {
}
}

// for distributed merge into, there is a field called "_row_number", but
// it's not an internal row_number, we need to add it here
if let Some((index, _)) = projected_schema.column_with_name(ROW_NUMBER_COL_NAME) {
projections.insert(index);
}

let mut output_fields = Vec::with_capacity(column_projections.len());
for (i, field) in merged_fields.iter().enumerate() {
if projections.contains(&i) {
Expand Down

0 comments on commit b0c410a

Please sign in to comment.