Error out when Select gets same row#8200
Conversation
|
I wonder if we should check the indexes they ask for, and if they are the same ones, error there and say that you can't pass the same index twice. It'd be okay for two rows with the same values to be returned. |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #8200 +/- ##
===========================================
+ Coverage 54.77% 68.39% +13.61%
===========================================
Files 613 617 +4
Lines 98494 98991 +497
===========================================
+ Hits 53954 67705 +13751
+ Misses 44540 31286 -13254
|
Im maybe a bit confused, but I thought that was what I was doing. The moment its repeated, it errors out. Or perhaps you mean dealing with the indices in a different part of the code? |
rgwood
left a comment
There was a problem hiding this comment.
This looks good to me, thank you for the PR!
I agree that your code is doing what JT asked for. I've tweaked the error message wording to make that a little more clear.
Description
Fixes #8145, by disallowing any rows that are duplicated.
User-Facing Changes
Tests + Formatting
Don't forget to add tests that cover your changes.
Make sure you've run and fixed any issues with these commands:
cargo fmt --all -- --checkto check standard code formatting (cargo fmt --allapplies these changes)cargo clippy --workspace -- -D warnings -D clippy::unwrap_used -A clippy::needless_collectto check that you're using the standard code stylecargo test --workspaceto check that all tests passAfter Submitting
If your PR had any user-facing changes, update the documentation after the PR is merged, if necessary. This will help us keep the docs up to date.