Skip to content

Commit b0c410a

Browse files
zhyassDousir9
andauthored
chore: remove unused _row_number (#17336)
remove unused codes Co-authored-by: Jk Xu <[email protected]>
1 parent e057f2e commit b0c410a

File tree

2 files changed

+0
-15
lines changed

2 files changed

+0
-15
lines changed

src/query/expression/src/schema.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ pub const CHANGE_ACTION_COL_NAME: &str = "change$action";
6565
pub const CHANGE_IS_UPDATE_COL_NAME: &str = "change$is_update";
6666
pub const CHANGE_ROW_ID_COL_NAME: &str = "change$row_id";
6767

68-
pub const ROW_NUMBER_COL_NAME: &str = "_row_number";
6968
pub const PREDICATE_COLUMN_NAME: &str = "_predicate";
7069

7170
// stream column id.
@@ -94,7 +93,6 @@ pub static INTERNAL_COLUMNS: LazyLock<HashSet<&'static str>> = LazyLock::new(||
9493
CHANGE_ACTION_COL_NAME,
9594
CHANGE_IS_UPDATE_COL_NAME,
9695
CHANGE_ROW_ID_COL_NAME,
97-
ROW_NUMBER_COL_NAME,
9896
PREDICATE_COLUMN_NAME,
9997
ORIGIN_VERSION_COL_NAME,
10098
ORIGIN_BLOCK_ID_COL_NAME,

src/query/sql/src/executor/physical_plans/physical_hash_join.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ use databend_common_expression::DataField;
2727
use databend_common_expression::DataSchemaRef;
2828
use databend_common_expression::DataSchemaRefExt;
2929
use databend_common_expression::RemoteExpr;
30-
use databend_common_expression::ROW_NUMBER_COL_NAME;
3130
use databend_common_functions::BUILTIN_FUNCTIONS;
3231
use databend_storages_common_table_meta::table::get_change_type;
3332

@@ -375,12 +374,6 @@ impl PhysicalPlanBuilder {
375374
None
376375
};
377376

378-
// for distributed merge into, there is a field called "_row_number", but
379-
// it's not an internal row_number, we need to add it here
380-
if let Some((index, _)) = build_schema.column_with_name(ROW_NUMBER_COL_NAME) {
381-
build_projections.insert(index);
382-
}
383-
384377
let mut merged_fields =
385378
Vec::with_capacity(probe_projections.len() + build_projections.len());
386379
let mut probe_fields = Vec::with_capacity(probe_projections.len());
@@ -503,12 +496,6 @@ impl PhysicalPlanBuilder {
503496
}
504497
}
505498

506-
// for distributed merge into, there is a field called "_row_number", but
507-
// it's not an internal row_number, we need to add it here
508-
if let Some((index, _)) = projected_schema.column_with_name(ROW_NUMBER_COL_NAME) {
509-
projections.insert(index);
510-
}
511-
512499
let mut output_fields = Vec::with_capacity(column_projections.len());
513500
for (i, field) in merged_fields.iter().enumerate() {
514501
if projections.contains(&i) {

0 commit comments

Comments
 (0)