Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
kwannoel committed May 16, 2023
1 parent 41435d5 commit 6302d34
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/frontend/src/optimizer/plan_node/stream_table_scan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,15 @@ impl StreamTableScan {
// Construct distribution key
let distribution_key = match self.base.distribution() {
Distribution::UpstreamHashShard(dist_key, _) => {
let mut mapping = vec![None];
let mut mapping = vec![None; self.base.schema().len()];
for (new_pos, old_pos) in self.base.logical_pk.iter().enumerate() {
mapping[*old_pos] = Some(new_pos);
}
let mapping = ColIndexMapping::new(mapping);
mapping.rewrite_dist_key(dist_key).unwrap()
println!("mapping {:?}", mapping);
println!("dist_key {:?}", dist_key);
let new_dist_key = mapping.rewrite_dist_key(dist_key).unwrap()
println!("dist_key {:?}", new_dist_key);
}
Distribution::SomeShard | Distribution::Single => {
vec![]
Expand Down

0 comments on commit 6302d34

Please sign in to comment.