Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign up*: move RowFetcher and co to a new package, row #31292
Conversation
jordanlewis
requested review from
knz and
BramGruneir
Oct 12, 2018
jordanlewis
requested review from
cockroachdb/core-prs
as
code owners
Oct 12, 2018
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
jordanlewis
requested a review
from
mjibson
Oct 12, 2018
knz
approved these changes
Oct 12, 2018
minor nits below
Reviewed 50 of 50 files at r1.
Reviewable status:complete! 0 of 0 LGTMs obtained (and 1 stale)
pkg/sql/distsqlrun/tablereader.go, line 20 at r1 (raw file):
"context" "github.com/cockroachdb/cockroach/pkg/sql/row"
put the crdb imports below
pkg/sql/logictest/logic.go, line 41 at r1 (raw file):
"unicode/utf8" "github.com/cockroachdb/cockroach/pkg/sql/row"
pull below
pkg/sql/row/cascader.go, line 30 at r1 (raw file):
"github.com/cockroachdb/cockroach/pkg/util/log" )
you could have said type ID = sqlbase.ID somewhere in this package and simplified the diff.
pkg/sql/row/fetcher.go, line 23 at r1 (raw file):
"strings" "github.com/cockroachdb/cockroach/pkg/sql/sqlbase"
pull below
pkg/sql/row/fetcher_mvcc_test.go, line 23 at r1 (raw file):
"testing" "github.com/cockroachdb/cockroach/pkg/sql/row"
ditto
pkg/sql/row/fetcher_test.go, line 23 at r1 (raw file):
"testing" "github.com/cockroachdb/cockroach/pkg/sql/sqlbase"
ditto
pkg/sql/row/fk_test.go, line 25 at r1 (raw file):
"testing" "github.com/cockroachdb/cockroach/pkg/sql/sqlbase"
ditto
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
jordanlewis
Oct 12, 2018
Member
TFTR! I'm going to fix these import nits, but I'd like to say that it's ridiculous that reviewers have to search for them. Why do we care? More importantly, why doesn't crlfmt do it? :)
|
TFTR! I'm going to fix these import nits, but I'd like to say that it's ridiculous that reviewers have to search for them. Why do we care? More importantly, why doesn't |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
dt
Oct 12, 2018
Member
I think it was @bdarnell a couple years ago who put it "if it is good enough for goimports, it is good enough for us".
EDIT: found #6096 (comment)
|
I think it was @bdarnell a couple years ago who put it "if it is good enough for goimports, it is good enough for us". EDIT: found #6096 (comment) |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
TFTRs! bors r+ |
bot
pushed a commit
that referenced
this pull request
Oct 12, 2018
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
benesch
Oct 12, 2018
Member
Wow, this looks much easier than what I was trying to do. Thanks Jordan!
|
Wow, this looks much easier than what I was trying to do. Thanks Jordan! |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
craig
bot
commented
Oct 12, 2018
Build succeeded |
jordanlewis commentedOct 12, 2018
This was purely mechanical renaming. The purpose is to lessen the width
of the sqlbase package, which is imported in many places.
The new package now depends on sqlbase, but far fewer packages consume
it than sqlbase.
Major changes:
RowFetcher -> row.Fetcher
RowUpdater -> row.Updater
RowDeleter -> row.Deleter
FK and cascade stuff -> row package
The only unfortunate thing here is that the FK enums all begin with
rownow (e.g.row.CheckDeletes). It would be better if those got adifferent package name, like
fk, but I'll leave that refactor foranother time.
Somewhat related to #30001.
cc @dt, @benesch
Release note: None