Skip to content

Commit 1b82c9f

Browse files
committed
execinfrapb: minor cleanup of Expression
Removed unused version field and fix up a comment. Release note: None
1 parent 67cb06a commit 1b82c9f

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

pkg/sql/execinfrapb/data.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,14 @@ func ConvertToMappedSpecOrdering(
6868
}
6969

7070
// Expression is the representation of a SQL expression.
71+
//
7172
// See data.proto for the corresponding proto definition. Its automatic type
7273
// declaration is suppressed in the proto via the typedecl=false option, so that
7374
// we can add the LocalExpr field which is not serialized. It never needs to be
74-
// serialized because we only use it in the case where we know we won't need to
75-
// send it, as a proto, to another machine.
75+
// serialized because it's just an optimization on the gateway to avoid
76+
// redundant deserialization (Expr will be set when protos are sent to remote
77+
// nodes).
7678
type Expression struct {
77-
// Version is unused.
78-
Version string
79-
8079
// Expr, if present, is the string representation of this expression.
8180
// SQL expressions are passed as a string, with ordinal references
8281
// (@1, @2, @3 ..) used for "input" variables.

pkg/sql/execinfrapb/data.proto

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,11 @@ message Expression {
4040
option (gogoproto.typedecl) = false;
4141
option (gogoproto.goproto_stringer) = false;
4242

43-
// TODO(radu): TBD how this will be used
44-
optional string version = 1 [(gogoproto.nullable) = false];
45-
4643
// SQL expressions are passed as a string, with ordinal references
4744
// (@1, @2, @3 ..) used for "input" variables.
4845
optional string expr = 2 [(gogoproto.nullable) = false];
46+
47+
reserved 1;
4948
}
5049

5150
// Ordering defines an order - specifically a list of column indices and

0 commit comments

Comments
 (0)