Skip to content

Commit

Permalink
fix(1.5.1, over window): fix range cache when some of order by and in…
Browse files Browse the repository at this point in the history
…put stream key columns are in partition by columns (#14046)

Signed-off-by: Richard Chien <[email protected]>
  • Loading branch information
stdrc authored Dec 18, 2023
1 parent c0f3182 commit 6da9617
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/stream/src/executor/over_window/general.rs
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,7 @@ impl<S: StateStore> OverWindowExecutor<S> {
&mut cache,
this.cache_policy,
&this.calls,
&this.partition_key_indices,
&this.order_key_data_types,
&this.order_key_order_types,
&this.order_key_indices,
Expand Down
3 changes: 2 additions & 1 deletion src/stream/src/executor/over_window/over_partition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,14 +243,15 @@ impl<'a, S: StateStore> OverPartition<'a, S> {
cache: &'a mut PartitionCache,
cache_policy: CachePolicy,
calls: &'a [WindowFuncCall],
partition_key_indices: &'a [usize],
order_key_data_types: &'a [DataType],
order_key_order_types: &'a [OrderType],
order_key_indices: &'a [usize],
input_pk_indices: &'a [usize],
) -> Self {
// TODO(rc): move the calculation to executor?
let mut projection = Vec::with_capacity(order_key_indices.len() + input_pk_indices.len());
let mut col_dedup = HashSet::new();
let mut col_dedup: HashSet<usize> = partition_key_indices.iter().copied().collect();
for (proj_idx, key_idx) in order_key_indices
.iter()
.chain(input_pk_indices.iter())
Expand Down

0 comments on commit 6da9617

Please sign in to comment.