-
-
Notifications
You must be signed in to change notification settings - Fork 338
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Records grouping bugfix #3751
Records grouping bugfix #3751
Conversation
@Anish9901 This PR is dependent on #3749 , and shouldn't be merged until after that one. But, it's ready for review. |
@seancolsen This is probably worth a quick glance for behavior if you have time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Structurally, this is good.
However, as far as I can tell, the result_indices
was using zero-based indexing in the REST API and now is using 1-based indexing in this PR.
From an API consumer's perspective, I think 0-based indexing would be more intuitive. And it's also how the front end already expects this data to be formed. Do you think you could change it to be 0-based?
Hmmmmmm. I took that to be primary key values. So, that's what we're returning. Am I to understand that we were returning array indices here? That's kind of odd, but it does solve the problem with no primary keys. |
Okay, I made the change. Should be the same as the old way now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works for me now. Thanks!
I added a small comment pertaining to documentation though. I think it would be good to fix that before merging.
mathesar/rpc/records.py
Outdated
Attributes: | ||
id: The id of the group. Consistent for same input. | ||
count: The number of items in the group. | ||
results_eq: The value the results of the group equal. | ||
result_indices: The primary key values of group members. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"primary key values" is not accurate here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding an approval review so you can merge this without an additional review from me.
Corresponding front end PR: #3755 |
Fixes #3742
This adds a new field to the
grouping
response to collect result indices.Checklist
Update index.md
).develop
branch of the repositoryvisible errors.
Developer Certificate of Origin
Developer Certificate of Origin