Skip to content

Commit

Permalink
fix(optimizer): internal tables return no stream key (#14303)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenzl25 authored Jan 2, 2024
1 parent 72ccc84 commit 56ce4e2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/frontend/src/optimizer/plan_node/generic/scan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ use risingwave_common::util::column_index_mapping::ColIndexMapping;
use risingwave_common::util::sort_util::ColumnOrder;

use super::GenericPlanNode;
use crate::catalog::table_catalog::TableType;
use crate::catalog::{ColumnId, IndexCatalog};
use crate::expr::{Expr, ExprImpl, ExprRewriter, ExprVisitor, FunctionCall, InputRef};
use crate::optimizer::optimizer_context::OptimizerContextRef;
Expand Down Expand Up @@ -343,6 +344,9 @@ impl GenericPlanNode for Scan {
}

fn stream_key(&self) -> Option<Vec<usize>> {
if matches!(self.table_catalog.table_type, TableType::Internal) {
return None;
}
let id_to_op_idx = Self::get_id_to_op_idx_mapping(&self.output_col_idx, &self.table_desc);
self.table_desc
.stream_key
Expand Down

0 comments on commit 56ce4e2

Please sign in to comment.