sql: clean up some long argument lists in fetchers#78539
Merged
craig[bot] merged 2 commits intocockroachdb:masterfrom Apr 19, 2022
Merged
sql: clean up some long argument lists in fetchers#78539craig[bot] merged 2 commits intocockroachdb:masterfrom
craig[bot] merged 2 commits intocockroachdb:masterfrom
Conversation
Member
5 tasks
yuzefovich
approved these changes
Mar 26, 2022
Member
yuzefovich
left a comment
There was a problem hiding this comment.
Reviewed 14 of 14 files at r1, 3 of 3 files at r2, all commit messages.
Reviewable status:complete! 1 of 0 LGTMs obtained (waiting on @jordanlewis and @miretskiy)
pkg/sql/row/fetcher.go, line 218 at r1 (raw file):
// Init sets up a Fetcher for a given table and index. If we are using a // non-primary index, tables.ValNeededForCol can only refer to columns in the
nit: might as well update this comment - tables.ValNeededForCol has been removed in favor of IndexFetchSpec.
099cdc1 to
829dfc7
Compare
Member
Author
|
TFTR! bors r+ |
Contributor
|
Build failed: |
Previously, the argument list to row.Fetcher.Init was too long. Now, it takes an arg struct to reduce this pain. This is a pure refactor. Release note: None
Previously, this function had way too many arguments. Replace them with an argument struct. This is a pure refactor. Release note: None
829dfc7 to
6cab233
Compare
Member
|
Courtesy rebase, will bors it once CI is green :) |
Member
Author
|
Thanks! Sorry, this slipped my notice - I recently reconfigured my GitHub notifications and hopefully that is going to improve my time-to-response on GitHub back to something reasonable. |
Member
Author
|
bors r_ |
Member
Author
|
bors r+ |
Contributor
|
Build succeeded: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is a pure refactor that replaces some overly-long argument lists with argument structs.