-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
tree: remove roachpb references #80684
Conversation
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.
Reviewed 5 of 5 files at r1, 2 of 2 files at r2, 7 of 7 files at r3.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @ajwerner, @msbutler, and @otan)
pkg/sql/sem/tree/tenant.go
line 29 at r1 (raw file):
// TODO(knz): None of this complexity would be needed if the tenant // ID was specified using an Expr here. This can be removed once the // backup target syntax accepts expressions for tenant targets.
this comment is pretty stale now given we really actively rely on Specified
and it's not "extra complexity"
Code quote:
// Specified is set to true when the TENANT clause was specified in
// the backup target input syntax. We need this, instead of relying
// on TenantID.IsSet(), because we need a special marker for
// the case when the value was anonymized. In other places, the
// value used for anonymized integer literals is 0, but we can't use
// 0 for TenantID as this is refused during parsing, nor can we use
// any other value since all non-zero integers are valid tenant IDs.
//
// TODO(knz): None of this complexity would be needed if the tenant
// ID was specified using an Expr here. This can be removed once the
// backup target syntax accepts expressions for tenant targets.
pkg/sql/sem/tree/tenant.go
line 37 at r1 (raw file):
// IsSet returns whether the TenantID is set. func (t *TenantID) IsSet() bool { return t.ID != 0
:/ See the above comment, I think we instead need to look at Specified in some cases?
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.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @ajwerner and @msbutler)
pkg/sql/sem/tree/tenant.go
line 29 at r1 (raw file):
Previously, ajwerner wrote…
this comment is pretty stale now given we really actively rely on
Specified
and it's not "extra complexity"
i've removed the TODO
pkg/sql/sem/tree/tenant.go
line 37 at r1 (raw file):
Previously, ajwerner wrote…
:/ See the above comment, I think we instead need to look at Specified in some cases?
i was just basing this on old logic (it fell to roachpb.TenantID.IsSet). Happy to chuck in a t.Specified
here as well.
Refer to TenantID as uint64 instead. Release note: None
Seems to rely on eval.Context behaviours, so moving it there. Release note: None
* BytesNext now lives in the encoding package. * tree now uses encoding.BytesNext instead of roachpb.Key.Next Release note: None
c9f9070
to
80007da
Compare
had to drop the last commit for 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.
Reviewed 1 of 11 files at r5, 2 of 2 files at r6, 7 of 7 files at r7, all commit messages.
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @msbutler)
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 like the PR was able to break the dependency between pkg/sql/parser and pkg/roachpb; so we can remove this fellow:
cockroach/pkg/sql/parser/BUILD.bazel
Line 25 in e0ec899
"//pkg/roachpb", # keep |
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @msbutler)
There is still a path to roachpb indirectly but Andrew is removing that. |
bors r=ajwerner |
Build failed: |
bors r=ajwerner |
Build succeeded: |
80842: parser: remove roachpb from tree r=irfansharif a=otan Reacting on an [earlier comment](#80684 (review)) which I misunderstood. Delete roachpb from parser as it is no longer a dependency. Refs: #79357 Release note: None Co-authored-by: Oliver Tan <otan@cockroachlabs.com>
See individual commits for details.