Skip to content

Conversation

jonathanc-n
Copy link
Collaborator

Which issue does this PR close?

  • Closes #.

What changes are included in this PR?

Remove duplicate projections

Are these changes tested?

let mut indices: Vec<usize> = Vec::with_capacity(projection.len());

// Remove duplicate projections
for &name in projection {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a little difficult to keep the chaining functions as .filter().map() requires mutable + immutable borrows, .filter_map returns Options

Copy link

codecov bot commented Aug 6, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

let mut fixed_projection = vec![0, 1, primary_key_index];
fixed_projection.append(&mut projection);
fixed_projection.dedup();
fixed_projection.append(&mut indices);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this won't work. For example, when we query &["primary_key"], the fixed_projection is [0, 1, 2, 2].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants