Skip to content

Commit

Permalink
fix(frontend): allow AnyShard for column indices
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Chi <[email protected]>
  • Loading branch information
skyzh committed Apr 7, 2022
1 parent 9c2d6fe commit 2d58688
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/frontend/src/optimizer/property/distribution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,11 @@ impl Distribution {
matches!(self, Distribution::Any)
}

/// Get distribution column indices. After optimization, only `HashShard` and `Single` are
/// valid.
/// Get distribution column indices.
pub fn dist_column_indices(&self) -> &[usize] {
match self {
Distribution::Single => Default::default(),
Distribution::HashShard(dists) => dists,
_ => unreachable!(),
_ => &[],
}
}
}
Expand Down

0 comments on commit 2d58688

Please sign in to comment.