From 202065e9d8ac982488165f1c5048c72f2383f40e Mon Sep 17 00:00:00 2001 From: Harshit Gangal Date: Wed, 5 Feb 2025 15:46:24 +0100 Subject: [PATCH 1/8] Views global routing (#17633) Signed-off-by: Harshit Gangal Signed-off-by: Andres Taylor Co-authored-by: Andres Taylor --- .../vtgate/schematracker/multi_ks/sschema.sql | 16 ++ .../schematracker/multi_ks/svschema.json | 34 +++ .../vtgate/schematracker/multi_ks/uschema.sql | 16 ++ .../schematracker/multi_ks/uvschema.json | 8 + .../schematracker/multi_ks/views_test.go | 253 ++++++++++++++++++ go/test/vschemawrapper/vschema_wrapper.go | 4 +- go/vt/schemadiff/semantics.go | 8 +- go/vt/sqlparser/ast_funcs.go | 17 ++ go/vt/sqlparser/ast_funcs_test.go | 10 + go/vt/vtgate/engine/fake_vcursor_test.go | 6 +- go/vt/vtgate/engine/insert.go | 2 +- go/vt/vtgate/engine/insert_select.go | 2 +- go/vt/vtgate/engine/primitive.go | 2 +- go/vt/vtgate/engine/route_test.go | 2 +- go/vt/vtgate/executorcontext/vcursor_impl.go | 10 +- go/vt/vtgate/planbuilder/ddl.go | 6 +- go/vt/vtgate/planbuilder/delete.go | 2 +- go/vt/vtgate/planbuilder/insert.go | 4 +- .../planbuilder/operator_transformers.go | 2 +- go/vt/vtgate/planbuilder/operators/delete.go | 10 +- .../planbuilder/operators/dml_planning.go | 6 +- go/vt/vtgate/planbuilder/operators/helpers.go | 2 +- go/vt/vtgate/planbuilder/operators/insert.go | 20 +- go/vt/vtgate/planbuilder/operators/route.go | 8 +- .../planbuilder/operators/route_planning.go | 4 +- .../planbuilder/operators/sharded_routing.go | 2 +- go/vt/vtgate/planbuilder/operators/table.go | 2 +- go/vt/vtgate/planbuilder/operators/update.go | 28 +- .../planbuilder/operators/update_test.go | 2 +- go/vt/vtgate/planbuilder/operators/upsert.go | 2 +- go/vt/vtgate/planbuilder/operators/vindex.go | 2 +- .../plancontext/planning_context_test.go | 4 +- .../vtgate/planbuilder/plancontext/vschema.go | 4 +- go/vt/vtgate/planbuilder/planner_test.go | 2 +- go/vt/vtgate/planbuilder/update.go | 2 +- go/vt/vtgate/planbuilder/vexplain.go | 2 +- go/vt/vtgate/schema/tracker.go | 1 + go/vt/vtgate/schema/tracker_test.go | 31 ++- go/vt/vtgate/semantics/FakeSI.go | 4 +- go/vt/vtgate/semantics/analyzer_test.go | 64 ++--- go/vt/vtgate/semantics/cte_table.go | 2 +- go/vt/vtgate/semantics/derived_table.go | 2 +- go/vt/vtgate/semantics/derived_test.go | 6 +- go/vt/vtgate/semantics/early_rewriter_test.go | 18 +- go/vt/vtgate/semantics/foreign_keys_test.go | 20 +- go/vt/vtgate/semantics/info_schema.go | 4 +- go/vt/vtgate/semantics/real_table.go | 4 +- go/vt/vtgate/semantics/semantic_table.go | 12 +- go/vt/vtgate/semantics/semantic_table_test.go | 66 ++--- go/vt/vtgate/semantics/table_collector.go | 10 +- go/vt/vtgate/semantics/vindex_table.go | 2 +- go/vt/vtgate/semantics/vtable.go | 2 +- go/vt/vtgate/vindexes/foreign_keys.go | 12 +- go/vt/vtgate/vindexes/vschema.go | 214 +++++++++------ go/vt/vtgate/vindexes/vschema_routing_test.go | 16 +- go/vt/vtgate/vindexes/vschema_test.go | 186 +++++++++---- go/vt/vtgate/vschema_manager.go | 22 +- go/vt/vtgate/vschema_manager_test.go | 124 ++++++--- .../tabletserver/vstreamer/local_vschema.go | 2 +- 59 files changed, 924 insertions(+), 406 deletions(-) create mode 100644 go/test/endtoend/vtgate/schematracker/multi_ks/sschema.sql create mode 100644 go/test/endtoend/vtgate/schematracker/multi_ks/svschema.json create mode 100644 go/test/endtoend/vtgate/schematracker/multi_ks/uschema.sql create mode 100644 go/test/endtoend/vtgate/schematracker/multi_ks/uvschema.json create mode 100644 go/test/endtoend/vtgate/schematracker/multi_ks/views_test.go diff --git a/go/test/endtoend/vtgate/schematracker/multi_ks/sschema.sql b/go/test/endtoend/vtgate/schematracker/multi_ks/sschema.sql new file mode 100644 index 00000000000..7c1244eb318 --- /dev/null +++ b/go/test/endtoend/vtgate/schematracker/multi_ks/sschema.sql @@ -0,0 +1,16 @@ +create table t( + id bigint, + col bigint, + primary key(id) +) Engine=InnoDB; + +create table s( + id bigint, + col bigint, + primary key(id) +) Engine=InnoDB; + +create view sv1 as select t.id as id, t.col + s.col as acol from t join s on t.id = s.id; +create view cv1 as select t.id as id, t.col - s.col as scol from t join s on t.id = s.id; +create view cv2 as select t.id as id, t.col * s.col as mcol from t join s on t.id = s.id; +create view cv3 as select t.id as id, t.col / s.col as dcol from t join s on t.id = s.id; \ No newline at end of file diff --git a/go/test/endtoend/vtgate/schematracker/multi_ks/svschema.json b/go/test/endtoend/vtgate/schematracker/multi_ks/svschema.json new file mode 100644 index 00000000000..f81ad52549c --- /dev/null +++ b/go/test/endtoend/vtgate/schematracker/multi_ks/svschema.json @@ -0,0 +1,34 @@ +{ + "sharded": true, + "vindexes": { + "reverse_bits": { + "type": "reverse_bits" + } + }, + "tables": { + "t": { + "column_vindexes": [ + { + "column": "id", + "name": "reverse_bits" + } + ] + }, + "s": { + "column_vindexes": [ + { + "column": "id", + "name": "reverse_bits" + } + ] + }, + "cv2": { + "column_vindexes": [ + { + "column": "id", + "name": "reverse_bits" + } + ] + } + } +} \ No newline at end of file diff --git a/go/test/endtoend/vtgate/schematracker/multi_ks/uschema.sql b/go/test/endtoend/vtgate/schematracker/multi_ks/uschema.sql new file mode 100644 index 00000000000..89e9c97243f --- /dev/null +++ b/go/test/endtoend/vtgate/schematracker/multi_ks/uschema.sql @@ -0,0 +1,16 @@ +create table t( + id bigint, + col bigint, + primary key(id) +) Engine=InnoDB; + +create table u( + id bigint, + col bigint, + primary key(id) +) Engine=InnoDB; + +create view uv1 as select t.id as id, t.col + u.col as acol from t join u on t.id = u.id; +create view cv1 as select t.id as id, t.col - u.col as scol from t join u on t.id = u.id; +create view cv2 as select t.id as id, t.col * u.col as mcol from t join u on t.id = u.id; +create view cv3 as select t.id as id, t.col / u.col as dcol from t join u on t.id = u.id; \ No newline at end of file diff --git a/go/test/endtoend/vtgate/schematracker/multi_ks/uvschema.json b/go/test/endtoend/vtgate/schematracker/multi_ks/uvschema.json new file mode 100644 index 00000000000..aaf08022676 --- /dev/null +++ b/go/test/endtoend/vtgate/schematracker/multi_ks/uvschema.json @@ -0,0 +1,8 @@ +{ + "sharded": false, + "tables": { + "t": {}, + "u": {}, + "cv1": {} + } +} \ No newline at end of file diff --git a/go/test/endtoend/vtgate/schematracker/multi_ks/views_test.go b/go/test/endtoend/vtgate/schematracker/multi_ks/views_test.go new file mode 100644 index 00000000000..1300d371c30 --- /dev/null +++ b/go/test/endtoend/vtgate/schematracker/multi_ks/views_test.go @@ -0,0 +1,253 @@ +/* +Copyright 2025 The Vitess Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package multiks + +import ( + "context" + _ "embed" + "flag" + "fmt" + "os" + "testing" + "time" + + "github.com/stretchr/testify/require" + + "vitess.io/vitess/go/mysql" + "vitess.io/vitess/go/test/endtoend/cluster" + "vitess.io/vitess/go/test/endtoend/utils" +) + +var ( + clusterInstance *cluster.LocalProcessCluster + vtParams mysql.ConnParams + shardedKs = "sks" + unshardedKs = "uks" + cell = "zone1" + + //go:embed sschema.sql + shardedSchema string + + //go:embed uschema.sql + unshardedSchema string + + //go:embed svschema.json + shardedVSchema string + + //go:embed uvschema.json + unshardedVSchema string +) + +func TestMain(m *testing.M) { + flag.Parse() + + exitCode := func() int { + clusterInstance = cluster.NewCluster(cell, "localhost") + defer clusterInstance.Teardown() + + // Start topo server + err := clusterInstance.StartTopo() + if err != nil { + return 1 + } + + // enable views tracking + clusterInstance.VtGateExtraArgs = append(clusterInstance.VtGateExtraArgs, "--enable-views") + clusterInstance.VtTabletExtraArgs = append(clusterInstance.VtTabletExtraArgs, "--queryserver-enable-views") + + // Start sharded keyspace + sks := cluster.Keyspace{ + Name: shardedKs, + SchemaSQL: shardedSchema, + VSchema: shardedVSchema, + } + + err = clusterInstance.StartKeyspace(sks, []string{"-80", "80-"}, 0, false) + if err != nil { + return 1 + } + + // Start unsharded keyspace + uks := cluster.Keyspace{ + Name: unshardedKs, + SchemaSQL: unshardedSchema, + VSchema: unshardedVSchema, + } + + err = clusterInstance.StartUnshardedKeyspace(uks, 0, false) + if err != nil { + return 1 + } + + // Start vtgate + err = clusterInstance.StartVtgate() + if err != nil { + return 1 + } + + err = clusterInstance.WaitForVTGateAndVTTablets(1 * time.Minute) + if err != nil { + fmt.Println(err) + return 1 + } + + vtParams = mysql.ConnParams{ + Host: clusterInstance.Hostname, + Port: clusterInstance.VtgateMySQLPort, + } + return m.Run() + }() + os.Exit(exitCode) +} + +// TestViewQueries validates that view tracking works as expected with qualified and unqualified views. +func TestViewQueries(t *testing.T) { + ctx := context.Background() + conn, err := mysql.Connect(ctx, &vtParams) + require.NoError(t, err) + defer conn.Close() + + viewExists := func(t *testing.T, ksMap map[string]any) bool { + // wait for the view definition to change + views := ksMap["views"] + viewsMap := views.(map[string]any) + _, ok := viewsMap["cv3"] + return ok + } + + utils.WaitForVschemaCondition(t, clusterInstance.VtgateProcess, shardedKs, viewExists, "view cv3 not found") + + // Insert some data + insertData(t, conn) + + tcases := []struct { + name string + sql string + defaultKs string + expRes string + expErr string + }{{ + name: "unique unsharded view - qualified", + defaultKs: "@primary", + sql: "select * from uks.uv1 order by id", + expRes: "[[INT64(1) INT64(1010)] [INT64(2) INT64(4020)]]", + }, { + name: "unique sharded view - qualified", + defaultKs: "@primary", + sql: "select * from sks.sv1 order by id", + expRes: "[[INT64(1) INT64(1100)] [INT64(2) INT64(4200)]]", + }, { + name: "unique unsharded view - non qualified", + defaultKs: "@primary", + sql: "select * from uv1 order by id", + expRes: "[[INT64(1) INT64(1010)] [INT64(2) INT64(4020)]]", + }, { + name: "unique sharded view - non qualified", + defaultKs: "@primary", + sql: "select * from sv1 order by id", + expRes: "[[INT64(1) INT64(1100)] [INT64(2) INT64(4200)]]", + }, { + name: "unique unsharded view - non qualified - default unsharded keyspace", + defaultKs: "uks", + sql: "select * from uv1 order by id", + expRes: "[[INT64(1) INT64(1010)] [INT64(2) INT64(4020)]]", + }, { + name: "unique sharded view - non qualified - default unsharded keyspace- should error", + defaultKs: "uks", + sql: "select * from sv1 order by id", + expErr: "(errno 1146) (sqlstate 42S02)", + }, { + name: "unique unsharded view - non qualified - default sharded keyspace - should error", + defaultKs: "sks", + sql: "select * from uv1 order by id", + expErr: "table uv1 not found", + }, { + name: "unique sharded view - non qualified - default sharded keyspace", + defaultKs: "sks", + sql: "select * from sv1 order by id", + expRes: "[[INT64(1) INT64(1100)] [INT64(2) INT64(4200)]]", + }, { + name: "unique sharded view - qualified - default sharded keyspace", + defaultKs: "sks", + sql: "select * from sks.sv1 order by id", + expRes: "[[INT64(1) INT64(1100)] [INT64(2) INT64(4200)]]", + }, { + name: "vschema provided - unsharded view - non qualified", + defaultKs: "@primary", + sql: "select * from cv1 order by id", + expRes: "[[INT64(1) INT64(990)] [INT64(2) INT64(3980)]]", + }, { + name: "vschema provided - sharded view - non qualified", + defaultKs: "@primary", + sql: "select id, mcol from cv2 order by id", + expRes: "[[INT64(1) INT64(100000)] [INT64(2) INT64(800000)]]", + }, { + name: "non unique view - non qualified - should error", + defaultKs: "@primary", + sql: "select * from cv3 order by id", + expErr: "ambiguous table reference: cv3", + }, { + name: "non unique view - unsharded qualified", + defaultKs: "@primary", + sql: "select * from uks.cv3 order by id", + expRes: "[[INT64(1) DECIMAL(100.0000)] [INT64(2) DECIMAL(200.0000)]]", + }, { + name: "non unique view - sharded qualified", + defaultKs: "@primary", + sql: "select * from sks.cv3 order by id", + expRes: "[[INT64(1) DECIMAL(10.0000)] [INT64(2) DECIMAL(20.0000)]]", + }, { + name: "non unique view - non qualified - default unsharded keyspace", + defaultKs: "uks", + sql: "select * from cv3 order by id", + expRes: "[[INT64(1) DECIMAL(100.0000)] [INT64(2) DECIMAL(200.0000)]]", + }, { + name: "non unique view - non qualified - default sharded keyspace", + defaultKs: "sks", + sql: "select * from cv3 order by id", + expRes: "[[INT64(1) DECIMAL(10.0000)] [INT64(2) DECIMAL(20.0000)]]", + }} + + for _, tc := range tcases { + t.Run(tc.name, func(t *testing.T) { + utils.Exec(t, conn, "use "+tc.defaultKs) + qr, err := utils.ExecAllowError(t, conn, tc.sql) + if tc.expErr != "" { + require.ErrorContains(t, err, tc.expErr) + return + } + require.NoError(t, err) + require.Equal(t, tc.expRes, fmt.Sprintf("%v", qr.Rows)) + }) + } +} + +func insertData(t *testing.T, conn *mysql.Conn) { + t.Helper() + + // unsharded + utils.Exec(t, conn, "insert into uks.t(id, col) values(1, 1000)") + utils.Exec(t, conn, "insert into uks.t(id, col) values(2, 4000)") + utils.Exec(t, conn, "insert into u(id, col) values(1, 10)") + utils.Exec(t, conn, "insert into u(id, col) values(2, 20)") + + // sharded + utils.Exec(t, conn, "insert into sks.t(id, col) values(1, 1000)") + utils.Exec(t, conn, "insert into sks.t(id, col) values(2, 4000)") + utils.Exec(t, conn, "insert into s(id, col) values(1, 100)") + utils.Exec(t, conn, "insert into s(id, col) values(2, 200)") +} diff --git a/go/test/vschemawrapper/vschema_wrapper.go b/go/test/vschemawrapper/vschema_wrapper.go index 5b1c6b033e6..02daa646bf8 100644 --- a/go/test/vschemawrapper/vschema_wrapper.go +++ b/go/test/vschemawrapper/vschema_wrapper.go @@ -253,7 +253,7 @@ func (vw *VSchemaWrapper) Destination() key.Destination { return vw.Dest } -func (vw *VSchemaWrapper) FindTable(tab sqlparser.TableName) (*vindexes.Table, string, topodatapb.TabletType, key.Destination, error) { +func (vw *VSchemaWrapper) FindTable(tab sqlparser.TableName) (*vindexes.BaseTable, string, topodatapb.TabletType, key.Destination, error) { destKeyspace, destTabletType, destTarget, err := topoproto.ParseDestination(tab.Qualifier.String(), topodatapb.TabletType_PRIMARY) if err != nil { return nil, destKeyspace, destTabletType, destTarget, err @@ -284,7 +284,7 @@ func (vw *VSchemaWrapper) FindViewTarget(name sqlparser.TableName) (*vindexes.Ke return nil, nil } -func (vw *VSchemaWrapper) FindTableOrVindex(tab sqlparser.TableName) (*vindexes.Table, vindexes.Vindex, string, topodatapb.TabletType, key.Destination, error) { +func (vw *VSchemaWrapper) FindTableOrVindex(tab sqlparser.TableName) (*vindexes.BaseTable, vindexes.Vindex, string, topodatapb.TabletType, key.Destination, error) { return vw.Vcursor.FindTableOrVindex(tab) } diff --git a/go/vt/schemadiff/semantics.go b/go/vt/schemadiff/semantics.go index f12f59ef6ae..a2a4b4f954f 100644 --- a/go/vt/schemadiff/semantics.go +++ b/go/vt/schemadiff/semantics.go @@ -38,19 +38,19 @@ var _ semantics.SchemaInformation = (*declarativeSchemaInformation)(nil) // declarativeSchemaInformation is a utility wrapper around FakeSI, and adds a few utility functions // to make it more simple and accessible to schemadiff's logic. type declarativeSchemaInformation struct { - Tables map[string]*vindexes.Table + Tables map[string]*vindexes.BaseTable env *Environment } func newDeclarativeSchemaInformation(env *Environment) *declarativeSchemaInformation { return &declarativeSchemaInformation{ - Tables: make(map[string]*vindexes.Table), + Tables: make(map[string]*vindexes.BaseTable), env: env, } } // FindTableOrVindex implements the SchemaInformation interface -func (si *declarativeSchemaInformation) FindTableOrVindex(tablename sqlparser.TableName) (*vindexes.Table, vindexes.Vindex, string, topodatapb.TabletType, key.Destination, error) { +func (si *declarativeSchemaInformation) FindTableOrVindex(tablename sqlparser.TableName) (*vindexes.BaseTable, vindexes.Vindex, string, topodatapb.TabletType, key.Destination, error) { table := si.Tables[tablename.Name.String()] return table, nil, "", 0, nil, nil } @@ -86,7 +86,7 @@ func (si *declarativeSchemaInformation) FindMirrorRule(tablename sqlparser.Table // addTable adds a fake table with an empty column list func (si *declarativeSchemaInformation) addTable(tableName string) { - tbl := &vindexes.Table{ + tbl := &vindexes.BaseTable{ Name: sqlparser.NewIdentifierCS(tableName), Columns: []vindexes.Column{}, ColumnListAuthoritative: true, diff --git a/go/vt/sqlparser/ast_funcs.go b/go/vt/sqlparser/ast_funcs.go index fbf5a346c98..2da783af3df 100644 --- a/go/vt/sqlparser/ast_funcs.go +++ b/go/vt/sqlparser/ast_funcs.go @@ -2471,6 +2471,23 @@ func removeKeyspace(in SQLNode, shouldRemove func(qualifier string) bool) { }) } +// AddKeyspace adds the keyspace qualifier to TableName if it's not already present +func AddKeyspace(in SQLNode, ks string) { + Rewrite(in, func(cursor *Cursor) bool { + switch expr := cursor.Node().(type) { + case *ColName: + // ignore it + return false + case TableName: + if expr.Qualifier.IsEmpty() { + expr.Qualifier = NewIdentifierCS(ks) + cursor.Replace(expr) + } + } + return true + }, nil) +} + func convertStringToInt(integer string) int { val, _ := strconv.Atoi(integer) return val diff --git a/go/vt/sqlparser/ast_funcs_test.go b/go/vt/sqlparser/ast_funcs_test.go index 009f3e6cc15..1d195b84c88 100644 --- a/go/vt/sqlparser/ast_funcs_test.go +++ b/go/vt/sqlparser/ast_funcs_test.go @@ -244,3 +244,13 @@ func TestRemoveSpecificKeyspace(t *testing.T) { RemoveSpecificKeyspace(stmt, "uks") require.Equal(t, "select 1 from unsharded", String(stmt)) } + +// TestAddKeyspace tests the AddKeyspace function which adds the keyspace to the non-qualified table. +func TestKeyspaceToNonQualifiedTable(t *testing.T) { + stmt, err := NewTestParser().Parse("select col, col + (select 1 from t4) from ks.t join t2 join (select 1 from t3) as x where t.id = t2.id and x.id = t.id") + require.NoError(t, err) + + // add keyspace to non qualified table + AddKeyspace(stmt, "ks2") + require.Equal(t, "select col, col + (select 1 from ks2.t4) from ks.t join ks2.t2 join (select 1 from ks2.t3) as x where t.id = t2.id and x.id = t.id", String(stmt)) +} diff --git a/go/vt/vtgate/engine/fake_vcursor_test.go b/go/vt/vtgate/engine/fake_vcursor_test.go index 060d2ebcfcb..b277b018faa 100644 --- a/go/vt/vtgate/engine/fake_vcursor_test.go +++ b/go/vt/vtgate/engine/fake_vcursor_test.go @@ -267,7 +267,7 @@ func (t *noopVCursor) InTransactionAndIsDML() bool { panic("implement me") } -func (t *noopVCursor) FindRoutedTable(sqlparser.TableName) (*vindexes.Table, error) { +func (t *noopVCursor) FindRoutedTable(sqlparser.TableName) (*vindexes.BaseTable, error) { panic("implement me") } @@ -480,7 +480,7 @@ func (f *loggingVCursor) GetUDV(key string) *querypb.BindVariable { } type tableRoutes struct { - tbl *vindexes.Table + tbl *vindexes.BaseTable } func (f *loggingVCursor) ExecutePrimitive(ctx context.Context, primitive Primitive, bindVars map[string]*querypb.BindVariable, wantfields bool) (*sqltypes.Result, error) { @@ -845,7 +845,7 @@ func (f *loggingVCursor) SetPriority(string) { panic("implement me") } -func (f *loggingVCursor) FindRoutedTable(tbl sqlparser.TableName) (*vindexes.Table, error) { +func (f *loggingVCursor) FindRoutedTable(tbl sqlparser.TableName) (*vindexes.BaseTable, error) { f.log = append(f.log, fmt.Sprintf("FindTable(%s)", sqlparser.String(tbl))) return f.tableRoutes.tbl, nil } diff --git a/go/vt/vtgate/engine/insert.go b/go/vt/vtgate/engine/insert.go index 5bc206f7465..c51c490ada6 100644 --- a/go/vt/vtgate/engine/insert.go +++ b/go/vt/vtgate/engine/insert.go @@ -77,7 +77,7 @@ func newInsert( ignore bool, keyspace *vindexes.Keyspace, vindexValues [][][]evalengine.Expr, - table *vindexes.Table, + table *vindexes.BaseTable, prefix string, mid sqlparser.Values, suffix sqlparser.OnDup, diff --git a/go/vt/vtgate/engine/insert_select.go b/go/vt/vtgate/engine/insert_select.go index af834858175..1e1ea5b20f9 100644 --- a/go/vt/vtgate/engine/insert_select.go +++ b/go/vt/vtgate/engine/insert_select.go @@ -55,7 +55,7 @@ type ( func newInsertSelect( ignore bool, keyspace *vindexes.Keyspace, - table *vindexes.Table, + table *vindexes.BaseTable, prefix string, suffix sqlparser.OnDup, vv [][]int, diff --git a/go/vt/vtgate/engine/primitive.go b/go/vt/vtgate/engine/primitive.go index 7734dd81a6b..fe991a670b6 100644 --- a/go/vt/vtgate/engine/primitive.go +++ b/go/vt/vtgate/engine/primitive.go @@ -98,7 +98,7 @@ type ( LookupRowLockShardSession() vtgatepb.CommitOrder - FindRoutedTable(tablename sqlparser.TableName) (*vindexes.Table, error) + FindRoutedTable(tablename sqlparser.TableName) (*vindexes.BaseTable, error) // GetDBDDLPlugin gets the configured plugin for DROP/CREATE DATABASE GetDBDDLPluginName() string diff --git a/go/vt/vtgate/engine/route_test.go b/go/vt/vtgate/engine/route_test.go index b2f4020cb59..6b6f65acf42 100644 --- a/go/vt/vtgate/engine/route_test.go +++ b/go/vt/vtgate/engine/route_test.go @@ -178,7 +178,7 @@ func TestInformationSchemaWithTableAndSchemaWithRoutedTables(t *testing.T) { } if tc.routed { vc.tableRoutes = tableRoutes{ - tbl: &vindexes.Table{ + tbl: &vindexes.BaseTable{ Name: sqlparser.NewIdentifierCS("routedTable"), Keyspace: &vindexes.Keyspace{Name: "routedKeyspace"}, }} diff --git a/go/vt/vtgate/executorcontext/vcursor_impl.go b/go/vt/vtgate/executorcontext/vcursor_impl.go index 4d3f631bac5..19b8f3cbe3a 100644 --- a/go/vt/vtgate/executorcontext/vcursor_impl.go +++ b/go/vt/vtgate/executorcontext/vcursor_impl.go @@ -391,7 +391,7 @@ func (vc *VCursorImpl) StartPrimitiveTrace() func() engine.Stats { // FindTable finds the specified table. If the keyspace what specified in the input, it gets used as qualifier. // Otherwise, the keyspace from the request is used, if one was provided. -func (vc *VCursorImpl) FindTable(name sqlparser.TableName) (*vindexes.Table, string, topodatapb.TabletType, key.Destination, error) { +func (vc *VCursorImpl) FindTable(name sqlparser.TableName) (*vindexes.BaseTable, string, topodatapb.TabletType, key.Destination, error) { destKeyspace, destTabletType, dest, err := vc.parseDestinationTarget(name.Qualifier.String()) if err != nil { return nil, "", destTabletType, nil, err @@ -417,7 +417,7 @@ func (vc *VCursorImpl) FindView(name sqlparser.TableName) sqlparser.TableStateme return vc.vschema.FindView(ks, name.Name.String()) } -func (vc *VCursorImpl) FindRoutedTable(name sqlparser.TableName) (*vindexes.Table, error) { +func (vc *VCursorImpl) FindRoutedTable(name sqlparser.TableName) (*vindexes.BaseTable, error) { destKeyspace, destTabletType, _, err := vc.parseDestinationTarget(name.Qualifier.String()) if err != nil { return nil, err @@ -435,7 +435,7 @@ func (vc *VCursorImpl) FindRoutedTable(name sqlparser.TableName) (*vindexes.Tabl } // FindTableOrVindex finds the specified table or vindex. -func (vc *VCursorImpl) FindTableOrVindex(name sqlparser.TableName) (*vindexes.Table, vindexes.Vindex, string, topodatapb.TabletType, key.Destination, error) { +func (vc *VCursorImpl) FindTableOrVindex(name sqlparser.TableName) (*vindexes.BaseTable, vindexes.Vindex, string, topodatapb.TabletType, key.Destination, error) { if name.Qualifier.IsEmpty() && name.Name.String() == "dual" { // The magical MySQL dual table should only be resolved // when it is not qualified by a database name. @@ -489,7 +489,7 @@ func ParseDestinationTarget(targetString string, tablet topodatapb.TabletType, v return destKeyspace, destTabletType, dest, err } -func (vc *VCursorImpl) getDualTable() (*vindexes.Table, vindexes.Vindex, string, topodatapb.TabletType, key.Destination, error) { +func (vc *VCursorImpl) getDualTable() (*vindexes.BaseTable, vindexes.Vindex, string, topodatapb.TabletType, key.Destination, error) { ksName := vc.getActualKeyspace() var ks *vindexes.Keyspace if ksName == "" { @@ -498,7 +498,7 @@ func (vc *VCursorImpl) getDualTable() (*vindexes.Table, vindexes.Vindex, string, } else { ks = vc.vschema.Keyspaces[ksName].Keyspace } - tbl := &vindexes.Table{ + tbl := &vindexes.BaseTable{ Name: sqlparser.NewIdentifierCS("dual"), Keyspace: ks, Type: vindexes.TypeReference, diff --git a/go/vt/vtgate/planbuilder/ddl.go b/go/vt/vtgate/planbuilder/ddl.go index 2ca924c31ab..1359da1c0a8 100644 --- a/go/vt/vtgate/planbuilder/ddl.go +++ b/go/vt/vtgate/planbuilder/ddl.go @@ -166,7 +166,7 @@ func checkFKError(vschema plancontext.VSchema, ddlStatement sqlparser.DDLStateme } func findTableDestinationAndKeyspace(vschema plancontext.VSchema, ddlStatement sqlparser.DDLStatement) (key.Destination, *vindexes.Keyspace, error) { - var table *vindexes.Table + var table *vindexes.BaseTable var destination key.Destination var keyspace *vindexes.Keyspace var err error @@ -325,7 +325,7 @@ func buildDropTable(vschema plancontext.VSchema, ddlStatement sqlparser.DDLState for i, tab := range ddlStatement.GetFromTables() { var destinationTab key.Destination var keyspaceTab *vindexes.Keyspace - var table *vindexes.Table + var table *vindexes.BaseTable var err error table, _, _, _, destinationTab, err = vschema.FindTableOrVindex(tab) @@ -369,7 +369,7 @@ func buildRenameTable(vschema plancontext.VSchema, renameTable *sqlparser.Rename for _, tabPair := range renameTable.TablePairs { var destinationFrom key.Destination var keyspaceFrom *vindexes.Keyspace - var table *vindexes.Table + var table *vindexes.BaseTable var err error table, _, _, _, destinationFrom, err = vschema.FindTableOrVindex(tabPair.FromTable) diff --git a/go/vt/vtgate/planbuilder/delete.go b/go/vt/vtgate/planbuilder/delete.go index 239e7bae0ae..95c2f68dc62 100644 --- a/go/vt/vtgate/planbuilder/delete.go +++ b/go/vt/vtgate/planbuilder/delete.go @@ -123,7 +123,7 @@ func rewriteSingleTbl(del *sqlparser.Delete) (*sqlparser.Delete, error) { return del, nil } -func deleteUnshardedShortcut(stmt *sqlparser.Delete, ks *vindexes.Keyspace, tables []*vindexes.Table) engine.Primitive { +func deleteUnshardedShortcut(stmt *sqlparser.Delete, ks *vindexes.Keyspace, tables []*vindexes.BaseTable) engine.Primitive { edml := engine.NewDML() edml.Keyspace = ks edml.Opcode = engine.Unsharded diff --git a/go/vt/vtgate/planbuilder/insert.go b/go/vt/vtgate/planbuilder/insert.go index d3ad5afac72..d784fffe7ee 100644 --- a/go/vt/vtgate/planbuilder/insert.go +++ b/go/vt/vtgate/planbuilder/insert.go @@ -83,14 +83,14 @@ func gen4InsertStmtPlanner(version querypb.ExecuteOptions_PlannerVersion, insStm return newPlanResult(plan, operators.TablesUsed(op)...), nil } -func errOutIfPlanCannotBeConstructed(ctx *plancontext.PlanningContext, vTbl *vindexes.Table) error { +func errOutIfPlanCannotBeConstructed(ctx *plancontext.PlanningContext, vTbl *vindexes.BaseTable) error { if !vTbl.Keyspace.Sharded { return nil } return ctx.SemTable.NotUnshardedErr } -func insertUnshardedShortcut(ctx *plancontext.PlanningContext, stmt *sqlparser.Insert, ks *vindexes.Keyspace, tables []*vindexes.Table) engine.Primitive { +func insertUnshardedShortcut(ctx *plancontext.PlanningContext, stmt *sqlparser.Insert, ks *vindexes.Keyspace, tables []*vindexes.BaseTable) engine.Primitive { eIns := &engine.Insert{ InsertCommon: engine.InsertCommon{ Opcode: engine.InsertUnsharded, diff --git a/go/vt/vtgate/planbuilder/operator_transformers.go b/go/vt/vtgate/planbuilder/operator_transformers.go index b51eac449fc..807912110df 100644 --- a/go/vt/vtgate/planbuilder/operator_transformers.go +++ b/go/vt/vtgate/planbuilder/operator_transformers.go @@ -783,7 +783,7 @@ func buildDeletePrimitive(ctx *plancontext.PlanningContext, rb *operators.Route, return &engine.Delete{DML: edml}, nil } -func createDMLPrimitive(ctx *plancontext.PlanningContext, rb *operators.Route, hints *queryHints, vTbl *vindexes.Table, query string, colVindexes []*vindexes.ColumnVindex, vindexQuery string) *engine.DML { +func createDMLPrimitive(ctx *plancontext.PlanningContext, rb *operators.Route, hints *queryHints, vTbl *vindexes.BaseTable, query string, colVindexes []*vindexes.ColumnVindex, vindexQuery string) *engine.DML { rp := newRoutingParams(ctx, rb.Routing.OpCode()) rb.Routing.UpdateRoutingParams(ctx, rp) edml := &engine.DML{ diff --git a/go/vt/vtgate/planbuilder/operators/delete.go b/go/vt/vtgate/planbuilder/operators/delete.go index 015220470e0..23c909e0a04 100644 --- a/go/vt/vtgate/planbuilder/operators/delete.go +++ b/go/vt/vtgate/planbuilder/operators/delete.go @@ -71,7 +71,7 @@ func createOperatorFromDelete(ctx *plancontext.PlanningContext, deleteStmt *sqlp } delClone := sqlparser.Clone(deleteStmt) - var vTbl *vindexes.Table + var vTbl *vindexes.BaseTable op, vTbl = createDeleteOperator(ctx, deleteStmt) if deleteStmt.Comments != nil { @@ -154,7 +154,7 @@ func createDeleteWithInputOp(ctx *plancontext.PlanningContext, del *sqlparser.De } // getFirstVindex returns the first Vindex, if available -func getFirstVindex(vTbl *vindexes.Table) vindexes.Vindex { +func getFirstVindex(vTbl *vindexes.BaseTable) vindexes.Vindex { if len(vTbl.ColumnVindexes) > 0 { return vTbl.ColumnVindexes[0].Vindex } @@ -204,7 +204,7 @@ func createDeleteOpWithTarget(ctx *plancontext.PlanningContext, target semantics } } -func createDeleteOperator(ctx *plancontext.PlanningContext, del *sqlparser.Delete) (Operator, *vindexes.Table) { +func createDeleteOperator(ctx *plancontext.PlanningContext, del *sqlparser.Delete) (Operator, *vindexes.BaseTable) { op := crossJoin(ctx, del.TableExprs) sqc := &SubQueryBuilder{} @@ -310,7 +310,7 @@ func addOrdering(ctx *plancontext.PlanningContext, op Operator, orderBy sqlparse return newOrdering(op, order) } -func updateQueryGraphWithSource(ctx *plancontext.PlanningContext, input Operator, tblID semantics.TableSet, vTbl *vindexes.Table) *vindexes.Table { +func updateQueryGraphWithSource(ctx *plancontext.PlanningContext, input Operator, tblID semantics.TableSet, vTbl *vindexes.BaseTable) *vindexes.BaseTable { sourceTable, _, _, _, _, err := ctx.VSchema.FindTableOrVindex(vTbl.Source.TableName) if err != nil { panic(err) @@ -339,7 +339,7 @@ func updateQueryGraphWithSource(ctx *plancontext.PlanningContext, input Operator return vTbl } -func createFkCascadeOpForDelete(ctx *plancontext.PlanningContext, parentOp Operator, delStmt *sqlparser.Delete, childFks []vindexes.ChildFKInfo, deletedTbl *vindexes.Table) Operator { +func createFkCascadeOpForDelete(ctx *plancontext.PlanningContext, parentOp Operator, delStmt *sqlparser.Delete, childFks []vindexes.ChildFKInfo, deletedTbl *vindexes.BaseTable) Operator { var fkChildren []*FkChild var selectExprs []sqlparser.SelectExpr tblName := delStmt.Targets[0] diff --git a/go/vt/vtgate/planbuilder/operators/dml_planning.go b/go/vt/vtgate/planbuilder/operators/dml_planning.go index 866c308956c..bf8fce7287e 100644 --- a/go/vt/vtgate/planbuilder/operators/dml_planning.go +++ b/go/vt/vtgate/planbuilder/operators/dml_planning.go @@ -35,14 +35,14 @@ type DMLCommon struct { type TargetTable struct { ID semantics.TableSet - VTable *vindexes.Table + VTable *vindexes.BaseTable Name sqlparser.TableName } // dmlOp stores intermediary value for Update/Delete Operator with the vindexes. Table for ordering. type dmlOp struct { op Operator - vTbl *vindexes.Table + vTbl *vindexes.BaseTable cols []*sqlparser.ColName updList updList } @@ -87,7 +87,7 @@ func shortDesc(target TargetTable, ovq *sqlparser.Select) string { // getVindexInformation returns the vindex and VindexPlusPredicates for the DML, // If it cannot find a unique vindex match, it returns an error. -func getVindexInformation(id semantics.TableSet, table *vindexes.Table) *vindexes.ColumnVindex { +func getVindexInformation(id semantics.TableSet, table *vindexes.BaseTable) *vindexes.ColumnVindex { // Check that we have a primary vindex which is valid if len(table.ColumnVindexes) == 0 || !table.ColumnVindexes[0].IsUnique() { panic(vterrors.VT09001(table.Name)) diff --git a/go/vt/vtgate/planbuilder/operators/helpers.go b/go/vt/vtgate/planbuilder/operators/helpers.go index 36b10c96ae1..52c50d15053 100644 --- a/go/vt/vtgate/planbuilder/operators/helpers.go +++ b/go/vt/vtgate/planbuilder/operators/helpers.go @@ -138,7 +138,7 @@ func QualifiedTableNames(ks *vindexes.Keyspace, ts []sqlparser.TableName) []stri return collect() } -func QualifiedTables(ks *vindexes.Keyspace, vts []*vindexes.Table) []string { +func QualifiedTables(ks *vindexes.Keyspace, vts []*vindexes.BaseTable) []string { add, collect := collectSortedUniqueStrings() for _, vt := range vts { add(QualifiedIdentifier(ks, vt.Name)) diff --git a/go/vt/vtgate/planbuilder/operators/insert.go b/go/vt/vtgate/planbuilder/operators/insert.go index ae125dea19c..f6d86d49ca2 100644 --- a/go/vt/vtgate/planbuilder/operators/insert.go +++ b/go/vt/vtgate/planbuilder/operators/insert.go @@ -31,7 +31,7 @@ import ( // Insert represents an insert operation on a table. type Insert struct { // VTable represents the target table for the insert operation. - VTable *vindexes.Table + VTable *vindexes.BaseTable // AST represents the insert statement from the SQL syntax. AST *sqlparser.Insert @@ -146,7 +146,7 @@ func createOperatorFromInsert(ctx *plancontext.PlanningContext, ins *sqlparser.I return &Sequential{Sources: []Operator{delOp, insOp}} } -func checkAndCreateInsertOperator(ctx *plancontext.PlanningContext, ins *sqlparser.Insert, vTbl *vindexes.Table, routing Routing) Operator { +func checkAndCreateInsertOperator(ctx *plancontext.PlanningContext, ins *sqlparser.Insert, vTbl *vindexes.BaseTable, routing Routing) Operator { insOp := createInsertOperator(ctx, ins, vTbl, routing) // Find the foreign key mode and for unmanaged foreign-key-mode, we don't need to do anything. @@ -200,7 +200,7 @@ func getWhereCondExpr(compExprs []*sqlparser.ComparisonExpr) sqlparser.Expr { return outputExpr } -func pkCompExpression(vTbl *vindexes.Table, ins *sqlparser.Insert, rows sqlparser.Values) *sqlparser.ComparisonExpr { +func pkCompExpression(vTbl *vindexes.BaseTable, ins *sqlparser.Insert, rows sqlparser.Values) *sqlparser.ComparisonExpr { if len(vTbl.PrimaryKey) == 0 { return nil } @@ -227,7 +227,7 @@ type pComp struct { col sqlparser.IdentifierCI } -func findPKIndexes(vTbl *vindexes.Table, ins *sqlparser.Insert) (pIndexes []pComp, pColTuple sqlparser.ValTuple) { +func findPKIndexes(vTbl *vindexes.BaseTable, ins *sqlparser.Insert) (pIndexes []pComp, pColTuple sqlparser.ValTuple) { for _, pCol := range vTbl.PrimaryKey { var def sqlparser.Expr idx := ins.Columns.FindColumn(pCol) @@ -244,7 +244,7 @@ func findPKIndexes(vTbl *vindexes.Table, ins *sqlparser.Insert) (pIndexes []pCom return } -func findDefault(vTbl *vindexes.Table, pCol sqlparser.IdentifierCI) sqlparser.Expr { +func findDefault(vTbl *vindexes.BaseTable, pCol sqlparser.IdentifierCI) sqlparser.Expr { for _, column := range vTbl.Columns { if column.Name.Equal(pCol) { return column.Default @@ -258,7 +258,7 @@ type uComp struct { def sqlparser.Expr } -func uniqKeyCompExpressions(vTbl *vindexes.Table, ins *sqlparser.Insert, rows sqlparser.Values) (comps []*sqlparser.ComparisonExpr) { +func uniqKeyCompExpressions(vTbl *vindexes.BaseTable, ins *sqlparser.Insert, rows sqlparser.Values) (comps []*sqlparser.ComparisonExpr) { noOfUniqKeys := len(vTbl.UniqueKeys) if noOfUniqKeys == 0 { return nil @@ -322,7 +322,7 @@ func uniqKeyCompExpressions(vTbl *vindexes.Table, ins *sqlparser.Insert, rows sq return compExprs } -func createUniqueKeyComp(ins *sqlparser.Insert, expr sqlparser.Expr, vTbl *vindexes.Table) ([]uComp, bool) { +func createUniqueKeyComp(ins *sqlparser.Insert, expr sqlparser.Expr, vTbl *vindexes.BaseTable) ([]uComp, bool) { col, isCol := expr.(*sqlparser.ColName) if isCol { var def sqlparser.Expr @@ -357,7 +357,7 @@ func createUniqueKeyComp(ins *sqlparser.Insert, expr sqlparser.Expr, vTbl *vinde return offsets, false } -func createInsertOperator(ctx *plancontext.PlanningContext, insStmt *sqlparser.Insert, vTbl *vindexes.Table, routing Routing) (op Operator) { +func createInsertOperator(ctx *plancontext.PlanningContext, insStmt *sqlparser.Insert, vTbl *vindexes.BaseTable, routing Routing) (op Operator) { if _, target := routing.(*TargetedRouting); target { panic(vterrors.VT09017("INSERT with a target destination is not allowed")) } @@ -595,7 +595,7 @@ func findColumn(ins *sqlparser.Insert, col sqlparser.IdentifierCI) int { return -1 } -func populateInsertColumnlist(ins *sqlparser.Insert, table *vindexes.Table) *sqlparser.Insert { +func populateInsertColumnlist(ins *sqlparser.Insert, table *vindexes.BaseTable) *sqlparser.Insert { cols := make(sqlparser.Columns, 0, len(table.Columns)) for _, c := range table.Columns { cols = append(cols, c.Name) @@ -606,7 +606,7 @@ func populateInsertColumnlist(ins *sqlparser.Insert, table *vindexes.Table) *sql // modifyForAutoinc modifies the AST and the plan to generate necessary autoinc values. // For row values cases, bind variable names are generated using baseName. -func modifyForAutoinc(ctx *plancontext.PlanningContext, ins *sqlparser.Insert, vTable *vindexes.Table) *Generate { +func modifyForAutoinc(ctx *plancontext.PlanningContext, ins *sqlparser.Insert, vTable *vindexes.BaseTable) *Generate { if vTable.AutoIncrement == nil { return nil } diff --git a/go/vt/vtgate/planbuilder/operators/route.go b/go/vt/vtgate/planbuilder/operators/route.go index e398fb05607..904d5085718 100644 --- a/go/vt/vtgate/planbuilder/operators/route.go +++ b/go/vt/vtgate/planbuilder/operators/route.go @@ -365,7 +365,7 @@ func findVSchemaTableAndCreateRoute( ) } -func createTargetedRouting(ctx *plancontext.PlanningContext, target key.Destination, tabletType topodatapb.TabletType, vschemaTable *vindexes.Table) Routing { +func createTargetedRouting(ctx *plancontext.PlanningContext, target key.Destination, tabletType topodatapb.TabletType, vschemaTable *vindexes.BaseTable) Routing { switch ctx.Statement.(type) { case *sqlparser.Update: if tabletType != topodatapb.TabletType_PRIMARY { @@ -401,7 +401,7 @@ func createTargetedRouting(ctx *plancontext.PlanningContext, target key.Destinat func createRouteFromVSchemaTable( ctx *plancontext.PlanningContext, queryTable *QueryTable, - vschemaTable *vindexes.Table, + vschemaTable *vindexes.BaseTable, planAlternates bool, targeted Routing, ) *Route { @@ -457,7 +457,7 @@ func createRouteFromVSchemaTable( return plan } -func createRoutingForVTable(ctx *plancontext.PlanningContext, vschemaTable *vindexes.Table, id semantics.TableSet) Routing { +func createRoutingForVTable(ctx *plancontext.PlanningContext, vschemaTable *vindexes.BaseTable, id semantics.TableSet) Routing { switch { case vschemaTable.Type == vindexes.TypeSequence: return &SequenceRouting{keyspace: vschemaTable.Keyspace} @@ -473,7 +473,7 @@ func createRoutingForVTable(ctx *plancontext.PlanningContext, vschemaTable *vind func createAlternateRoutesFromVSchemaTable( ctx *plancontext.PlanningContext, queryTable *QueryTable, - vschemaTable *vindexes.Table, + vschemaTable *vindexes.BaseTable, ) map[*vindexes.Keyspace]*Route { routes := make(map[*vindexes.Keyspace]*Route) diff --git a/go/vt/vtgate/planbuilder/operators/route_planning.go b/go/vt/vtgate/planbuilder/operators/route_planning.go index 90eb16e1562..b5bcf37c127 100644 --- a/go/vt/vtgate/planbuilder/operators/route_planning.go +++ b/go/vt/vtgate/planbuilder/operators/route_planning.go @@ -82,7 +82,7 @@ func buildVindexTableForDML( table *QueryTable, ins *sqlparser.Insert, dmlType string, -) (*vindexes.Table, Routing) { +) (*vindexes.BaseTable, Routing) { vindexTable := tableInfo.GetVindexTable() if tableInfo.GetVindexTable().Type == vindexes.TypeReference && vindexTable.Source != nil { sourceTable, _, _, _, _, err := ctx.VSchema.FindTableOrVindex(vindexTable.Source.TableName) @@ -179,7 +179,7 @@ func createInfSchemaRoute(ctx *plancontext.PlanningContext, table *QueryTable) O } var src Operator = &Table{ QTable: table, - VTable: &vindexes.Table{ + VTable: &vindexes.BaseTable{ Name: table.Table.Name, Keyspace: ks, }, diff --git a/go/vt/vtgate/planbuilder/operators/sharded_routing.go b/go/vt/vtgate/planbuilder/operators/sharded_routing.go index 2c8873dee07..9ad567c71b1 100644 --- a/go/vt/vtgate/planbuilder/operators/sharded_routing.go +++ b/go/vt/vtgate/planbuilder/operators/sharded_routing.go @@ -51,7 +51,7 @@ type ShardedRouting struct { var _ Routing = (*ShardedRouting)(nil) -func newShardedRouting(ctx *plancontext.PlanningContext, vtable *vindexes.Table, id semantics.TableSet) Routing { +func newShardedRouting(ctx *plancontext.PlanningContext, vtable *vindexes.BaseTable, id semantics.TableSet) Routing { routing := &ShardedRouting{ RouteOpCode: engine.Scatter, keyspace: vtable.Keyspace, diff --git a/go/vt/vtgate/planbuilder/operators/table.go b/go/vt/vtgate/planbuilder/operators/table.go index 4391380480c..473459d6864 100644 --- a/go/vt/vtgate/planbuilder/operators/table.go +++ b/go/vt/vtgate/planbuilder/operators/table.go @@ -30,7 +30,7 @@ import ( type ( Table struct { QTable *QueryTable - VTable *vindexes.Table + VTable *vindexes.BaseTable Columns []*sqlparser.ColName nullaryOperator diff --git a/go/vt/vtgate/planbuilder/operators/update.go b/go/vt/vtgate/planbuilder/operators/update.go index 18a81175f7b..0fa0d10d9c7 100644 --- a/go/vt/vtgate/planbuilder/operators/update.go +++ b/go/vt/vtgate/planbuilder/operators/update.go @@ -543,7 +543,7 @@ func addColumns(ctx *plancontext.PlanningContext, columns sqlparser.Columns, exp // For an update query having non-literal updates, we add the updated expression and a comparison expression to the select query. // For example, for a query like `update fk_table set col = id * 100 + 1` // We would add the expression `id * 100 + 1` and the comparison expression `col <=> id * 100 + 1` to the select query. -func addNonLiteralUpdExprToSelect(ctx *plancontext.PlanningContext, updatedTable *vindexes.Table, updExpr *sqlparser.UpdateExpr, exprs []sqlparser.SelectExpr) (engine.NonLiteralUpdateInfo, []sqlparser.SelectExpr) { +func addNonLiteralUpdExprToSelect(ctx *plancontext.PlanningContext, updatedTable *vindexes.BaseTable, updExpr *sqlparser.UpdateExpr, exprs []sqlparser.SelectExpr) (engine.NonLiteralUpdateInfo, []sqlparser.SelectExpr) { // Create the comparison expression. castedExpr := getCastedUpdateExpression(updatedTable, updExpr) compExpr := sqlparser.NewComparisonExpr(sqlparser.NullSafeEqualOp, updExpr.Name, castedExpr, nil) @@ -572,7 +572,7 @@ func addNonLiteralUpdExprToSelect(ctx *plancontext.PlanningContext, updatedTable return info, exprs } -func getCastedUpdateExpression(updatedTable *vindexes.Table, updExpr *sqlparser.UpdateExpr) sqlparser.Expr { +func getCastedUpdateExpression(updatedTable *vindexes.BaseTable, updExpr *sqlparser.UpdateExpr) sqlparser.Expr { castTypeStr := getCastTypeForColumn(updatedTable, updExpr) if castTypeStr == "" { return updExpr.Expr @@ -585,7 +585,7 @@ func getCastedUpdateExpression(updatedTable *vindexes.Table, updExpr *sqlparser. } } -func getCastTypeForColumn(updatedTable *vindexes.Table, updExpr *sqlparser.UpdateExpr) string { +func getCastTypeForColumn(updatedTable *vindexes.BaseTable, updExpr *sqlparser.UpdateExpr) string { var ty querypb.Type for _, column := range updatedTable.Columns { if updExpr.Name.Name.Equal(column.Name) { @@ -616,7 +616,7 @@ func getCastTypeForColumn(updatedTable *vindexes.Table, updExpr *sqlparser.Updat } // createFkChildForUpdate creates the update query operator for the child table based on the foreign key constraints. -func createFkChildForUpdate(ctx *plancontext.PlanningContext, fk vindexes.ChildFKInfo, selectOffsets []int, nonLiteralUpdateInfo []engine.NonLiteralUpdateInfo, updatedTable *vindexes.Table) *FkChild { +func createFkChildForUpdate(ctx *plancontext.PlanningContext, fk vindexes.ChildFKInfo, selectOffsets []int, nonLiteralUpdateInfo []engine.NonLiteralUpdateInfo, updatedTable *vindexes.BaseTable) *FkChild { // Create a ValTuple of child column names var valTuple sqlparser.ValTuple for _, column := range fk.ChildColumns { @@ -660,7 +660,7 @@ func createFkChildForUpdate(ctx *plancontext.PlanningContext, fk vindexes.ChildF // The query looks like this - // // `UPDATE SET WHERE IN ()` -func buildChildUpdOpForCascade(ctx *plancontext.PlanningContext, fk vindexes.ChildFKInfo, childWhereExpr sqlparser.Expr, nonLiteralUpdateInfo []engine.NonLiteralUpdateInfo, updatedTable *vindexes.Table) Operator { +func buildChildUpdOpForCascade(ctx *plancontext.PlanningContext, fk vindexes.ChildFKInfo, childWhereExpr sqlparser.Expr, nonLiteralUpdateInfo []engine.NonLiteralUpdateInfo, updatedTable *vindexes.BaseTable) Operator { // The update expressions are the same as the update expressions in the parent update query // with the column names replaced with the child column names. var childUpdateExprs sqlparser.UpdateExprs @@ -708,7 +708,7 @@ func buildChildUpdOpForSetNull( fk vindexes.ChildFKInfo, childWhereExpr sqlparser.Expr, nonLiteralUpdateInfo []engine.NonLiteralUpdateInfo, - updatedTable *vindexes.Table, + updatedTable *vindexes.BaseTable, ) Operator { // For the SET NULL type constraint, we need to set all the child columns to NULL. var childUpdateExprs sqlparser.UpdateExprs @@ -769,7 +769,7 @@ func createFKVerifyOp( updStmt *sqlparser.Update, parentFks []vindexes.ParentFKInfo, restrictChildFks []vindexes.ChildFKInfo, - updatedTable *vindexes.Table, + updatedTable *vindexes.BaseTable, ) Operator { if len(parentFks) == 0 && len(restrictChildFks) == 0 { return childOp @@ -811,7 +811,7 @@ func createFKVerifyOp( // where Parent.p1 is null and Parent.p2 is null and Child.id = 1 and Child.c2 + 1 is not null // and Child.c2 is not null and not ((Child.c1) <=> (Child.c2 + 1)) // limit 1 -func createFkVerifyOpForParentFKForUpdate(ctx *plancontext.PlanningContext, updatedTable *vindexes.Table, updStmt *sqlparser.Update, pFK vindexes.ParentFKInfo) Operator { +func createFkVerifyOpForParentFKForUpdate(ctx *plancontext.PlanningContext, updatedTable *vindexes.BaseTable, updStmt *sqlparser.Update, pFK vindexes.ParentFKInfo) Operator { childTblExpr := updStmt.TableExprs[0].(*sqlparser.AliasedTableExpr) childTbl, err := childTblExpr.TableName() if err != nil { @@ -903,14 +903,14 @@ func createFkVerifyOpForParentFKForUpdate(ctx *plancontext.PlanningContext, upda getVerifyLock(updatedTable)) } -func getVerifyLock(vTbl *vindexes.Table) sqlparser.Lock { +func getVerifyLock(vTbl *vindexes.BaseTable) sqlparser.Lock { if len(vTbl.UniqueKeys) > 0 { return sqlparser.ForShareLockNoWait } return sqlparser.ForShareLock } -func getUpdateLock(vTbl *vindexes.Table) sqlparser.Lock { +func getUpdateLock(vTbl *vindexes.BaseTable) sqlparser.Lock { if len(vTbl.UniqueKeys) > 0 { return sqlparser.ForUpdateLockNoWait } @@ -925,7 +925,7 @@ func getUpdateLock(vTbl *vindexes.Table) sqlparser.Lock { // verify query: // select 1 from Child join Parent on Parent.p1 = Child.c1 and Parent.p2 = Child.c2 // where Parent.id = 1 and ((Parent.col + 1) IS NULL OR (child.c1) NOT IN ((Parent.col + 1))) limit 1 -func createFkVerifyOpForChildFKForUpdate(ctx *plancontext.PlanningContext, updatedTable *vindexes.Table, updStmt *sqlparser.Update, cFk vindexes.ChildFKInfo) Operator { +func createFkVerifyOpForChildFKForUpdate(ctx *plancontext.PlanningContext, updatedTable *vindexes.BaseTable, updStmt *sqlparser.Update, cFk vindexes.ChildFKInfo) Operator { // ON UPDATE RESTRICT foreign keys that require validation, should only be allowed in the case where we // are verifying all the FKs on vtgate level. if !ctx.VerifyAllFKs { @@ -992,7 +992,7 @@ func createFkVerifyOpForChildFKForUpdate(ctx *plancontext.PlanningContext, updat // `:v1 IS NULL OR :v2 IS NULL OR (cola, colb) NOT IN ((:v1,:v2))` // So, if either of :v1 or :v2 is NULL, then the entire condition is true (which is the same as not having the condition when :v1 or :v2 is NULL) // This expression is used in cascading SET NULLs and in verifying whether an update should be restricted. -func nullSafeNotInComparison(ctx *plancontext.PlanningContext, updatedTable *vindexes.Table, updateExprs sqlparser.UpdateExprs, cFk vindexes.ChildFKInfo, parentTbl sqlparser.TableName, nonLiteralUpdateInfo []engine.NonLiteralUpdateInfo, appendQualifier bool) sqlparser.Expr { +func nullSafeNotInComparison(ctx *plancontext.PlanningContext, updatedTable *vindexes.BaseTable, updateExprs sqlparser.UpdateExprs, cFk vindexes.ChildFKInfo, parentTbl sqlparser.TableName, nonLiteralUpdateInfo []engine.NonLiteralUpdateInfo, appendQualifier bool) sqlparser.Expr { var valTuple sqlparser.ValTuple var updateValues sqlparser.ValTuple for idx, updateExpr := range updateExprs { @@ -1031,7 +1031,7 @@ func nullSafeNotInComparison(ctx *plancontext.PlanningContext, updatedTable *vin func buildChangedVindexesValues( ctx *plancontext.PlanningContext, update *sqlparser.Update, - table *vindexes.Table, + table *vindexes.BaseTable, ksidCols []sqlparser.IdentifierCI, assignments []SetExpr, ) (changedVindexes map[string]*engine.VindexValues, ovq *sqlparser.Select, subQueriesArgOnChangedVindex []string) { @@ -1076,7 +1076,7 @@ func buildChangedVindexesValues( return changedVindexes, ovq, subQueriesArgOnChangedVindex } -func initialQuery(ksidCols []sqlparser.IdentifierCI, table *vindexes.Table) (sqlparser.SelectExprs, int) { +func initialQuery(ksidCols []sqlparser.IdentifierCI, table *vindexes.BaseTable) (sqlparser.SelectExprs, int) { var selExprs sqlparser.SelectExprs offset := 0 for _, col := range ksidCols { diff --git a/go/vt/vtgate/planbuilder/operators/update_test.go b/go/vt/vtgate/planbuilder/operators/update_test.go index 6cdf7be3f7d..6efe113813c 100644 --- a/go/vt/vtgate/planbuilder/operators/update_test.go +++ b/go/vt/vtgate/planbuilder/operators/update_test.go @@ -125,7 +125,7 @@ func TestGetCastTypeForColumn(t *testing.T) { updExpr := &sqlparser.UpdateExpr{ Name: sqlparser.NewColName("col"), } - updatedTable := &vindexes.Table{ + updatedTable := &vindexes.BaseTable{ Columns: []vindexes.Column{ { Name: sqlparser.NewIdentifierCI("col"), diff --git a/go/vt/vtgate/planbuilder/operators/upsert.go b/go/vt/vtgate/planbuilder/operators/upsert.go index bfe2a1cbc52..90cee8a5607 100644 --- a/go/vt/vtgate/planbuilder/operators/upsert.go +++ b/go/vt/vtgate/planbuilder/operators/upsert.go @@ -74,7 +74,7 @@ func (u *Upsert) GetOrdering(ctx *plancontext.PlanningContext) []OrderBy { return nil } -func createUpsertOperator(ctx *plancontext.PlanningContext, ins *sqlparser.Insert, insOp Operator, rows sqlparser.Values, vTbl *vindexes.Table) Operator { +func createUpsertOperator(ctx *plancontext.PlanningContext, ins *sqlparser.Insert, insOp Operator, rows sqlparser.Values, vTbl *vindexes.BaseTable) Operator { if len(vTbl.UniqueKeys) != 0 { panic(vterrors.VT12001("ON DUPLICATE KEY UPDATE with foreign keys with unique keys")) } diff --git a/go/vt/vtgate/planbuilder/operators/vindex.go b/go/vt/vtgate/planbuilder/operators/vindex.go index 30f13701df6..cb0719b815f 100644 --- a/go/vt/vtgate/planbuilder/operators/vindex.go +++ b/go/vt/vtgate/planbuilder/operators/vindex.go @@ -44,7 +44,7 @@ type ( Alias *sqlparser.AliasedTableExpr Table sqlparser.TableName Predicates []sqlparser.Expr - VTable *vindexes.Table + VTable *vindexes.BaseTable } ) diff --git a/go/vt/vtgate/planbuilder/plancontext/planning_context_test.go b/go/vt/vtgate/planbuilder/plancontext/planning_context_test.go index 2844f7e87dc..b13c2112e3a 100644 --- a/go/vt/vtgate/planbuilder/plancontext/planning_context_test.go +++ b/go/vt/vtgate/planbuilder/plancontext/planning_context_test.go @@ -191,7 +191,7 @@ func (v *vschema) FindViewTarget(name sqlparser.TableName) (*vindexes.Keyspace, panic("implement me") } -func (v *vschema) FindTable(tablename sqlparser.TableName) (*vindexes.Table, string, topodatapb.TabletType, key.Destination, error) { +func (v *vschema) FindTable(tablename sqlparser.TableName) (*vindexes.BaseTable, string, topodatapb.TabletType, key.Destination, error) { // TODO implement me panic("implement me") } @@ -201,7 +201,7 @@ func (v *vschema) FindView(name sqlparser.TableName) sqlparser.TableStatement { panic("implement me") } -func (v *vschema) FindTableOrVindex(tablename sqlparser.TableName) (*vindexes.Table, vindexes.Vindex, string, topodatapb.TabletType, key.Destination, error) { +func (v *vschema) FindTableOrVindex(tablename sqlparser.TableName) (*vindexes.BaseTable, vindexes.Vindex, string, topodatapb.TabletType, key.Destination, error) { // TODO implement me panic("implement me") } diff --git a/go/vt/vtgate/planbuilder/plancontext/vschema.go b/go/vt/vtgate/planbuilder/plancontext/vschema.go index c810324f369..1b86225382c 100644 --- a/go/vt/vtgate/planbuilder/plancontext/vschema.go +++ b/go/vt/vtgate/planbuilder/plancontext/vschema.go @@ -24,11 +24,11 @@ type PlannerVersion = querypb.ExecuteOptions_PlannerVersion // VSchema defines the interface for this package to fetch // info about tables. type VSchema interface { - FindTable(tablename sqlparser.TableName) (*vindexes.Table, string, topodatapb.TabletType, key.Destination, error) + FindTable(tablename sqlparser.TableName) (*vindexes.BaseTable, string, topodatapb.TabletType, key.Destination, error) FindView(name sqlparser.TableName) sqlparser.TableStatement // FindViewTarget finds the target keyspace for the view table provided. FindViewTarget(name sqlparser.TableName) (*vindexes.Keyspace, error) - FindTableOrVindex(tablename sqlparser.TableName) (*vindexes.Table, vindexes.Vindex, string, topodatapb.TabletType, key.Destination, error) + FindTableOrVindex(tablename sqlparser.TableName) (*vindexes.BaseTable, vindexes.Vindex, string, topodatapb.TabletType, key.Destination, error) // SelectedKeyspace returns the current keyspace if set, otherwise returns an error SelectedKeyspace() (*vindexes.Keyspace, error) diff --git a/go/vt/vtgate/planbuilder/planner_test.go b/go/vt/vtgate/planbuilder/planner_test.go index c3caf9f3536..bd4c520510c 100644 --- a/go/vt/vtgate/planbuilder/planner_test.go +++ b/go/vt/vtgate/planbuilder/planner_test.go @@ -63,7 +63,7 @@ func TestBindingSubquery(t *testing.T) { require.NoError(t, err) selStmt := parse.(*sqlparser.Select) semTable, err := semantics.Analyze(selStmt, "d", &semantics.FakeSI{ - Tables: map[string]*vindexes.Table{ + Tables: map[string]*vindexes.BaseTable{ "tabl": {Name: sqlparser.NewIdentifierCS("tabl")}, "foo": {Name: sqlparser.NewIdentifierCS("foo")}, }, diff --git a/go/vt/vtgate/planbuilder/update.go b/go/vt/vtgate/planbuilder/update.go index d653df867fb..fb3fd08ecb5 100644 --- a/go/vt/vtgate/planbuilder/update.go +++ b/go/vt/vtgate/planbuilder/update.go @@ -82,7 +82,7 @@ func gen4UpdateStmtPlanner( return newPlanResult(plan, operators.TablesUsed(op)...), nil } -func updateUnshardedShortcut(stmt *sqlparser.Update, ks *vindexes.Keyspace, tables []*vindexes.Table) engine.Primitive { +func updateUnshardedShortcut(stmt *sqlparser.Update, ks *vindexes.Keyspace, tables []*vindexes.BaseTable) engine.Primitive { edml := engine.NewDML() edml.Keyspace = ks edml.Opcode = engine.Unsharded diff --git a/go/vt/vtgate/planbuilder/vexplain.go b/go/vt/vtgate/planbuilder/vexplain.go index a12139c3068..061fa85473d 100644 --- a/go/vt/vtgate/planbuilder/vexplain.go +++ b/go/vt/vtgate/planbuilder/vexplain.go @@ -64,7 +64,7 @@ func explainTabPlan(explain *sqlparser.ExplainTab, vschema plancontext.VSchema) return nil, err } } else { - var tbl *vindexes.Table + var tbl *vindexes.BaseTable var err error tbl, _, _, _, dest, err = vschema.FindTableOrVindex(explain.Table) if err != nil { diff --git a/go/vt/vtgate/schema/tracker.go b/go/vt/vtgate/schema/tracker.go index 4dae11cded9..a425efa68fb 100644 --- a/go/vt/vtgate/schema/tracker.go +++ b/go/vt/vtgate/schema/tracker.go @@ -545,6 +545,7 @@ func (vm *viewMap) set(ks, tbl, sql string) { log.Warningf("ignoring view '%s', view definition is not a create view query: %T", tbl, stmt) return } + sqlparser.AddKeyspace(cv.Select, ks) m[tbl] = cv.Select } diff --git a/go/vt/vtgate/schema/tracker_test.go b/go/vt/vtgate/schema/tracker_test.go index e5280c78ed8..0cdde88b471 100644 --- a/go/vt/vtgate/schema/tracker_test.go +++ b/go/vt/vtgate/schema/tracker_test.go @@ -27,7 +27,6 @@ import ( "github.com/stretchr/testify/require" "vitess.io/vitess/go/sqltypes" - "vitess.io/vitess/go/test/utils" "vitess.io/vitess/go/vt/discovery" "vitess.io/vitess/go/vt/log" @@ -271,37 +270,37 @@ func TestViewsTracking(t *testing.T) { testcases := []testCases{{ testName: "initial view load", expView: map[string]string{ - "prior": "select 1 from tbl"}, + "prior": "select 1 from ks.tbl"}, }, { testName: "new view t1, V1", updView: []string{"t1", "V1"}, expView: map[string]string{ - "t1": "select 1 from tbl1", - "V1": "select 1 from tbl2", - "prior": "select 1 from tbl"}, + "t1": "select 1 from ks.tbl1", + "V1": "select 1 from ks.tbl2", + "prior": "select 1 from ks.tbl"}, }, { testName: "delete prior, updated V1 and new t3", updView: []string{"prior", "V1", "t3"}, expView: map[string]string{ - "t1": "select 1 from tbl1", - "V1": "select 1, 2 from tbl2", - "t3": "select 1 from tbl3"}, + "t1": "select 1 from ks.tbl1", + "V1": "select 1, 2 from ks.tbl2", + "t3": "select 1 from ks.tbl3"}, }, { testName: "new t4", updView: []string{"t4"}, expView: map[string]string{ - "t1": "select 1 from tbl1", - "V1": "select 1, 2 from tbl2", - "t3": "select 1 from tbl3", - "t4": "select 1 from tbl4"}, + "t1": "select 1 from ks.tbl1", + "V1": "select 1, 2 from ks.tbl2", + "t3": "select 1 from ks.tbl3", + "t4": "select 1 from ks.tbl4"}, }, { testName: "new broken t5", updView: []string{"t5"}, expView: map[string]string{ - "t1": "select 1 from tbl1", - "V1": "select 1, 2 from tbl2", - "t3": "select 1 from tbl3", - "t4": "select 1 from tbl4"}, + "t1": "select 1 from ks.tbl1", + "V1": "select 1, 2 from ks.tbl2", + "t3": "select 1 from ks.tbl3", + "t4": "select 1 from ks.tbl4"}, }} testTracker(t, false, schemaDefResult, testcases) diff --git a/go/vt/vtgate/semantics/FakeSI.go b/go/vt/vtgate/semantics/FakeSI.go index cb1b9cec094..8e24a029002 100644 --- a/go/vt/vtgate/semantics/FakeSI.go +++ b/go/vt/vtgate/semantics/FakeSI.go @@ -32,7 +32,7 @@ var _ SchemaInformation = (*FakeSI)(nil) // FakeSI is a fake SchemaInformation for testing type FakeSI struct { - Tables map[string]*vindexes.Table + Tables map[string]*vindexes.BaseTable VindexTables map[string]vindexes.Vindex KsForeignKeyMode map[string]vschemapb.Keyspace_ForeignKeyMode KsError map[string]error @@ -40,7 +40,7 @@ type FakeSI struct { } // FindTableOrVindex implements the SchemaInformation interface -func (s *FakeSI) FindTableOrVindex(tablename sqlparser.TableName) (*vindexes.Table, vindexes.Vindex, string, topodatapb.TabletType, key.Destination, error) { +func (s *FakeSI) FindTableOrVindex(tablename sqlparser.TableName) (*vindexes.BaseTable, vindexes.Vindex, string, topodatapb.TabletType, key.Destination, error) { table, ok := s.Tables[sqlparser.String(tablename)] if ok { return table, nil, "", 0, nil, nil diff --git a/go/vt/vtgate/semantics/analyzer_test.go b/go/vt/vtgate/semantics/analyzer_test.go index 3f7a21cb6ac..c7f24e6c73c 100644 --- a/go/vt/vtgate/semantics/analyzer_test.go +++ b/go/vt/vtgate/semantics/analyzer_test.go @@ -143,7 +143,7 @@ func TestBindingSingleAliasedTableNegative(t *testing.T) { parse, err := sqlparser.NewTestParser().Parse(query) require.NoError(t, err) st, err := Analyze(parse, "", &FakeSI{ - Tables: map[string]*vindexes.Table{ + Tables: map[string]*vindexes.BaseTable{ "t": {Name: sqlparser.NewIdentifierCS("t")}, }, }) @@ -294,7 +294,7 @@ func TestBindingMultiTableNegative(t *testing.T) { parse, err := sqlparser.NewTestParser().Parse(query) require.NoError(t, err) _, err = Analyze(parse, "d", &FakeSI{ - Tables: map[string]*vindexes.Table{ + Tables: map[string]*vindexes.BaseTable{ "tabl": {Name: sqlparser.NewIdentifierCS("tabl")}, "foo": {Name: sqlparser.NewIdentifierCS("foo")}, }, @@ -318,7 +318,7 @@ func TestBindingMultiAliasedTableNegative(t *testing.T) { parse, err := sqlparser.NewTestParser().Parse(query) require.NoError(t, err) _, err = Analyze(parse, "d", &FakeSI{ - Tables: map[string]*vindexes.Table{ + Tables: map[string]*vindexes.BaseTable{ "tabl": {Name: sqlparser.NewIdentifierCS("tabl")}, "foo": {Name: sqlparser.NewIdentifierCS("foo")}, }, @@ -383,7 +383,7 @@ func TestMissingTable(t *testing.T) { } func TestUnknownColumnMap2(t *testing.T) { - authoritativeTblA := vindexes.Table{ + authoritativeTblA := vindexes.BaseTable{ Name: sqlparser.NewIdentifierCS("a"), Columns: []vindexes.Column{{ Name: sqlparser.NewIdentifierCI("col2"), @@ -391,7 +391,7 @@ func TestUnknownColumnMap2(t *testing.T) { }}, ColumnListAuthoritative: true, } - authoritativeTblB := vindexes.Table{ + authoritativeTblB := vindexes.BaseTable{ Name: sqlparser.NewIdentifierCS("b"), Columns: []vindexes.Column{{ Name: sqlparser.NewIdentifierCI("col"), @@ -403,7 +403,7 @@ func TestUnknownColumnMap2(t *testing.T) { nonAuthoritativeTblA.ColumnListAuthoritative = false nonAuthoritativeTblB := authoritativeTblB nonAuthoritativeTblB.ColumnListAuthoritative = false - authoritativeTblAWithConflict := vindexes.Table{ + authoritativeTblAWithConflict := vindexes.BaseTable{ Name: sqlparser.NewIdentifierCS("a"), Columns: []vindexes.Column{{ Name: sqlparser.NewIdentifierCI("col"), @@ -411,7 +411,7 @@ func TestUnknownColumnMap2(t *testing.T) { }}, ColumnListAuthoritative: true, } - authoritativeTblBWithInt := vindexes.Table{ + authoritativeTblBWithInt := vindexes.BaseTable{ Name: sqlparser.NewIdentifierCS("b"), Columns: []vindexes.Column{{ Name: sqlparser.NewIdentifierCI("col"), @@ -422,40 +422,40 @@ func TestUnknownColumnMap2(t *testing.T) { tests := []struct { name string - schema map[string]*vindexes.Table + schema map[string]*vindexes.BaseTable err bool typ querypb.Type }{{ name: "no info about tables", - schema: map[string]*vindexes.Table{"a": {}, "b": {}}, + schema: map[string]*vindexes.BaseTable{"a": {}, "b": {}}, err: true, }, { name: "non authoritative columns", - schema: map[string]*vindexes.Table{"a": &nonAuthoritativeTblA, "b": &nonAuthoritativeTblA}, + schema: map[string]*vindexes.BaseTable{"a": &nonAuthoritativeTblA, "b": &nonAuthoritativeTblA}, err: true, }, { name: "non authoritative columns - one authoritative and one not", - schema: map[string]*vindexes.Table{"a": &nonAuthoritativeTblA, "b": &authoritativeTblB}, + schema: map[string]*vindexes.BaseTable{"a": &nonAuthoritativeTblA, "b": &authoritativeTblB}, err: false, typ: sqltypes.VarChar, }, { name: "non authoritative columns - one authoritative and one not", - schema: map[string]*vindexes.Table{"a": &authoritativeTblA, "b": &nonAuthoritativeTblB}, + schema: map[string]*vindexes.BaseTable{"a": &authoritativeTblA, "b": &nonAuthoritativeTblB}, err: false, typ: sqltypes.VarChar, }, { name: "authoritative columns", - schema: map[string]*vindexes.Table{"a": &authoritativeTblA, "b": &authoritativeTblB}, + schema: map[string]*vindexes.BaseTable{"a": &authoritativeTblA, "b": &authoritativeTblB}, err: false, typ: sqltypes.VarChar, }, { name: "authoritative columns", - schema: map[string]*vindexes.Table{"a": &authoritativeTblA, "b": &authoritativeTblBWithInt}, + schema: map[string]*vindexes.BaseTable{"a": &authoritativeTblA, "b": &authoritativeTblBWithInt}, err: false, typ: sqltypes.Int64, }, { name: "authoritative columns with overlap", - schema: map[string]*vindexes.Table{"a": &authoritativeTblAWithConflict, "b": &authoritativeTblB}, + schema: map[string]*vindexes.BaseTable{"a": &authoritativeTblAWithConflict, "b": &authoritativeTblB}, err: true, }} @@ -486,10 +486,10 @@ func TestUnknownColumnMap2(t *testing.T) { func TestUnknownPredicate(t *testing.T) { query := "select 1 from a, b where col = 1" - authoritativeTblA := &vindexes.Table{ + authoritativeTblA := &vindexes.BaseTable{ Name: sqlparser.NewIdentifierCS("a"), } - authoritativeTblB := &vindexes.Table{ + authoritativeTblB := &vindexes.BaseTable{ Name: sqlparser.NewIdentifierCS("b"), } @@ -497,12 +497,12 @@ func TestUnknownPredicate(t *testing.T) { tests := []struct { name string - schema map[string]*vindexes.Table + schema map[string]*vindexes.BaseTable err bool }{ { name: "no info about tables", - schema: map[string]*vindexes.Table{"a": authoritativeTblA, "b": authoritativeTblB}, + schema: map[string]*vindexes.BaseTable{"a": authoritativeTblA, "b": authoritativeTblB}, err: false, }, } @@ -534,7 +534,7 @@ func TestScoping(t *testing.T) { parse, err := sqlparser.NewTestParser().Parse(query.query) require.NoError(t, err) st, err := Analyze(parse, "user", &FakeSI{ - Tables: map[string]*vindexes.Table{ + Tables: map[string]*vindexes.BaseTable{ "t": {Name: sqlparser.NewIdentifierCS("t")}, }, }) @@ -1103,7 +1103,7 @@ func TestScopingWithWITH(t *testing.T) { parse, err := sqlparser.NewTestParser().Parse(query.query) require.NoError(t, err) st, err := Analyze(parse, "user", &FakeSI{ - Tables: map[string]*vindexes.Table{ + Tables: map[string]*vindexes.BaseTable{ "t": {Name: sqlparser.NewIdentifierCS("t")}, }, }) @@ -1188,7 +1188,7 @@ func TestScopingWVindexTables(t *testing.T) { require.NoError(t, err) hash, _ := vindexes.CreateVindex("hash", "user_index", nil) st, err := Analyze(parse, "user", &FakeSI{ - Tables: map[string]*vindexes.Table{ + Tables: map[string]*vindexes.BaseTable{ "t": {Name: sqlparser.NewIdentifierCS("t")}, }, VindexTables: map[string]vindexes.Vindex{ @@ -1451,7 +1451,7 @@ func TestScopingSubQueryJoinClause(t *testing.T) { require.NoError(t, err) st, err := Analyze(parse, "user", &FakeSI{ - Tables: map[string]*vindexes.Table{ + Tables: map[string]*vindexes.BaseTable{ "t": {Name: sqlparser.NewIdentifierCS("t")}, }, }) @@ -1481,7 +1481,7 @@ var ks3 = &vindexes.Keyspace{ // create table t2(uid bigint, name varchar(255)) func fakeSchemaInfo() *FakeSI { si := &FakeSI{ - Tables: map[string]*vindexes.Table{ + Tables: map[string]*vindexes.BaseTable{ "t": tableT(), "t1": tableT1(), "t2": tableT2(), @@ -1491,14 +1491,14 @@ func fakeSchemaInfo() *FakeSI { return si } -func tableT() *vindexes.Table { - return &vindexes.Table{ +func tableT() *vindexes.BaseTable { + return &vindexes.BaseTable{ Name: sqlparser.NewIdentifierCS("t"), Keyspace: unsharded, } } -func tableT1() *vindexes.Table { - return &vindexes.Table{ +func tableT1() *vindexes.BaseTable { + return &vindexes.BaseTable{ Name: sqlparser.NewIdentifierCS("t1"), Columns: []vindexes.Column{{ Name: sqlparser.NewIdentifierCI("id"), @@ -1511,8 +1511,8 @@ func tableT1() *vindexes.Table { Keyspace: ks2, } } -func tableT2() *vindexes.Table { - return &vindexes.Table{ +func tableT2() *vindexes.BaseTable { + return &vindexes.BaseTable{ Name: sqlparser.NewIdentifierCS("t2"), Columns: []vindexes.Column{{ Name: sqlparser.NewIdentifierCI("uid"), @@ -1531,8 +1531,8 @@ func tableT2() *vindexes.Table { } } -func tableT3() *vindexes.Table { - return &vindexes.Table{ +func tableT3() *vindexes.BaseTable { + return &vindexes.BaseTable{ Name: sqlparser.NewIdentifierCS("t3"), Columns: []vindexes.Column{{ Name: sqlparser.NewIdentifierCI("uid"), diff --git a/go/vt/vtgate/semantics/cte_table.go b/go/vt/vtgate/semantics/cte_table.go index 7083fea10d2..30cee8061d1 100644 --- a/go/vt/vtgate/semantics/cte_table.go +++ b/go/vt/vtgate/semantics/cte_table.go @@ -67,7 +67,7 @@ func (cte *CTETable) Name() (sqlparser.TableName, error) { return sqlparser.NewTableName(cte.TableName), nil } -func (cte *CTETable) GetVindexTable() *vindexes.Table { +func (cte *CTETable) GetVindexTable() *vindexes.BaseTable { return nil } diff --git a/go/vt/vtgate/semantics/derived_table.go b/go/vt/vtgate/semantics/derived_table.go index fc7e1cb391c..676679d2fa9 100644 --- a/go/vt/vtgate/semantics/derived_table.go +++ b/go/vt/vtgate/semantics/derived_table.go @@ -150,7 +150,7 @@ func (dt *DerivedTable) canShortCut() shortCut { } // GetVindexTable implements the TableInfo interface -func (dt *DerivedTable) GetVindexTable() *vindexes.Table { +func (dt *DerivedTable) GetVindexTable() *vindexes.BaseTable { return nil } diff --git a/go/vt/vtgate/semantics/derived_test.go b/go/vt/vtgate/semantics/derived_test.go index 8344fd1e261..3788baeae9a 100644 --- a/go/vt/vtgate/semantics/derived_test.go +++ b/go/vt/vtgate/semantics/derived_test.go @@ -113,7 +113,7 @@ func TestScopingWDerivedTables(t *testing.T) { parse, err := sqlparser.NewTestParser().Parse(query.query) require.NoError(t, err) st, err := Analyze(parse, "user", &FakeSI{ - Tables: map[string]*vindexes.Table{ + Tables: map[string]*vindexes.BaseTable{ "t": {Name: sqlparser.NewIdentifierCS("t"), Keyspace: ks2}, }, }) @@ -175,7 +175,7 @@ func TestDerivedTablesOrderClause(t *testing.T) { recursiveExpectation: TS0, expectation: TS1, }} - si := &FakeSI{Tables: map[string]*vindexes.Table{"t": {Name: sqlparser.NewIdentifierCS("t")}}} + si := &FakeSI{Tables: map[string]*vindexes.BaseTable{"t": {Name: sqlparser.NewIdentifierCS("t")}}} for _, query := range queries { t.Run(query.query, func(t *testing.T) { parse, err := sqlparser.NewTestParser().Parse(query.query) @@ -215,7 +215,7 @@ func TestScopingWComplexDerivedTables(t *testing.T) { parse, err := sqlparser.NewTestParser().Parse(query.query) require.NoError(t, err) st, err := Analyze(parse, "user", &FakeSI{ - Tables: map[string]*vindexes.Table{ + Tables: map[string]*vindexes.BaseTable{ "t": {Name: sqlparser.NewIdentifierCS("t")}, }, }) diff --git a/go/vt/vtgate/semantics/early_rewriter_test.go b/go/vt/vtgate/semantics/early_rewriter_test.go index 1ec7786a46c..29da6ab51ee 100644 --- a/go/vt/vtgate/semantics/early_rewriter_test.go +++ b/go/vt/vtgate/semantics/early_rewriter_test.go @@ -35,7 +35,7 @@ func TestExpandStar(t *testing.T) { Sharded: true, } schemaInfo := &FakeSI{ - Tables: map[string]*vindexes.Table{ + Tables: map[string]*vindexes.BaseTable{ "t1": { Keyspace: ks, Name: sqlparser.NewIdentifierCS("t1"), @@ -226,7 +226,7 @@ func assertExpandedColumns(t *testing.T, st *SemTable, expandedColumns string) { func TestRewriteJoinUsingColumns(t *testing.T) { schemaInfo := &FakeSI{ - Tables: map[string]*vindexes.Table{ + Tables: map[string]*vindexes.BaseTable{ "t1": { Name: sqlparser.NewIdentifierCS("t1"), Columns: []vindexes.Column{{ @@ -309,7 +309,7 @@ func TestRewriteJoinUsingColumns(t *testing.T) { func TestGroupByColumnName(t *testing.T) { schemaInfo := &FakeSI{ - Tables: map[string]*vindexes.Table{ + Tables: map[string]*vindexes.BaseTable{ "t1": { Name: sqlparser.NewIdentifierCS("t1"), Columns: []vindexes.Column{{ @@ -393,7 +393,7 @@ func TestGroupByColumnName(t *testing.T) { func TestGroupByLiteral(t *testing.T) { schemaInfo := &FakeSI{ - Tables: map[string]*vindexes.Table{}, + Tables: map[string]*vindexes.BaseTable{}, } cDB := "db" tcases := []struct { @@ -437,7 +437,7 @@ func TestGroupByLiteral(t *testing.T) { func TestOrderByLiteral(t *testing.T) { schemaInfo := &FakeSI{ - Tables: map[string]*vindexes.Table{}, + Tables: map[string]*vindexes.BaseTable{}, } cDB := "db" tcases := []struct { @@ -620,7 +620,7 @@ func TestHavingColumnName(t *testing.T) { func getSchemaWithKnownColumns() *FakeSI { schemaInfo := &FakeSI{ - Tables: map[string]*vindexes.Table{ + Tables: map[string]*vindexes.BaseTable{ "t1": { Keyspace: &vindexes.Keyspace{Name: "ks", Sharded: true}, Name: sqlparser.NewIdentifierCS("t1"), @@ -753,7 +753,7 @@ func TestOrderByColumnName(t *testing.T) { } func TestSemTableDependenciesAfterExpandStar(t *testing.T) { - schemaInfo := &FakeSI{Tables: map[string]*vindexes.Table{ + schemaInfo := &FakeSI{Tables: map[string]*vindexes.BaseTable{ "t1": { Name: sqlparser.NewIdentifierCS("t1"), Columns: []vindexes.Column{{ @@ -812,7 +812,7 @@ func TestRewriteNot(t *testing.T) { Sharded: true, } schemaInfo := &FakeSI{ - Tables: map[string]*vindexes.Table{ + Tables: map[string]*vindexes.BaseTable{ "t1": { Keyspace: ks, Name: sqlparser.NewIdentifierCS("t1"), @@ -866,7 +866,7 @@ func TestOrderByDerivedTable(t *testing.T) { Sharded: true, } schemaInfo := &FakeSI{ - Tables: map[string]*vindexes.Table{ + Tables: map[string]*vindexes.BaseTable{ "t1": { Keyspace: ks, Name: sqlparser.NewIdentifierCS("t1"), diff --git a/go/vt/vtgate/semantics/foreign_keys_test.go b/go/vt/vtgate/semantics/foreign_keys_test.go index a46c67c9710..e59f06fb435 100644 --- a/go/vt/vtgate/semantics/foreign_keys_test.go +++ b/go/vt/vtgate/semantics/foreign_keys_test.go @@ -27,7 +27,7 @@ import ( "vitess.io/vitess/go/vt/vtgate/vindexes" ) -var parentTbl = &vindexes.Table{ +var parentTbl = &vindexes.BaseTable{ Name: sqlparser.NewIdentifierCS("parentt"), Keyspace: &vindexes.Keyspace{ Name: "ks", @@ -36,7 +36,7 @@ var parentTbl = &vindexes.Table{ var tbl = map[string]TableInfo{ "t0": &RealTable{ - Table: &vindexes.Table{ + Table: &vindexes.BaseTable{ Name: sqlparser.NewIdentifierCS("t0"), Keyspace: &vindexes.Keyspace{Name: "ks"}, ChildForeignKeys: []vindexes.ChildFKInfo{ @@ -50,7 +50,7 @@ var tbl = map[string]TableInfo{ }, }, "t1": &RealTable{ - Table: &vindexes.Table{ + Table: &vindexes.BaseTable{ Name: sqlparser.NewIdentifierCS("t1"), Keyspace: &vindexes.Keyspace{Name: "ks_unmanaged", Sharded: true}, ChildForeignKeys: []vindexes.ChildFKInfo{ @@ -60,19 +60,19 @@ var tbl = map[string]TableInfo{ }, }, "t2": &RealTable{ - Table: &vindexes.Table{ + Table: &vindexes.BaseTable{ Name: sqlparser.NewIdentifierCS("t2"), Keyspace: &vindexes.Keyspace{Name: "ks"}, }, }, "t3": &RealTable{ - Table: &vindexes.Table{ + Table: &vindexes.BaseTable{ Name: sqlparser.NewIdentifierCS("t3"), Keyspace: &vindexes.Keyspace{Name: "undefined_ks", Sharded: true}, }, }, "t4": &RealTable{ - Table: &vindexes.Table{ + Table: &vindexes.BaseTable{ Name: sqlparser.NewIdentifierCS("t4"), Keyspace: &vindexes.Keyspace{Name: "ks"}, ChildForeignKeys: []vindexes.ChildFKInfo{ @@ -92,7 +92,7 @@ var tbl = map[string]TableInfo{ }, }, "t5": &RealTable{ - Table: &vindexes.Table{ + Table: &vindexes.BaseTable{ Name: sqlparser.NewIdentifierCS("t5"), Keyspace: &vindexes.Keyspace{Name: "ks"}, ChildForeignKeys: []vindexes.ChildFKInfo{ @@ -110,7 +110,7 @@ var tbl = map[string]TableInfo{ }, }, "t6": &RealTable{ - Table: &vindexes.Table{ + Table: &vindexes.BaseTable{ Name: sqlparser.NewIdentifierCS("t6"), Keyspace: &vindexes.Keyspace{Name: "ks"}, ChildForeignKeys: []vindexes.ChildFKInfo{ @@ -552,7 +552,7 @@ func TestGetInvolvedForeignKeys(t *testing.T) { } } -func ckInfo(cTable *vindexes.Table, pCols []string, cCols []string, refAction sqlparser.ReferenceAction) vindexes.ChildFKInfo { +func ckInfo(cTable *vindexes.BaseTable, pCols []string, cCols []string, refAction sqlparser.ReferenceAction) vindexes.ChildFKInfo { return vindexes.ChildFKInfo{ Table: cTable, ParentColumns: sqlparser.MakeColumns(pCols...), @@ -561,7 +561,7 @@ func ckInfo(cTable *vindexes.Table, pCols []string, cCols []string, refAction sq } } -func pkInfo(parentTable *vindexes.Table, pCols []string, cCols []string) vindexes.ParentFKInfo { +func pkInfo(parentTable *vindexes.BaseTable, pCols []string, cCols []string) vindexes.ParentFKInfo { return vindexes.ParentFKInfo{ Table: parentTable, ParentColumns: sqlparser.MakeColumns(pCols...), diff --git a/go/vt/vtgate/semantics/info_schema.go b/go/vt/vtgate/semantics/info_schema.go index b33a20620e4..c15056ce033 100644 --- a/go/vt/vtgate/semantics/info_schema.go +++ b/go/vt/vtgate/semantics/info_schema.go @@ -1627,7 +1627,7 @@ func loadSchemaInfo(version string) map[string][]vindexes.Column { } // FindTableOrVindex implements the SchemaInformation interface -func (i *infoSchemaWithColumns) FindTableOrVindex(tbl sqlparser.TableName) (*vindexes.Table, vindexes.Vindex, string, topodatapb.TabletType, key.Destination, error) { +func (i *infoSchemaWithColumns) FindTableOrVindex(tbl sqlparser.TableName) (*vindexes.BaseTable, vindexes.Vindex, string, topodatapb.TabletType, key.Destination, error) { if !strings.EqualFold(tbl.Qualifier.String(), "information_schema") { return i.inner.FindTableOrVindex(tbl) } @@ -1636,7 +1636,7 @@ func (i *infoSchemaWithColumns) FindTableOrVindex(tbl sqlparser.TableName) (*vin if !found { return nil, nil, "", topodatapb.TabletType_UNKNOWN, nil, vindexes.NotFoundError{TableName: tbl.Name.String()} } - vtbl := &vindexes.Table{ + vtbl := &vindexes.BaseTable{ Type: "View", Name: sqlparser.NewIdentifierCS(tbl.Name.String()), Columns: cols, diff --git a/go/vt/vtgate/semantics/real_table.go b/go/vt/vtgate/semantics/real_table.go index 64f3ac5f3f0..55dd25a5064 100644 --- a/go/vt/vtgate/semantics/real_table.go +++ b/go/vt/vtgate/semantics/real_table.go @@ -32,7 +32,7 @@ import ( type RealTable struct { dbName, tableName string ASTNode *sqlparser.AliasedTableExpr - Table *vindexes.Table + Table *vindexes.BaseTable CTE *CTE VindexHint *sqlparser.IndexHint MirrorRule *vindexes.MirrorRule @@ -207,7 +207,7 @@ func (r *RealTable) canShortCut() shortCut { } // GetVindexTable implements the TableInfo interface -func (r *RealTable) GetVindexTable() *vindexes.Table { +func (r *RealTable) GetVindexTable() *vindexes.BaseTable { return r.Table } diff --git a/go/vt/vtgate/semantics/semantic_table.go b/go/vt/vtgate/semantics/semantic_table.go index e3eead71c90..0227ee04137 100644 --- a/go/vt/vtgate/semantics/semantic_table.go +++ b/go/vt/vtgate/semantics/semantic_table.go @@ -39,7 +39,7 @@ type ( Name() (sqlparser.TableName, error) // GetVindexTable returns the vschema version of this TableInfo - GetVindexTable() *vindexes.Table + GetVindexTable() *vindexes.BaseTable // IsInfSchema returns true if this table is information_schema IsInfSchema() bool @@ -165,7 +165,7 @@ type ( // SchemaInformation is used to provide table information from Vschema. SchemaInformation interface { - FindTableOrVindex(tablename sqlparser.TableName) (*vindexes.Table, vindexes.Vindex, string, topodatapb.TabletType, key.Destination, error) + FindTableOrVindex(tablename sqlparser.TableName) (*vindexes.BaseTable, vindexes.Vindex, string, topodatapb.TabletType, key.Destination, error) ConnCollation() collations.ID Environment() *vtenv.Environment // ForeignKeyMode returns the foreign_key flag value @@ -436,7 +436,7 @@ func (st *SemTable) HasNonLiteralForeignKeyUpdate(updExprs sqlparser.UpdateExprs } // isShardScoped checks if the foreign key constraint is shard-scoped or not. It uses the vindex information to make this call. -func isShardScoped(pTable *vindexes.Table, cTable *vindexes.Table, pCols sqlparser.Columns, cCols sqlparser.Columns) bool { +func isShardScoped(pTable *vindexes.BaseTable, cTable *vindexes.BaseTable, pCols sqlparser.Columns, cCols sqlparser.Columns) bool { if !pTable.Keyspace.Sharded { return true } @@ -762,11 +762,11 @@ func (st *SemTable) ColumnLookup(col *sqlparser.ColName) (int, error) { } // SingleUnshardedKeyspace returns the single keyspace if all tables in the query are in the same, unsharded keyspace -func (st *SemTable) SingleUnshardedKeyspace() (ks *vindexes.Keyspace, tables []*vindexes.Table) { +func (st *SemTable) SingleUnshardedKeyspace() (ks *vindexes.Keyspace, tables []*vindexes.BaseTable) { return singleUnshardedKeyspace(st.Tables) } -func singleUnshardedKeyspace(tableInfos []TableInfo) (ks *vindexes.Keyspace, tables []*vindexes.Table) { +func singleUnshardedKeyspace(tableInfos []TableInfo) (ks *vindexes.Keyspace, tables []*vindexes.BaseTable) { validKS := func(this *vindexes.Keyspace) bool { if this == nil || this.Sharded { return false @@ -783,7 +783,7 @@ func singleUnshardedKeyspace(tableInfos []TableInfo) (ks *vindexes.Keyspace, tab for _, table := range tableInfos { sc := table.canShortCut() - var vtbl *vindexes.Table + var vtbl *vindexes.BaseTable switch sc { case dependsOnKeyspace: diff --git a/go/vt/vtgate/semantics/semantic_table_test.go b/go/vt/vtgate/semantics/semantic_table_test.go index 1f324215326..19f586d6190 100644 --- a/go/vt/vtgate/semantics/semantic_table_test.go +++ b/go/vt/vtgate/semantics/semantic_table_test.go @@ -69,7 +69,7 @@ func fakeSchemaInfoTest() *FakeSI { }} si := &FakeSI{ - Tables: map[string]*vindexes.Table{ + Tables: map[string]*vindexes.BaseTable{ "t1": {Name: sqlparser.NewIdentifierCS("t1"), Columns: cols1, ColumnListAuthoritative: true, Keyspace: ks2}, "t2": {Name: sqlparser.NewIdentifierCS("t2"), Columns: cols2, ColumnListAuthoritative: true, Keyspace: ks3}, }, @@ -141,22 +141,22 @@ func TestIsShardScoped(t *testing.T) { tests := []struct { name string - pTable *vindexes.Table - cTable *vindexes.Table + pTable *vindexes.BaseTable + cTable *vindexes.BaseTable pCols sqlparser.Columns cCols sqlparser.Columns wantedShardScoped bool }{ { name: "unsharded keyspace", - pTable: &vindexes.Table{ + pTable: &vindexes.BaseTable{ Keyspace: &vindexes.Keyspace{Name: "uks", Sharded: false}, }, wantedShardScoped: true, }, { name: "Primary vindexes don't match", - pTable: &vindexes.Table{ + pTable: &vindexes.BaseTable{ Keyspace: &vindexes.Keyspace{Name: "ks", Sharded: true}, ColumnVindexes: []*vindexes.ColumnVindex{ { @@ -164,7 +164,7 @@ func TestIsShardScoped(t *testing.T) { }, }, }, - cTable: &vindexes.Table{ + cTable: &vindexes.BaseTable{ ColumnVindexes: []*vindexes.ColumnVindex{ { Vindex: xxhashVindex, @@ -175,7 +175,7 @@ func TestIsShardScoped(t *testing.T) { }, { name: "Child primary vindex not part of the foreign key", - pTable: &vindexes.Table{ + pTable: &vindexes.BaseTable{ Keyspace: &vindexes.Keyspace{Name: "ks", Sharded: true}, ColumnVindexes: []*vindexes.ColumnVindex{ { @@ -183,7 +183,7 @@ func TestIsShardScoped(t *testing.T) { }, }, }, - cTable: &vindexes.Table{ + cTable: &vindexes.BaseTable{ ColumnVindexes: []*vindexes.ColumnVindex{ { Vindex: hashVindex, @@ -196,7 +196,7 @@ func TestIsShardScoped(t *testing.T) { }, { name: "Parent primary vindex not part of the foreign key", - pTable: &vindexes.Table{ + pTable: &vindexes.BaseTable{ Keyspace: &vindexes.Keyspace{Name: "ks", Sharded: true}, ColumnVindexes: []*vindexes.ColumnVindex{ { @@ -205,7 +205,7 @@ func TestIsShardScoped(t *testing.T) { }, }, }, - cTable: &vindexes.Table{ + cTable: &vindexes.BaseTable{ ColumnVindexes: []*vindexes.ColumnVindex{ { Vindex: hashVindex, @@ -219,7 +219,7 @@ func TestIsShardScoped(t *testing.T) { }, { name: "Indexes order doesn't match", - pTable: &vindexes.Table{ + pTable: &vindexes.BaseTable{ Keyspace: &vindexes.Keyspace{Name: "ks", Sharded: true}, ColumnVindexes: []*vindexes.ColumnVindex{ { @@ -228,7 +228,7 @@ func TestIsShardScoped(t *testing.T) { }, }, }, - cTable: &vindexes.Table{ + cTable: &vindexes.BaseTable{ ColumnVindexes: []*vindexes.ColumnVindex{ { Vindex: hashVindex, @@ -242,7 +242,7 @@ func TestIsShardScoped(t *testing.T) { }, { name: "Is shard scoped", - pTable: &vindexes.Table{ + pTable: &vindexes.BaseTable{ Keyspace: &vindexes.Keyspace{Name: "ks", Sharded: true}, ColumnVindexes: []*vindexes.ColumnVindex{ { @@ -251,7 +251,7 @@ func TestIsShardScoped(t *testing.T) { }, }, }, - cTable: &vindexes.Table{ + cTable: &vindexes.BaseTable{ ColumnVindexes: []*vindexes.ColumnVindex{ { Vindex: hashVindex, @@ -379,15 +379,15 @@ func TestGetParentForeignKeysList(t *testing.T) { // TestRemoveParentForeignKey tests the functionality of RemoveParentForeignKey func TestRemoveParentForeignKey(t *testing.T) { - t1Table := &vindexes.Table{ + t1Table := &vindexes.BaseTable{ Keyspace: &vindexes.Keyspace{Name: "ks"}, Name: sqlparser.NewIdentifierCS("t1"), } - t2Table := &vindexes.Table{ + t2Table := &vindexes.BaseTable{ Keyspace: &vindexes.Keyspace{Name: "ks"}, Name: sqlparser.NewIdentifierCS("t2"), } - t3Table := &vindexes.Table{ + t3Table := &vindexes.BaseTable{ Keyspace: &vindexes.Keyspace{Name: "ks"}, Name: sqlparser.NewIdentifierCS("t3"), } @@ -483,7 +483,7 @@ func TestRemoveParentForeignKey(t *testing.T) { func TestRemoveNonRequiredForeignKeys(t *testing.T) { hashVindex := &vindexes.Hash{} xxhashVindex := &vindexes.XXHash{} - t1Table := &vindexes.Table{ + t1Table := &vindexes.BaseTable{ Keyspace: &vindexes.Keyspace{Name: "ks", Sharded: true}, Name: sqlparser.NewIdentifierCS("t1"), ColumnVindexes: []*vindexes.ColumnVindex{ @@ -493,7 +493,7 @@ func TestRemoveNonRequiredForeignKeys(t *testing.T) { }, }, } - t2Table := &vindexes.Table{ + t2Table := &vindexes.BaseTable{ Keyspace: &vindexes.Keyspace{Name: "ks", Sharded: true}, Name: sqlparser.NewIdentifierCS("t2"), ColumnVindexes: []*vindexes.ColumnVindex{ @@ -503,7 +503,7 @@ func TestRemoveNonRequiredForeignKeys(t *testing.T) { }, }, } - t4Table := &vindexes.Table{ + t4Table := &vindexes.BaseTable{ Keyspace: &vindexes.Keyspace{Name: "ks", Sharded: true}, Name: sqlparser.NewIdentifierCS("t4"), ColumnVindexes: []*vindexes.ColumnVindex{ @@ -513,7 +513,7 @@ func TestRemoveNonRequiredForeignKeys(t *testing.T) { }, }, } - t3Table := &vindexes.Table{ + t3Table := &vindexes.BaseTable{ Keyspace: &vindexes.Keyspace{Name: "ks2"}, Name: sqlparser.NewIdentifierCS("t3"), } @@ -752,7 +752,7 @@ func TestRemoveNonRequiredForeignKeys(t *testing.T) { func TestIsFkDependentColumnUpdated(t *testing.T) { keyspaceName := "ks" - t3Table := &vindexes.Table{ + t3Table := &vindexes.BaseTable{ Keyspace: &vindexes.Keyspace{Name: keyspaceName}, Name: sqlparser.NewIdentifierCS("t3"), } @@ -769,7 +769,7 @@ func TestIsFkDependentColumnUpdated(t *testing.T) { KsForeignKeyMode: map[string]vschemapb.Keyspace_ForeignKeyMode{ keyspaceName: vschemapb.Keyspace_managed, }, - Tables: map[string]*vindexes.Table{ + Tables: map[string]*vindexes.BaseTable{ "t1": { Name: sqlparser.NewIdentifierCS("t1"), Keyspace: &vindexes.Keyspace{Name: keyspaceName}, @@ -787,7 +787,7 @@ func TestIsFkDependentColumnUpdated(t *testing.T) { KsForeignKeyMode: map[string]vschemapb.Keyspace_ForeignKeyMode{ keyspaceName: vschemapb.Keyspace_managed, }, - Tables: map[string]*vindexes.Table{ + Tables: map[string]*vindexes.BaseTable{ "t1": { Name: sqlparser.NewIdentifierCS("t1"), Keyspace: &vindexes.Keyspace{Name: keyspaceName}, @@ -805,7 +805,7 @@ func TestIsFkDependentColumnUpdated(t *testing.T) { KsForeignKeyMode: map[string]vschemapb.Keyspace_ForeignKeyMode{ keyspaceName: vschemapb.Keyspace_managed, }, - Tables: map[string]*vindexes.Table{ + Tables: map[string]*vindexes.BaseTable{ "t1": { Name: sqlparser.NewIdentifierCS("t1"), Keyspace: &vindexes.Keyspace{Name: keyspaceName}, @@ -823,7 +823,7 @@ func TestIsFkDependentColumnUpdated(t *testing.T) { KsForeignKeyMode: map[string]vschemapb.Keyspace_ForeignKeyMode{ keyspaceName: vschemapb.Keyspace_managed, }, - Tables: map[string]*vindexes.Table{ + Tables: map[string]*vindexes.BaseTable{ "t1": { Name: sqlparser.NewIdentifierCS("t1"), Keyspace: &vindexes.Keyspace{Name: keyspaceName}, @@ -841,7 +841,7 @@ func TestIsFkDependentColumnUpdated(t *testing.T) { KsForeignKeyMode: map[string]vschemapb.Keyspace_ForeignKeyMode{ keyspaceName: vschemapb.Keyspace_managed, }, - Tables: map[string]*vindexes.Table{ + Tables: map[string]*vindexes.BaseTable{ "t1": { Name: sqlparser.NewIdentifierCS("t1"), Keyspace: &vindexes.Keyspace{Name: keyspaceName, Sharded: true}, @@ -869,7 +869,7 @@ func TestIsFkDependentColumnUpdated(t *testing.T) { func TestHasNonLiteralForeignKeyUpdate(t *testing.T) { keyspaceName := "ks" - t3Table := &vindexes.Table{ + t3Table := &vindexes.BaseTable{ Keyspace: &vindexes.Keyspace{Name: keyspaceName}, Name: sqlparser.NewIdentifierCS("t3"), } @@ -886,7 +886,7 @@ func TestHasNonLiteralForeignKeyUpdate(t *testing.T) { KsForeignKeyMode: map[string]vschemapb.Keyspace_ForeignKeyMode{ keyspaceName: vschemapb.Keyspace_managed, }, - Tables: map[string]*vindexes.Table{ + Tables: map[string]*vindexes.BaseTable{ "t1": { Name: sqlparser.NewIdentifierCS("t1"), Keyspace: &vindexes.Keyspace{Name: keyspaceName}, @@ -904,7 +904,7 @@ func TestHasNonLiteralForeignKeyUpdate(t *testing.T) { KsForeignKeyMode: map[string]vschemapb.Keyspace_ForeignKeyMode{ keyspaceName: vschemapb.Keyspace_managed, }, - Tables: map[string]*vindexes.Table{ + Tables: map[string]*vindexes.BaseTable{ "t1": { Name: sqlparser.NewIdentifierCS("t1"), Keyspace: &vindexes.Keyspace{Name: keyspaceName}, @@ -922,7 +922,7 @@ func TestHasNonLiteralForeignKeyUpdate(t *testing.T) { KsForeignKeyMode: map[string]vschemapb.Keyspace_ForeignKeyMode{ keyspaceName: vschemapb.Keyspace_managed, }, - Tables: map[string]*vindexes.Table{ + Tables: map[string]*vindexes.BaseTable{ "t1": { Name: sqlparser.NewIdentifierCS("t1"), Keyspace: &vindexes.Keyspace{Name: keyspaceName}, @@ -940,7 +940,7 @@ func TestHasNonLiteralForeignKeyUpdate(t *testing.T) { KsForeignKeyMode: map[string]vschemapb.Keyspace_ForeignKeyMode{ keyspaceName: vschemapb.Keyspace_managed, }, - Tables: map[string]*vindexes.Table{ + Tables: map[string]*vindexes.BaseTable{ "t1": { Name: sqlparser.NewIdentifierCS("t1"), Keyspace: &vindexes.Keyspace{Name: keyspaceName}, @@ -958,7 +958,7 @@ func TestHasNonLiteralForeignKeyUpdate(t *testing.T) { KsForeignKeyMode: map[string]vschemapb.Keyspace_ForeignKeyMode{ keyspaceName: vschemapb.Keyspace_managed, }, - Tables: map[string]*vindexes.Table{ + Tables: map[string]*vindexes.BaseTable{ "t1": { Name: sqlparser.NewIdentifierCS("t1"), Keyspace: &vindexes.Keyspace{Name: keyspaceName}, diff --git a/go/vt/vtgate/semantics/table_collector.go b/go/vt/vtgate/semantics/table_collector.go index 329ebcef254..e35165f600d 100644 --- a/go/vt/vtgate/semantics/table_collector.go +++ b/go/vt/vtgate/semantics/table_collector.go @@ -346,7 +346,7 @@ func (etc *earlyTableCollector) getCTE(t sqlparser.TableName) *CTE { } func (etc *earlyTableCollector) getTableInfo(node *sqlparser.AliasedTableExpr, t sqlparser.TableName, sc *scoper) (TableInfo, error) { - var tbl *vindexes.Table + var tbl *vindexes.BaseTable var vindex vindexes.Vindex if cteDef := etc.getCTE(t); cteDef != nil { cte, err := etc.buildRecursiveCTE(node, t, sc, cteDef) @@ -504,7 +504,7 @@ func (tc *tableCollector) addUnionDerivedTable( return scope.addTable(tableInfo) } -func newVindexTable(t sqlparser.IdentifierCS) *vindexes.Table { +func newVindexTable(t sqlparser.IdentifierCS) *vindexes.BaseTable { vindexCols := []vindexes.Column{ {Name: sqlparser.NewIdentifierCI("id"), Type: querypb.Type_VARBINARY}, {Name: sqlparser.NewIdentifierCI("keyspace_id"), Type: querypb.Type_VARBINARY}, @@ -514,7 +514,7 @@ func newVindexTable(t sqlparser.IdentifierCS) *vindexes.Table { {Name: sqlparser.NewIdentifierCI("shard"), Type: querypb.Type_VARBINARY}, } - return &vindexes.Table{ + return &vindexes.BaseTable{ Name: t, Columns: vindexCols, ColumnListAuthoritative: true, @@ -544,7 +544,7 @@ func (tc *tableCollector) tableInfoFor(id TableSet) (TableInfo, error) { func (etc *earlyTableCollector) createTable( t sqlparser.TableName, alias *sqlparser.AliasedTableExpr, - tbl *vindexes.Table, + tbl *vindexes.BaseTable, isInfSchema bool, vindex vindexes.Vindex, ) (TableInfo, error) { @@ -591,7 +591,7 @@ func (etc *earlyTableCollector) createTable( return table, nil } -func checkValidVindexHints(hint *sqlparser.IndexHint, tbl *vindexes.Table) error { +func checkValidVindexHints(hint *sqlparser.IndexHint, tbl *vindexes.BaseTable) error { if hint == nil { return nil } diff --git a/go/vt/vtgate/semantics/vindex_table.go b/go/vt/vtgate/semantics/vindex_table.go index c8ef271af5d..faac55c8116 100644 --- a/go/vt/vtgate/semantics/vindex_table.go +++ b/go/vt/vtgate/semantics/vindex_table.go @@ -47,7 +47,7 @@ func (v *VindexTable) getExprFor(_ string) (sqlparser.Expr, error) { } // GetVindexTable implements the TableInfo interface -func (v *VindexTable) GetVindexTable() *vindexes.Table { +func (v *VindexTable) GetVindexTable() *vindexes.BaseTable { return v.Table.GetVindexTable() } diff --git a/go/vt/vtgate/semantics/vtable.go b/go/vt/vtgate/semantics/vtable.go index 6cd7e34aecc..94dc74cdf34 100644 --- a/go/vt/vtgate/semantics/vtable.go +++ b/go/vt/vtgate/semantics/vtable.go @@ -100,7 +100,7 @@ func (v *vTableInfo) canShortCut() shortCut { } // GetVindexTable implements the TableInfo interface -func (v *vTableInfo) GetVindexTable() *vindexes.Table { +func (v *vTableInfo) GetVindexTable() *vindexes.BaseTable { return nil } diff --git a/go/vt/vtgate/vindexes/foreign_keys.go b/go/vt/vtgate/vindexes/foreign_keys.go index 275a0674998..e9f8c986d10 100644 --- a/go/vt/vtgate/vindexes/foreign_keys.go +++ b/go/vt/vtgate/vindexes/foreign_keys.go @@ -26,7 +26,7 @@ import ( // ParentFKInfo contains the parent foreign key info for the table. type ParentFKInfo struct { - Table *Table + Table *BaseTable ParentColumns sqlparser.Columns ChildColumns sqlparser.Columns } @@ -44,7 +44,7 @@ func (fk *ParentFKInfo) MarshalJSON() ([]byte, error) { }) } -func (fk *ParentFKInfo) String(childTable *Table) string { +func (fk *ParentFKInfo) String(childTable *BaseTable) string { var str strings.Builder str.WriteString(sqlparser.String(childTable.GetTableName())) for _, column := range fk.ChildColumns { @@ -58,7 +58,7 @@ func (fk *ParentFKInfo) String(childTable *Table) string { } // NewParentFkInfo creates a new ParentFKInfo. -func NewParentFkInfo(parentTbl *Table, fkDef *sqlparser.ForeignKeyDefinition) ParentFKInfo { +func NewParentFkInfo(parentTbl *BaseTable, fkDef *sqlparser.ForeignKeyDefinition) ParentFKInfo { return ParentFKInfo{ Table: parentTbl, ChildColumns: fkDef.Source, @@ -68,7 +68,7 @@ func NewParentFkInfo(parentTbl *Table, fkDef *sqlparser.ForeignKeyDefinition) Pa // ChildFKInfo contains the child foreign key info for the table. type ChildFKInfo struct { - Table *Table + Table *BaseTable ChildColumns sqlparser.Columns ParentColumns sqlparser.Columns Match sqlparser.MatchAction @@ -89,7 +89,7 @@ func (fk *ChildFKInfo) MarshalJSON() ([]byte, error) { }) } -func (fk *ChildFKInfo) String(parentTable *Table) string { +func (fk *ChildFKInfo) String(parentTable *BaseTable) string { var str strings.Builder str.WriteString(sqlparser.String(fk.Table.GetTableName())) for _, column := range fk.ChildColumns { @@ -103,7 +103,7 @@ func (fk *ChildFKInfo) String(parentTable *Table) string { } // NewChildFkInfo creates a new ChildFKInfo. -func NewChildFkInfo(childTbl *Table, fkDef *sqlparser.ForeignKeyDefinition) ChildFKInfo { +func NewChildFkInfo(childTbl *BaseTable, fkDef *sqlparser.ForeignKeyDefinition) ChildFKInfo { return ChildFKInfo{ Table: childTbl, ChildColumns: fkDef.Source, diff --git a/go/vt/vtgate/vindexes/vschema.go b/go/vt/vtgate/vindexes/vschema.go index 05081a3c9ba..5499200768b 100644 --- a/go/vt/vtgate/vindexes/vschema.go +++ b/go/vt/vtgate/vindexes/vschema.go @@ -57,7 +57,6 @@ const ( TypeTable = "" TypeSequence = "sequence" TypeReference = "reference" - TypeView = "view" ) // VSchema represents the denormalized version of SrvVSchema, @@ -70,7 +69,7 @@ type VSchema struct { // table is uniquely named, the value will be the qualified Table object // with the keyspace where this table exists. If multiple keyspaces have a // table with the same name, the value will be a `nil`. - globalTables map[string]*Table + globalTables map[string]Table uniqueVindexes map[string]Vindex Keyspaces map[string]*KeyspaceSchema `json:"keyspaces"` ShardRoutingRules map[string]string `json:"shard_routing_rules"` @@ -83,8 +82,8 @@ type VSchema struct { // MirrorRule represents one mirror rule. type MirrorRule struct { Error error - Percent float32 `json:"percent,omitempty"` - Table *Table `json:"table,omitempty"` + Percent float32 `json:"percent,omitempty"` + Table *BaseTable `json:"table,omitempty"` } // MarshalJSON returns a JSON representation of MirrorRule. @@ -94,7 +93,7 @@ func (mr *MirrorRule) MarshalJSON() ([]byte, error) { } return json.Marshal(struct { Percent float32 - Table *Table + Table *BaseTable }{ Percent: mr.Percent, Table: mr.Table, @@ -103,7 +102,7 @@ func (mr *MirrorRule) MarshalJSON() ([]byte, error) { // RoutingRule represents one routing rule. type RoutingRule struct { - Tables []*Table + Tables []*BaseTable Error error } @@ -120,8 +119,15 @@ func (rr *RoutingRule) MarshalJSON() ([]byte, error) { return json.Marshal(tables) } -// Table represents a table in VSchema. -type Table struct { +// View represents a view in VSchema. +type View struct { + Name string + Keyspace *Keyspace + Statement sqlparser.TableStatement +} + +// BaseTable represents a table in VSchema. +type BaseTable struct { Type string `json:"type,omitempty"` Name sqlparser.IdentifierCS `json:"name"` Keyspace *Keyspace `json:"-"` @@ -137,7 +143,7 @@ type Table struct { // // This is useful in route-planning for quickly selecting the optimal route // when JOIN-ing a reference table to a sharded table. - ReferencedBy map[string]*Table `json:"-"` + ReferencedBy map[string]*BaseTable `json:"-"` // Source is a keyspace-qualified table name that points to the source of a // reference table. Only applicable for tables with Type set to "reference". Source *Source `json:"source,omitempty"` @@ -153,7 +159,7 @@ type Table struct { } // GetTableName gets the sqlparser.TableName for the vindex Table. -func (t *Table) GetTableName() sqlparser.TableName { +func (t *BaseTable) GetTableName() sqlparser.TableName { return sqlparser.NewTableNameWithQualifier(t.Name.String(), t.Keyspace.Name) } @@ -262,9 +268,9 @@ func (col *Column) ToEvalengineType(collationEnv *collations.Environment) evalen type KeyspaceSchema struct { Keyspace *Keyspace ForeignKeyMode vschemapb.Keyspace_ForeignKeyMode - Tables map[string]*Table + Tables map[string]*BaseTable Vindexes map[string]Vindex - Views map[string]sqlparser.TableStatement + Views map[string]*View Error error MultiTenantSpec *vschemapb.MultiTenantSpec @@ -275,7 +281,7 @@ type KeyspaceSchema struct { type ksJSON struct { Sharded bool `json:"sharded,omitempty"` ForeignKeyMode string `json:"foreignKeyMode,omitempty"` - Tables map[string]*Table `json:"tables,omitempty"` + Tables map[string]*BaseTable `json:"tables,omitempty"` Vindexes map[string]Vindex `json:"vindexes,omitempty"` Views map[string]string `json:"views,omitempty"` Error string `json:"error,omitempty"` @@ -292,14 +298,14 @@ type ksJSON struct { func (ks *KeyspaceSchema) findTable( tablename string, constructUnshardedIfNotFound bool, -) *Table { +) *BaseTable { table := ks.Tables[tablename] if table != nil { return table } if constructUnshardedIfNotFound && !ks.Keyspace.Sharded { - return &Table{Name: sqlparser.NewIdentifierCS(tablename), Keyspace: ks.Keyspace} + return &BaseTable{Name: sqlparser.NewIdentifierCS(tablename), Keyspace: ks.Keyspace} } return nil @@ -321,7 +327,7 @@ func (ks *KeyspaceSchema) MarshalJSON() ([]byte, error) { ksJ.Views = make(map[string]string, len(ks.Views)) } for view, def := range ks.Views { - ksJ.Views[view] = sqlparser.String(def) + ksJ.Views[view] = sqlparser.String(def.Statement) } return json.Marshal(ksJ) @@ -330,7 +336,7 @@ func (ks *KeyspaceSchema) MarshalJSON() ([]byte, error) { // AutoIncrement contains the auto-inc information for a table. type AutoIncrement struct { Column sqlparser.IdentifierCI `json:"column"` - Sequence *Table `json:"sequence"` + Sequence *BaseTable `json:"sequence"` } type Source struct { @@ -348,7 +354,7 @@ func BuildVSchema(source *vschemapb.SrvVSchema, parser *sqlparser.Parser) (vsche vschema = &VSchema{ MirrorRules: make(map[string]*MirrorRule), RoutingRules: make(map[string]*RoutingRule), - globalTables: make(map[string]*Table), + globalTables: make(map[string]Table), uniqueVindexes: make(map[string]Vindex), Keyspaces: make(map[string]*KeyspaceSchema), created: time.Now(), @@ -380,7 +386,7 @@ func BuildKeyspaceSchema(input *vschemapb.Keyspace, keyspace string, parser *sql }, } vschema := &VSchema{ - globalTables: make(map[string]*Table), + globalTables: make(map[string]Table), uniqueVindexes: make(map[string]Vindex), Keyspaces: make(map[string]*KeyspaceSchema), } @@ -403,7 +409,7 @@ func buildKeyspaces(source *vschemapb.SrvVSchema, vschema *VSchema, parser *sqlp Sharded: ks.Sharded, }, ForeignKeyMode: replaceUnspecifiedForeignKeyMode(ks.ForeignKeyMode), - Tables: make(map[string]*Table), + Tables: make(map[string]*BaseTable), Vindexes: make(map[string]Vindex), MultiTenantSpec: ks.MultiTenantSpec, } @@ -436,16 +442,15 @@ func (vschema *VSchema) AddView(ksname, viewName, query string, parser *sqlparse return vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "expected SELECT or UNION query, got %T", ast) } if ks.Views == nil { - ks.Views = make(map[string]sqlparser.TableStatement) + ks.Views = make(map[string]*View) } - ks.Views[viewName] = selectStmt - t := &Table{ - Type: TypeView, - Name: sqlparser.NewIdentifierCS(viewName), - Keyspace: ks.Keyspace, - ColumnListAuthoritative: true, + view := &View{ + Name: viewName, + Keyspace: ks.Keyspace, + Statement: selectStmt, } - vschema.addTableName(t) + ks.Views[viewName] = view + vschema.addToGlobalTables(view) return nil } @@ -478,13 +483,32 @@ func buildGlobalTables(source *vschemapb.SrvVSchema, vschema *VSchema) { // which means that the global tables are already populated with the tables from the sharded keyspaces and from // unsharded keyspaces which have tables specified in associated vschemas. func AddAdditionalGlobalTables(source *vschemapb.SrvVSchema, vschema *VSchema) { - newTables := make(map[string]*Table) + newTables := make(map[string]Table) // Collect valid uniquely named tables from unsharded keyspaces. for ksname, ks := range source.Keyspaces { ksvschema := vschema.Keyspaces[ksname] - // Ignore sharded keyspaces and those flagged for explicit routing. - if ks.RequireExplicitRouting || ks.Sharded { + // Ignore keyspaces marked for explicit routing. + if ks.RequireExplicitRouting { + continue + } + // Views does not require routing, so this can be added to global tables + // for sharded keyspace as well + for tname, table := range ksvschema.Views { + // Ignore tables already global (i.e. if specified in the vschema of an unsharded keyspace) or ambiguous. + if _, found := vschema.globalTables[tname]; found { + continue + } + _, ok := newTables[tname] + if ok { + newTables[tname] = nil + continue + } + table.Keyspace = ksvschema.Keyspace + newTables[tname] = table + } + // Sharded tables needs vindex information, adding to global table will not help. + if ks.Sharded { continue } for tname, table := range ksvschema.Tables { @@ -515,18 +539,17 @@ func buildKeyspaceGlobalTables(vschema *VSchema, ksvschema *KeyspaceSchema) { if gt == nil { // Table name is already marked ambiguous, nothing to do. continue - } else { - // Special handling for reference tables which specify their source. - if t.Type == TypeReference && t.Source != nil { - // If the reference table points to the already stored - // global table, there is no ambiguity. - if t.Source.Qualifier.IsEmpty() || t.Source.Qualifier.String() == gt.Keyspace.Name { - continue - } + } + // Special handling for reference tables which specify their source. + if t.Type == TypeReference && t.Source != nil { + // If the reference table points to the already stored + // global table, there is no ambiguity. + if t.Source.Qualifier.IsEmpty() || t.Source.Qualifier.String() == gt.GetKeyspace().Name { + continue } - // Otherwise, mark this table name ambiguous. - vschema.globalTables[tname] = nil } + // Otherwise, mark this table name ambiguous. + vschema.globalTables[tname] = nil } else { // Reference tables which define a source with the same name may be // globally routable through their source, as long as the source @@ -662,7 +685,7 @@ func buildTables(ks *vschemapb.Keyspace, vschema *VSchema, ksvschema *KeyspaceSc ksvschema.Vindexes[vname] = vindex } for tname, table := range ks.Tables { - t := &Table{ + t := &BaseTable{ Name: sqlparser.NewIdentifierCS(tname), Keyspace: keyspace, ColumnListAuthoritative: table.ColumnListAuthoritative, @@ -887,8 +910,9 @@ func buildTables(ks *vschemapb.Keyspace, vschema *VSchema, ksvschema *KeyspaceSc return nil } -func (vschema *VSchema) addTableName(t *Table) { - tname := t.Name.String() +// addToGlobalTables adds a table to the global tables map if unique otherwise marks it as ambiguous. +func (vschema *VSchema) addToGlobalTables(t Table) { + tname := t.GetName() if _, ok := vschema.globalTables[tname]; ok { vschema.globalTables[tname] = nil } else { @@ -905,7 +929,7 @@ func resolveAutoIncrement(source *vschemapb.SrvVSchema, vschema *VSchema, parser continue } seqks, seqtab, err := parser.ParseTable(table.AutoIncrement.Sequence) - var seq *Table + var seq *BaseTable if err == nil { // Ensure that sequence tables also obey routing rules. seq, err = vschema.FindRoutedTable(seqks, seqtab, topodatapb.TabletType_PRIMARY) @@ -1299,7 +1323,7 @@ func buildMirrorRule(source *vschemapb.SrvVSchema, vschema *VSchema, parser *sql // keyspace in the vschema, and it's unsharded, then all table requests are considered // valid and belonging to that keyspace. // FindTable bypasses routing rules and returns at most one table. -func (vschema *VSchema) FindTable(keyspace, tablename string) (*Table, error) { +func (vschema *VSchema) FindTable(keyspace, tablename string) (*BaseTable, error) { table, err := vschema.findTable( keyspace, tablename, @@ -1328,12 +1352,17 @@ func (vschema *VSchema) FindTable(keyspace, tablename string) (*Table, error) { // // - constructUnshardedIfNotFound is not requested, than no table is returned. // - constructUnshardedIfNotFound is requested, and there is only one keyspace, -// and that keyspace is unsharded, then a *Table representing that table is +// and that keyspace is unsharded, then a BaseTable representing that table is // returned. func (vschema *VSchema) findGlobalTable( tablename string, constructUnshardedIfNotFound bool, -) (*Table, error) { +) (Table, error) { + table, ok := vschema.globalTables[tablename] + if table != nil { + return table, nil + } + if len(vschema.Keyspaces) == 1 { for _, ks := range vschema.Keyspaces { table := ks.findTable(tablename, constructUnshardedIfNotFound) @@ -1341,12 +1370,6 @@ func (vschema *VSchema) findGlobalTable( } } - table, ok := vschema.globalTables[tablename] - - if table != nil { - return table, nil - } - if ok { return nil, vterrors.Errorf( vtrpcpb.Code_FAILED_PRECONDITION, @@ -1377,9 +1400,16 @@ func (vschema *VSchema) findTable( keyspace, tablename string, constructUnshardedIfNotFound bool, -) (*Table, error) { +) (*BaseTable, error) { if keyspace == "" { - return vschema.findGlobalTable(tablename, constructUnshardedIfNotFound) + tbl, err := vschema.findGlobalTable(tablename, constructUnshardedIfNotFound) + if err != nil || tbl == nil { + return nil, err + } + if tbl.IsBaseTable() { + return tbl.(*BaseTable), nil + } + return nil, vterrors.VT13001(fmt.Sprintf("found view `%s`.`%s`, expecting table", tbl.GetKeyspace().Name, tablename)) } ks, ok := vschema.Keyspaces[keyspace] if !ok { @@ -1426,7 +1456,7 @@ func (vschema *VSchema) findRoutedKeyspace(keyspace string, tabletType topodatap } // FindRoutedTable finds a table checking the routing rules. -func (vschema *VSchema) FindRoutedTable(keyspace, tablename string, tabletType topodatapb.TabletType) (*Table, error) { +func (vschema *VSchema) FindRoutedTable(keyspace, tablename string, tabletType topodatapb.TabletType) (*BaseTable, error) { keyspace = vschema.findRoutedKeyspace(keyspace, tabletType) qualified := tablename if keyspace != "" { @@ -1459,7 +1489,7 @@ func (vschema *VSchema) FindRoutedTable(keyspace, tablename string, tabletType t } // FindTableOrVindex finds a table or a Vindex by name using Find and FindVindex. -func (vschema *VSchema) FindTableOrVindex(keyspace, name string, tabletType topodatapb.TabletType) (*Table, Vindex, error) { +func (vschema *VSchema) FindTableOrVindex(keyspace, name string, tabletType topodatapb.TabletType) (*BaseTable, Vindex, error) { tables, err := vschema.FindRoutedTable(keyspace, name, tabletType) if err != nil { return nil, nil, err @@ -1479,22 +1509,11 @@ func (vschema *VSchema) FindTableOrVindex(keyspace, name string, tabletType topo func (vschema *VSchema) FindView(keyspace, name string) sqlparser.TableStatement { if keyspace == "" { - switch { - case len(vschema.Keyspaces) == 1: - for _, schema := range vschema.Keyspaces { - keyspace = schema.Keyspace.Name - break - } - default: - t, ok := vschema.globalTables[name] - if !ok { - return nil - } - if ok && t == nil { - return nil - } - keyspace = t.Keyspace.Name + t, err := vschema.findGlobalTable(name, false) + if err != nil || t == nil || t.IsBaseTable() { + return nil } + return t.(*View).Statement } ks := vschema.Keyspaces[keyspace] @@ -1502,21 +1521,18 @@ func (vschema *VSchema) FindView(keyspace, name string) sqlparser.TableStatement return nil } - statement, ok := ks.Views[name] + view, ok := ks.Views[name] if !ok { return nil } // We do this to make sure there is no shared state between uses of this AST - statement = sqlparser.Clone(statement) - sqlparser.SafeRewrite(statement, nil, func(cursor *sqlparser.Cursor) bool { + return sqlparser.CopyOnRewrite(view.Statement, nil, func(cursor *sqlparser.CopyOnWriteCursor) { col, ok := cursor.Node().(*sqlparser.ColName) if ok { cursor.Replace(sqlparser.NewColNameWithQualifier(col.Name.String(), col.Qualifier)) } - return true - }) - return statement + }, nil).(sqlparser.TableStatement) } // NotFoundError represents the error where the table name was not found @@ -1679,7 +1695,7 @@ func ChooseVindexForType(typ querypb.Type) (string, error) { } // FindBestColVindex finds the best ColumnVindex for VReplication. -func FindBestColVindex(table *Table) (*ColumnVindex, error) { +func FindBestColVindex(table *BaseTable) (*ColumnVindex, error) { if len(table.ColumnVindexes) == 0 { return nil, vterrors.Errorf( vtrpcpb.Code_INVALID_ARGUMENT, @@ -1743,7 +1759,7 @@ func FindVindexForSharding(tableName string, colVindexes []*ColumnVindex) (*Colu } // String prints the (possibly qualified) table name -func (t *Table) String() string { +func (t *BaseTable) String() string { res := "" if t == nil { return res @@ -1754,14 +1770,14 @@ func (t *Table) String() string { return res + t.Name.String() } -func (t *Table) addReferenceInKeyspace(keyspace string, table *Table) { +func (t *BaseTable) addReferenceInKeyspace(keyspace string, table *BaseTable) { if t.ReferencedBy == nil { - t.ReferencedBy = make(map[string]*Table) + t.ReferencedBy = make(map[string]*BaseTable) } t.ReferencedBy[keyspace] = table } -func (t *Table) getReferenceInKeyspace(keyspace string) *Table { +func (t *BaseTable) getReferenceInKeyspace(keyspace string) *BaseTable { if t.ReferencedBy == nil { return nil } @@ -1771,3 +1787,33 @@ func (t *Table) getReferenceInKeyspace(keyspace string) *Table { } return t } + +type Table interface { + IsBaseTable() bool + GetKeyspace() *Keyspace + GetName() string +} + +func (v *View) IsBaseTable() bool { + return false +} + +func (t *BaseTable) IsBaseTable() bool { + return true +} + +func (v *View) GetKeyspace() *Keyspace { + return v.Keyspace +} + +func (t *BaseTable) GetKeyspace() *Keyspace { + return t.Keyspace +} + +func (v *View) GetName() string { + return v.Name +} + +func (t *BaseTable) GetName() string { + return t.Name.String() +} diff --git a/go/vt/vtgate/vindexes/vschema_routing_test.go b/go/vt/vtgate/vindexes/vschema_routing_test.go index 48ac9239fbb..2b0b1bf7efe 100644 --- a/go/vt/vtgate/vindexes/vschema_routing_test.go +++ b/go/vt/vtgate/vindexes/vschema_routing_test.go @@ -307,7 +307,7 @@ func TestAutoGlobalRoutingBasic(t *testing.T) { // Verify the global tables ks := vschema.Keyspaces["sharded1"] - require.EqualValues(t, vschema.globalTables, map[string]*Table{ + require.EqualValues(t, vschema.globalTables, map[string]Table{ "table5": ks.Tables["table5"], "scommon1": ks.Tables["scommon1"], "scommon2": ks.Tables["scommon2"], @@ -419,7 +419,7 @@ func TestVSchemaRoutingRules(t *testing.T) { vindex1 := &stFU{ name: "stfu1", } - t1 := &Table{ + t1 := &BaseTable{ Name: sqlparser.NewIdentifierCS("t1"), Keyspace: ks1, ColumnVindexes: []*ColumnVindex{{ @@ -434,7 +434,7 @@ func TestVSchemaRoutingRules(t *testing.T) { t1.Ordered = []*ColumnVindex{ t1.ColumnVindexes[0], } - t2 := &Table{ + t2 := &BaseTable{ Name: sqlparser.NewIdentifierCS("t2"), Keyspace: ks2, } @@ -445,10 +445,10 @@ func TestVSchemaRoutingRules(t *testing.T) { Error: errors.New("table rt1 has more than one target: [ks1.t1 ks2.t2]"), }, "rt2": { - Tables: []*Table{t2}, + Tables: []*BaseTable{t2}, }, "escaped": { - Tables: []*Table{t2}, + Tables: []*BaseTable{t2}, }, "dup": { Error: errors.New("duplicate rule for entry dup"), @@ -466,7 +466,7 @@ func TestVSchemaRoutingRules(t *testing.T) { Error: errors.New("table t2 not found"), }, }, - globalTables: map[string]*Table{ + globalTables: map[string]Table{ "t1": t1, "t2": t2, }, @@ -477,7 +477,7 @@ func TestVSchemaRoutingRules(t *testing.T) { "ks1": { Keyspace: ks1, ForeignKeyMode: vschemapb.Keyspace_unmanaged, - Tables: map[string]*Table{ + Tables: map[string]*BaseTable{ "t1": t1, }, Vindexes: map[string]Vindex{ @@ -487,7 +487,7 @@ func TestVSchemaRoutingRules(t *testing.T) { "ks2": { ForeignKeyMode: vschemapb.Keyspace_managed, Keyspace: ks2, - Tables: map[string]*Table{ + Tables: map[string]*BaseTable{ "t2": t2, }, Vindexes: map[string]Vindex{}, diff --git a/go/vt/vtgate/vindexes/vschema_test.go b/go/vt/vtgate/vindexes/vschema_test.go index 70e70745e9b..5ebb5564ed5 100644 --- a/go/vt/vtgate/vindexes/vschema_test.go +++ b/go/vt/vtgate/vindexes/vschema_test.go @@ -899,7 +899,7 @@ func TestVSchemaMirrorRules(t *testing.T) { name: "stfu1", } - ks3t1 := &Table{ + ks3t1 := &BaseTable{ Name: sqlparser.NewIdentifierCS("ks3t1"), Keyspace: ks3, ColumnVindexes: []*ColumnVindex{{ @@ -915,7 +915,7 @@ func TestVSchemaMirrorRules(t *testing.T) { ks3t1.ColumnVindexes[0], } - ks4t1 := &Table{ + ks4t1 := &BaseTable{ Name: sqlparser.NewIdentifierCS("ks4t1"), Keyspace: ks4, ColumnVindexes: []*ColumnVindex{{ @@ -946,7 +946,7 @@ func TestVSchemaMirrorRules(t *testing.T) { Error: errors.New("to table: invalid table name: 'ks2.ks2t2.c', it must be of the qualified form . (dots are not allowed in either name)"), }, "ks1.ks1t3": { - Table: &Table{ + Table: &BaseTable{ Name: sqlparser.NewIdentifierCS("ks2t3"), }, Percent: 50, @@ -955,7 +955,7 @@ func TestVSchemaMirrorRules(t *testing.T) { Error: errors.New("to table: tablet type may not be specified: 'ks2.ks2t4@replica'"), }, "ks1.ks1t5@replica": { - Table: &Table{ + Table: &BaseTable{ Name: sqlparser.NewIdentifierCS("ks2t5"), }, }, @@ -985,19 +985,19 @@ func TestVSchemaMirrorRules(t *testing.T) { "ks1": { Keyspace: ks1, ForeignKeyMode: vschemapb.Keyspace_unmanaged, - Tables: map[string]*Table{}, + Tables: map[string]*BaseTable{}, Vindexes: map[string]Vindex{}, }, "ks2": { ForeignKeyMode: vschemapb.Keyspace_unmanaged, Keyspace: ks2, - Tables: map[string]*Table{}, + Tables: map[string]*BaseTable{}, Vindexes: map[string]Vindex{}, }, "ks3": { ForeignKeyMode: vschemapb.Keyspace_unmanaged, Keyspace: ks3, - Tables: map[string]*Table{ + Tables: map[string]*BaseTable{ "ks3t1": ks3t1, }, Vindexes: map[string]Vindex{ @@ -1007,7 +1007,7 @@ func TestVSchemaMirrorRules(t *testing.T) { "ks4": { ForeignKeyMode: vschemapb.Keyspace_unmanaged, Keyspace: ks4, - Tables: map[string]*Table{ + Tables: map[string]*BaseTable{ "ks4t1": ks4t1, }, Vindexes: map[string]Vindex{ @@ -1224,7 +1224,7 @@ func TestFindVindexForSharding(t *testing.T) { } vindex1 := &stFU{name: "stfu1"} vindex2 := &stLN{name: "stln1"} - t1 := &Table{ + t1 := &BaseTable{ Name: sqlparser.NewIdentifierCS("t1"), Keyspace: ks, ColumnVindexes: []*ColumnVindex{ @@ -1261,7 +1261,7 @@ func TestFindVindexForShardingError(t *testing.T) { } vindex1 := &stLU{name: "stlu1"} vindex2 := &stLN{name: "stln1"} - t1 := &Table{ + t1 := &BaseTable{ Name: sqlparser.NewIdentifierCS("t1"), Keyspace: ks, ColumnVindexes: []*ColumnVindex{ @@ -1301,7 +1301,7 @@ func TestFindVindexForSharding2(t *testing.T) { } vindex1 := &stLU{name: "stlu1"} vindex2 := &stFU{name: "stfu1"} - t1 := &Table{ + t1 := &BaseTable{ Name: sqlparser.NewIdentifierCS("t1"), Keyspace: ks, ColumnVindexes: []*ColumnVindex{ @@ -1356,7 +1356,7 @@ func TestShardedVSchemaMultiColumnVindex(t *testing.T) { Sharded: true, } vindex1 := &stFU{name: "stfu1"} - t1 := &Table{ + t1 := &BaseTable{ Name: sqlparser.NewIdentifierCS("t1"), Keyspace: ks, ColumnVindexes: []*ColumnVindex{ @@ -1376,7 +1376,7 @@ func TestShardedVSchemaMultiColumnVindex(t *testing.T) { want := &VSchema{ MirrorRules: map[string]*MirrorRule{}, RoutingRules: map[string]*RoutingRule{}, - globalTables: map[string]*Table{ + globalTables: map[string]Table{ "t1": t1, }, uniqueVindexes: map[string]Vindex{ @@ -1386,7 +1386,7 @@ func TestShardedVSchemaMultiColumnVindex(t *testing.T) { "sharded": { ForeignKeyMode: vschemapb.Keyspace_disallow, Keyspace: ks, - Tables: map[string]*Table{ + Tables: map[string]*BaseTable{ "t1": t1}, Vindexes: map[string]Vindex{ "stfu1": vindex1}, @@ -1427,7 +1427,7 @@ func TestShardedVSchemaNotOwned(t *testing.T) { } vindex1 := &stLU{name: "stlu1"} vindex2 := &stFU{name: "stfu1"} - t1 := &Table{ + t1 := &BaseTable{ Name: sqlparser.NewIdentifierCS("t1"), Keyspace: ks, ColumnVindexes: []*ColumnVindex{ @@ -1453,7 +1453,7 @@ func TestShardedVSchemaNotOwned(t *testing.T) { want := &VSchema{ MirrorRules: map[string]*MirrorRule{}, RoutingRules: map[string]*RoutingRule{}, - globalTables: map[string]*Table{ + globalTables: map[string]Table{ "t1": t1, }, uniqueVindexes: map[string]Vindex{ @@ -1463,7 +1463,7 @@ func TestShardedVSchemaNotOwned(t *testing.T) { "sharded": { ForeignKeyMode: vschemapb.Keyspace_managed, Keyspace: ks, - Tables: map[string]*Table{ + Tables: map[string]*BaseTable{ "t1": t1, }, Vindexes: map[string]Vindex{ @@ -1550,18 +1550,18 @@ func TestBuildVSchemaDupSeq(t *testing.T) { ksb := &Keyspace{ Name: "ksb"} got := buildVSchema(&good) - t1a := &Table{ + t1a := &BaseTable{ Name: sqlparser.NewIdentifierCS("t1"), Keyspace: ksa, Type: "sequence"} - t1b := &Table{ + t1b := &BaseTable{ Name: sqlparser.NewIdentifierCS("t1"), Keyspace: ksb, Type: "sequence"} want := &VSchema{ MirrorRules: map[string]*MirrorRule{}, RoutingRules: map[string]*RoutingRule{}, - globalTables: map[string]*Table{ + globalTables: map[string]Table{ "t1": nil, }, uniqueVindexes: map[string]Vindex{}, @@ -1569,7 +1569,7 @@ func TestBuildVSchemaDupSeq(t *testing.T) { "ksa": { ForeignKeyMode: vschemapb.Keyspace_managed, Keyspace: ksa, - Tables: map[string]*Table{ + Tables: map[string]*BaseTable{ "t1": t1a, }, Vindexes: map[string]Vindex{}, @@ -1577,7 +1577,7 @@ func TestBuildVSchemaDupSeq(t *testing.T) { "ksb": { ForeignKeyMode: vschemapb.Keyspace_managed, Keyspace: ksb, - Tables: map[string]*Table{ + Tables: map[string]*BaseTable{ "t1": t1b, }, Vindexes: map[string]Vindex{}}}} @@ -1609,21 +1609,21 @@ func TestBuildVSchemaDupTable(t *testing.T) { ksa := &Keyspace{ Name: "ksa", } - t1a := &Table{ + t1a := &BaseTable{ Name: sqlparser.NewIdentifierCS("t1"), Keyspace: ksa, } ksb := &Keyspace{ Name: "ksb", } - t1b := &Table{ + t1b := &BaseTable{ Name: sqlparser.NewIdentifierCS("t1"), Keyspace: ksb, } want := &VSchema{ MirrorRules: map[string]*MirrorRule{}, RoutingRules: map[string]*RoutingRule{}, - globalTables: map[string]*Table{ + globalTables: map[string]Table{ "t1": nil, }, uniqueVindexes: map[string]Vindex{}, @@ -1631,7 +1631,7 @@ func TestBuildVSchemaDupTable(t *testing.T) { "ksa": { ForeignKeyMode: vschemapb.Keyspace_unmanaged, Keyspace: ksa, - Tables: map[string]*Table{ + Tables: map[string]*BaseTable{ "t1": t1a, }, Vindexes: map[string]Vindex{}, @@ -1639,7 +1639,7 @@ func TestBuildVSchemaDupTable(t *testing.T) { "ksb": { ForeignKeyMode: vschemapb.Keyspace_unmanaged, Keyspace: ksb, - Tables: map[string]*Table{ + Tables: map[string]*BaseTable{ "t1": t1b, }, Vindexes: map[string]Vindex{}, @@ -1714,7 +1714,7 @@ func TestBuildVSchemaDupVindex(t *testing.T) { Sharded: true, } vindex1 := &stLU{name: "stlu1"} - t1 := &Table{ + t1 := &BaseTable{ Name: sqlparser.NewIdentifierCS("t1"), Keyspace: ksa, ColumnVindexes: []*ColumnVindex{ @@ -1732,7 +1732,7 @@ func TestBuildVSchemaDupVindex(t *testing.T) { t1.Ordered = []*ColumnVindex{ t1.ColumnVindexes[0], } - t2 := &Table{ + t2 := &BaseTable{ Name: sqlparser.NewIdentifierCS("t1"), Keyspace: ksb, ColumnVindexes: []*ColumnVindex{ @@ -1753,7 +1753,7 @@ func TestBuildVSchemaDupVindex(t *testing.T) { want := &VSchema{ MirrorRules: map[string]*MirrorRule{}, RoutingRules: map[string]*RoutingRule{}, - globalTables: map[string]*Table{ + globalTables: map[string]Table{ "t1": nil, }, uniqueVindexes: map[string]Vindex{ @@ -1763,7 +1763,7 @@ func TestBuildVSchemaDupVindex(t *testing.T) { "ksa": { ForeignKeyMode: vschemapb.Keyspace_unmanaged, Keyspace: ksa, - Tables: map[string]*Table{ + Tables: map[string]*BaseTable{ "t1": t1, }, Vindexes: map[string]Vindex{ @@ -1773,7 +1773,7 @@ func TestBuildVSchemaDupVindex(t *testing.T) { "ksb": { ForeignKeyMode: vschemapb.Keyspace_unmanaged, Keyspace: ksb, - Tables: map[string]*Table{ + Tables: map[string]*BaseTable{ "t1": t2, }, Vindexes: map[string]Vindex{ @@ -2289,13 +2289,13 @@ func TestSequence(t *testing.T) { Name: "sharded", Sharded: true, } - seq := &Table{ + seq := &BaseTable{ Name: sqlparser.NewIdentifierCS("seq"), Keyspace: ksu, Type: "sequence", } vindex1 := &stFU{name: "stfu1"} - t1 := &Table{ + t1 := &BaseTable{ Name: sqlparser.NewIdentifierCS("t1"), Keyspace: kss, ColumnVindexes: []*ColumnVindex{ @@ -2316,7 +2316,7 @@ func TestSequence(t *testing.T) { t1.Ordered = []*ColumnVindex{ t1.ColumnVindexes[0], } - t2 := &Table{ + t2 := &BaseTable{ Name: sqlparser.NewIdentifierCS("t2"), Keyspace: kss, ColumnVindexes: []*ColumnVindex{ @@ -2340,7 +2340,7 @@ func TestSequence(t *testing.T) { want := &VSchema{ MirrorRules: map[string]*MirrorRule{}, RoutingRules: map[string]*RoutingRule{}, - globalTables: map[string]*Table{ + globalTables: map[string]Table{ "seq": seq, "t1": t1, "t2": t2, @@ -2352,7 +2352,7 @@ func TestSequence(t *testing.T) { "unsharded": { ForeignKeyMode: vschemapb.Keyspace_disallow, Keyspace: ksu, - Tables: map[string]*Table{ + Tables: map[string]*BaseTable{ "seq": seq, }, Vindexes: map[string]Vindex{}, @@ -2360,7 +2360,7 @@ func TestSequence(t *testing.T) { "sharded": { ForeignKeyMode: vschemapb.Keyspace_unmanaged, Keyspace: kss, - Tables: map[string]*Table{ + Tables: map[string]*BaseTable{ "t1": t1, "t2": t2, }, @@ -2553,7 +2553,7 @@ func TestFindTable(t *testing.T) { _, err = vschema.FindTable("", "none") require.EqualError(t, err, "table none not found") - ta := &Table{ + ta := &BaseTable{ Name: sqlparser.NewIdentifierCS("ta"), Keyspace: &Keyspace{ Name: "ksa", @@ -2563,12 +2563,12 @@ func TestFindTable(t *testing.T) { require.NoError(t, err) require.Equal(t, ta, got) - t2 := &Table{ + t2 := &BaseTable{ Name: sqlparser.NewIdentifierCS("t2"), Keyspace: &Keyspace{ Name: "ksa", }, - ReferencedBy: map[string]*Table{ + ReferencedBy: map[string]*BaseTable{ "ksb": { Type: "reference", Name: sqlparser.NewIdentifierCS("t2"), @@ -2592,7 +2592,7 @@ func TestFindTable(t *testing.T) { got, _ = vschema.FindTable("ksa", "ta") require.Equal(t, ta, got) - none := &Table{ + none := &BaseTable{ Name: sqlparser.NewIdentifierCS("none"), Keyspace: &Keyspace{ Name: "ksa", @@ -2779,18 +2779,18 @@ func TestBuildKeyspaceSchema(t *testing.T) { ks := &Keyspace{ Name: "ks", } - t1 := &Table{ + t1 := &BaseTable{ Name: sqlparser.NewIdentifierCS("t1"), Keyspace: ks, } - t2 := &Table{ + t2 := &BaseTable{ Name: sqlparser.NewIdentifierCS("t2"), Keyspace: ks, } want := &KeyspaceSchema{ Keyspace: ks, ForeignKeyMode: vschemapb.Keyspace_unmanaged, - Tables: map[string]*Table{ + Tables: map[string]*BaseTable{ "t1": t1, "t2": t2, }, @@ -2929,7 +2929,7 @@ func TestVSchemaJSON(t *testing.T) { Keyspace: &Keyspace{ Name: "k1", }, - Tables: map[string]*Table{ + Tables: map[string]*BaseTable{ "t1": { Name: sqlparser.NewIdentifierCS("n1"), Columns: []Column{{ @@ -2952,7 +2952,7 @@ func TestVSchemaJSON(t *testing.T) { Name: "k2", Sharded: true, }, - Tables: map[string]*Table{ + Tables: map[string]*BaseTable{ "t3": { Name: sqlparser.NewIdentifierCS("n3"), ColumnVindexes: []*ColumnVindex{{ @@ -3043,7 +3043,7 @@ func TestFindSingleKeyspace(t *testing.T) { }, } vschema := BuildVSchema(&input, sqlparser.NewTestParser()) - none := &Table{ + none := &BaseTable{ Name: sqlparser.NewIdentifierCS("none"), Keyspace: &Keyspace{ Name: "ksa", @@ -3194,7 +3194,7 @@ func TestSourceTableHasReferencedBy(t *testing.T) { require.NoError(t, err) src, err := vs.FindTable("unsharded", "src") require.NoError(t, err) - require.Equal(t, src.ReferencedBy, map[string]*Table{ + require.Equal(t, src.ReferencedBy, map[string]*BaseTable{ "sharded1": ref1, "sharded2": ref2, }) @@ -3415,6 +3415,94 @@ func TestGlobalTables(t *testing.T) { assert.NotNil(t, tbl) } +// TestAddingAdditionalTablesToGlobalRouting tests that views are added to the global routing which are unique. +func TestAddingAdditionalTablesToGlobalRouting(t *testing.T) { + input := &vschemapb.SrvVSchema{ + Keyspaces: map[string]*vschemapb.Keyspace{ + "unsharded": { + Sharded: false, + Tables: map[string]*vschemapb.Table{"t1": {}}, + }, + "sharded": { + Sharded: true, + Tables: map[string]*vschemapb.Table{"t1": {Type: "reference"}}, + }, + }, + } + + v1Stmt, err := sqlparser.NewTestParser().Parse("select 1 from t1") + require.NoError(t, err) + + v2Stmt, err := sqlparser.NewTestParser().Parse("select 1 from t2") + require.NoError(t, err) + + v3Stmt, err := sqlparser.NewTestParser().Parse("select 1 from t3") + require.NoError(t, err) + + vs := BuildVSchema(input, sqlparser.NewTestParser()) + vs.Keyspaces["unsharded"].Views = map[string]*View{ + "v1": { + Name: "v1", + Keyspace: vs.Keyspaces["unsharded"].Keyspace, + Statement: v1Stmt.(*sqlparser.Select), + }, + "v2": { + Name: "v2", + Keyspace: vs.Keyspaces["unsharded"].Keyspace, + Statement: v2Stmt.(*sqlparser.Select), + }, + } + vs.Keyspaces["sharded"].Views = map[string]*View{ + "v2": { + Name: "v2", + Keyspace: vs.Keyspaces["sharded"].Keyspace, + Statement: v2Stmt.(*sqlparser.Select), + }, + "v3": { + Name: "v3", + Keyspace: vs.Keyspaces["sharded"].Keyspace, + Statement: v3Stmt.(*sqlparser.Select), + }, + } + + // before adding to global tables, the views should not be found. + require.Nil(t, + vs.FindView("", "v1")) + require.Nil(t, + vs.FindView("", "v2")) + require.Nil(t, + vs.FindView("", "v3")) + + AddAdditionalGlobalTables(input, vs) + + // without keyspace will be checked on global table. + // v1 and v3 are unique so they should be discovered using the global tables. + require.NotNil(t, + vs.FindView("", "v1")) + require.Nil(t, + vs.FindView("", "v2")) + require.NotNil(t, + vs.FindView("", "v3")) + + // providing the keyspace qualifier will check the keyspace specific views. + + // unsharded check + require.NotNil(t, + vs.FindView("unsharded", "v1")) + require.NotNil(t, + vs.FindView("unsharded", "v2")) + require.Nil(t, + vs.FindView("unsharded", "v3")) + + // sharded check + require.Nil(t, + vs.FindView("sharded", "v1")) + require.NotNil(t, + vs.FindView("sharded", "v2")) + require.NotNil(t, + vs.FindView("sharded", "v3")) +} + func vindexNames(vindexes []*ColumnVindex) (result []string) { for _, vindex := range vindexes { result = append(result, vindex.Name) diff --git a/go/vt/vtgate/vschema_manager.go b/go/vt/vtgate/vschema_manager.go index e73bff4c196..7a1c5ee1d24 100644 --- a/go/vt/vtgate/vschema_manager.go +++ b/go/vt/vtgate/vschema_manager.go @@ -222,20 +222,14 @@ func (vm *VSchemaManager) updateViewInfo(ks *vindexes.KeyspaceSchema, ksName str if views == nil { return } - ks.Views = make(map[string]sqlparser.TableStatement, len(views)) + ks.Views = make(map[string]*vindexes.View, len(views)) for name, def := range views { - ks.Views[name] = sqlparser.Clone(def) - vTbl, ok := ks.Tables[name] - if ok { - vTbl.Type = vindexes.TypeView - } else { - // Adding view to the VSchema as a table. - ks.Tables[name] = &vindexes.Table{ - Type: vindexes.TypeView, - Name: sqlparser.NewIdentifierCS(name), - Keyspace: ks.Keyspace, - } + v := &vindexes.View{ + Name: name, + Keyspace: ks.Keyspace, + Statement: def, } + ks.Views[name] = v } } @@ -353,11 +347,11 @@ func addCrossEdges(g *graph.Graph[string], from []string, to []string) { } } -func setColumns(ks *vindexes.KeyspaceSchema, tblName string, columns []vindexes.Column) *vindexes.Table { +func setColumns(ks *vindexes.KeyspaceSchema, tblName string, columns []vindexes.Column) *vindexes.BaseTable { vTbl := ks.Tables[tblName] if vTbl == nil { // a table that is unknown by the vschema. we add it as a normal table - ks.Tables[tblName] = &vindexes.Table{ + ks.Tables[tblName] = &vindexes.BaseTable{ Name: sqlparser.NewIdentifierCS(tblName), Keyspace: ks.Keyspace, Columns: columns, diff --git a/go/vt/vtgate/vschema_manager_test.go b/go/vt/vtgate/vschema_manager_test.go index b4b7a20804f..42515d59788 100644 --- a/go/vt/vtgate/vschema_manager_test.go +++ b/go/vt/vtgate/vschema_manager_test.go @@ -3,6 +3,7 @@ package vtgate import ( "testing" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "vitess.io/vitess/go/test/utils" @@ -27,30 +28,30 @@ func TestVSchemaUpdate(t *testing.T) { Nullable: true, }} ks := &vindexes.Keyspace{Name: "ks"} - tblNoCol := &vindexes.Table{Name: sqlparser.NewIdentifierCS("tbl"), Keyspace: ks, ColumnListAuthoritative: true} - tblCol1 := &vindexes.Table{Name: sqlparser.NewIdentifierCS("tbl"), Keyspace: ks, Columns: cols1, ColumnListAuthoritative: true} - tblCol2 := &vindexes.Table{Name: sqlparser.NewIdentifierCS("tbl"), Keyspace: ks, Columns: cols2, ColumnListAuthoritative: true} - tblCol2NA := &vindexes.Table{Name: sqlparser.NewIdentifierCS("tbl"), Keyspace: ks, Columns: cols2} + tblNoCol := &vindexes.BaseTable{Name: sqlparser.NewIdentifierCS("tbl"), Keyspace: ks, ColumnListAuthoritative: true} + tblCol1 := &vindexes.BaseTable{Name: sqlparser.NewIdentifierCS("tbl"), Keyspace: ks, Columns: cols1, ColumnListAuthoritative: true} + tblCol2 := &vindexes.BaseTable{Name: sqlparser.NewIdentifierCS("tbl"), Keyspace: ks, Columns: cols2, ColumnListAuthoritative: true} + tblCol2NA := &vindexes.BaseTable{Name: sqlparser.NewIdentifierCS("tbl"), Keyspace: ks, Columns: cols2} - vindexTable_multicol_t1 := &vindexes.Table{ + vindexTable_multicol_t1 := &vindexes.BaseTable{ Name: sqlparser.NewIdentifierCS("multicol_t1"), Keyspace: ks, Columns: cols2, ColumnListAuthoritative: true, } - vindexTable_multicol_t2 := &vindexes.Table{ + vindexTable_multicol_t2 := &vindexes.BaseTable{ Name: sqlparser.NewIdentifierCS("multicol_t2"), Keyspace: ks, Columns: cols2, ColumnListAuthoritative: true, } - vindexTable_t1 := &vindexes.Table{ + vindexTable_t1 := &vindexes.BaseTable{ Name: sqlparser.NewIdentifierCS("t1"), Keyspace: ks, Columns: cols1, ColumnListAuthoritative: true, } - vindexTable_t2 := &vindexes.Table{ + vindexTable_t2 := &vindexes.BaseTable{ Name: sqlparser.NewIdentifierCS("t2"), Keyspace: ks, Columns: cols1, @@ -84,7 +85,7 @@ func TestVSchemaUpdate(t *testing.T) { ParentColumns: sqlparserCols1, }) - idxTbl1 := &vindexes.Table{ + idxTbl1 := &vindexes.BaseTable{ Name: sqlparser.NewIdentifierCS("idxTbl1"), Keyspace: ks, ColumnListAuthoritative: true, @@ -94,7 +95,7 @@ func TestVSchemaUpdate(t *testing.T) { {sqlparser.NewColName("c"), sqlparser.NewColName("d")}, }, } - idxTbl2 := &vindexes.Table{ + idxTbl2 := &vindexes.BaseTable{ Name: sqlparser.NewIdentifierCS("idxTbl2"), Keyspace: ks, ColumnListAuthoritative: true, @@ -119,18 +120,18 @@ func TestVSchemaUpdate(t *testing.T) { ColumnListAuthoritative: false, }, }), - expected: makeTestVSchema("ks", false, map[string]*vindexes.Table{"tbl": tblCol2NA}), + expected: makeTestVSchema("ks", false, map[string]*vindexes.BaseTable{"tbl": tblCol2NA}), }, { name: "1 Schematracking- 0 srvVSchema", srvVschema: makeTestSrvVSchema("ks", false, nil), schema: map[string]*vindexes.TableInfo{"tbl": {Columns: cols1}}, - expected: makeTestVSchema("ks", false, map[string]*vindexes.Table{"tbl": tblCol1}), + expected: makeTestVSchema("ks", false, map[string]*vindexes.BaseTable{"tbl": tblCol1}), }, { name: "1 Schematracking - 1 srvVSchema (no columns) not authoritative", srvVschema: makeTestSrvVSchema("ks", false, map[string]*vschemapb.Table{"tbl": {}}), schema: map[string]*vindexes.TableInfo{"tbl": {Columns: cols1}}, // schema will override what srvSchema has. - expected: makeTestVSchema("ks", false, map[string]*vindexes.Table{"tbl": tblCol1}), + expected: makeTestVSchema("ks", false, map[string]*vindexes.BaseTable{"tbl": tblCol1}), }, { name: "1 Schematracking - 1 srvVSchema (have columns) not authoritative", srvVschema: makeTestSrvVSchema("ks", false, map[string]*vschemapb.Table{ @@ -141,7 +142,7 @@ func TestVSchemaUpdate(t *testing.T) { }), schema: map[string]*vindexes.TableInfo{"tbl": {Columns: cols1}}, // schema will override what srvSchema has. - expected: makeTestVSchema("ks", false, map[string]*vindexes.Table{"tbl": tblCol1}), + expected: makeTestVSchema("ks", false, map[string]*vindexes.BaseTable{"tbl": tblCol1}), }, { name: "1 Schematracking - 1 srvVSchema (no columns) authoritative", srvVschema: makeTestSrvVSchema("ks", false, map[string]*vschemapb.Table{"tbl": { @@ -149,7 +150,7 @@ func TestVSchemaUpdate(t *testing.T) { }}), schema: map[string]*vindexes.TableInfo{"tbl": {Columns: cols1}}, // schema will override what srvSchema has. - expected: makeTestVSchema("ks", false, map[string]*vindexes.Table{"tbl": tblNoCol}), + expected: makeTestVSchema("ks", false, map[string]*vindexes.BaseTable{"tbl": tblNoCol}), }, { name: "1 Schematracking - 1 srvVSchema (have columns) authoritative", srvVschema: makeTestSrvVSchema("ks", false, map[string]*vschemapb.Table{ @@ -160,7 +161,7 @@ func TestVSchemaUpdate(t *testing.T) { }), schema: map[string]*vindexes.TableInfo{"tbl": {Columns: cols1}}, // schema tracker will be ignored for authoritative tables. - expected: makeTestVSchema("ks", false, map[string]*vindexes.Table{"tbl": tblCol2}), + expected: makeTestVSchema("ks", false, map[string]*vindexes.BaseTable{"tbl": tblCol2}), }, { name: "srvVschema received as nil", schema: map[string]*vindexes.TableInfo{"tbl": {Columns: cols1}}, @@ -241,7 +242,7 @@ func TestVSchemaUpdate(t *testing.T) { Keyspace: ks, ForeignKeyMode: vschemapb.Keyspace_managed, Vindexes: map[string]vindexes.Vindex{}, - Tables: map[string]*vindexes.Table{ + Tables: map[string]*vindexes.BaseTable{ "t1": vindexTable_t1, "t2": vindexTable_t2, "multicol_t1": vindexTable_multicol_t1, @@ -281,7 +282,7 @@ func TestVSchemaUpdate(t *testing.T) { }, }, srvVschema: makeTestSrvVSchema("ks", false, nil), - expected: makeTestVSchema("ks", false, map[string]*vindexes.Table{"idxTbl1": idxTbl1}), + expected: makeTestVSchema("ks", false, map[string]*vindexes.BaseTable{"idxTbl1": idxTbl1}), }, { name: "indexes in schema using expressions", currentVSchema: &vindexes.VSchema{}, @@ -312,7 +313,7 @@ func TestVSchemaUpdate(t *testing.T) { }, }, srvVschema: makeTestSrvVSchema("ks", false, nil), - expected: makeTestVSchema("ks", false, map[string]*vindexes.Table{"idxTbl2": idxTbl2}), + expected: makeTestVSchema("ks", false, map[string]*vindexes.BaseTable{"idxTbl2": idxTbl2}), }} vm := &VSchemaManager{} @@ -364,11 +365,11 @@ func TestKeyspaceRoutingRules(t *testing.T) { vs := &vindexes.VSchema{ Keyspaces: map[string]*vindexes.KeyspaceSchema{ "ks": { - Tables: map[string]*vindexes.Table{}, + Tables: map[string]*vindexes.BaseTable{}, Keyspace: &vindexes.Keyspace{Name: "ks", Sharded: true}, }, "ks2": { - Tables: map[string]*vindexes.Table{}, + Tables: map[string]*vindexes.BaseTable{}, Keyspace: &vindexes.Keyspace{Name: "ks2", Sharded: true}, }, }, @@ -395,10 +396,10 @@ func TestRebuildVSchema(t *testing.T) { Nullable: true, }} ks := &vindexes.Keyspace{Name: "ks"} - tblNoCol := &vindexes.Table{Name: sqlparser.NewIdentifierCS("tbl"), Keyspace: ks, ColumnListAuthoritative: true} - tblCol1 := &vindexes.Table{Name: sqlparser.NewIdentifierCS("tbl"), Keyspace: ks, Columns: cols1, ColumnListAuthoritative: true} - tblCol2 := &vindexes.Table{Name: sqlparser.NewIdentifierCS("tbl"), Keyspace: ks, Columns: cols2, ColumnListAuthoritative: true} - tblCol2NA := &vindexes.Table{Name: sqlparser.NewIdentifierCS("tbl"), Keyspace: ks, Columns: cols2} + tblNoCol := &vindexes.BaseTable{Name: sqlparser.NewIdentifierCS("tbl"), Keyspace: ks, ColumnListAuthoritative: true} + tblCol1 := &vindexes.BaseTable{Name: sqlparser.NewIdentifierCS("tbl"), Keyspace: ks, Columns: cols1, ColumnListAuthoritative: true} + tblCol2 := &vindexes.BaseTable{Name: sqlparser.NewIdentifierCS("tbl"), Keyspace: ks, Columns: cols2, ColumnListAuthoritative: true} + tblCol2NA := &vindexes.BaseTable{Name: sqlparser.NewIdentifierCS("tbl"), Keyspace: ks, Columns: cols2} tcases := []struct { name string @@ -413,18 +414,18 @@ func TestRebuildVSchema(t *testing.T) { ColumnListAuthoritative: false, }, }), - expected: makeTestVSchema("ks", false, map[string]*vindexes.Table{"tbl": tblCol2NA}), + expected: makeTestVSchema("ks", false, map[string]*vindexes.BaseTable{"tbl": tblCol2NA}), }, { name: "1 Schematracking- 0 srvVSchema", srvVschema: makeTestSrvVSchema("ks", false, nil), schema: map[string]*vindexes.TableInfo{"tbl": {Columns: cols1}}, - expected: makeTestVSchema("ks", false, map[string]*vindexes.Table{"tbl": tblCol1}), + expected: makeTestVSchema("ks", false, map[string]*vindexes.BaseTable{"tbl": tblCol1}), }, { name: "1 Schematracking - 1 srvVSchema (no columns) not authoritative", srvVschema: makeTestSrvVSchema("ks", false, map[string]*vschemapb.Table{"tbl": {}}), schema: map[string]*vindexes.TableInfo{"tbl": {Columns: cols1}}, // schema will override what srvSchema has. - expected: makeTestVSchema("ks", false, map[string]*vindexes.Table{"tbl": tblCol1}), + expected: makeTestVSchema("ks", false, map[string]*vindexes.BaseTable{"tbl": tblCol1}), }, { name: "1 Schematracking - 1 srvVSchema (have columns) not authoritative", srvVschema: makeTestSrvVSchema("ks", false, map[string]*vschemapb.Table{ @@ -435,7 +436,7 @@ func TestRebuildVSchema(t *testing.T) { }), schema: map[string]*vindexes.TableInfo{"tbl": {Columns: cols1}}, // schema will override what srvSchema has. - expected: makeTestVSchema("ks", false, map[string]*vindexes.Table{"tbl": tblCol1}), + expected: makeTestVSchema("ks", false, map[string]*vindexes.BaseTable{"tbl": tblCol1}), }, { name: "1 Schematracking - 1 srvVSchema (no columns) authoritative", srvVschema: makeTestSrvVSchema("ks", false, map[string]*vschemapb.Table{"tbl": { @@ -443,7 +444,7 @@ func TestRebuildVSchema(t *testing.T) { }}), schema: map[string]*vindexes.TableInfo{"tbl": {Columns: cols1}}, // schema will override what srvSchema has. - expected: makeTestVSchema("ks", false, map[string]*vindexes.Table{"tbl": tblNoCol}), + expected: makeTestVSchema("ks", false, map[string]*vindexes.BaseTable{"tbl": tblNoCol}), }, { name: "1 Schematracking - 1 srvVSchema (have columns) authoritative", srvVschema: makeTestSrvVSchema("ks", false, map[string]*vschemapb.Table{ @@ -454,7 +455,7 @@ func TestRebuildVSchema(t *testing.T) { }), schema: map[string]*vindexes.TableInfo{"tbl": {Columns: cols1}}, // schema tracker will be ignored for authoritative tables. - expected: makeTestVSchema("ks", false, map[string]*vindexes.Table{"tbl": tblCol2}), + expected: makeTestVSchema("ks", false, map[string]*vindexes.BaseTable{"tbl": tblCol2}), }, { name: "srvVschema received as nil", schema: map[string]*vindexes.TableInfo{"tbl": {Columns: cols1}}, @@ -506,7 +507,7 @@ func TestVSchemaUDFsUpdate(t *testing.T) { "ks": { Keyspace: ks, ForeignKeyMode: vschemapb.Keyspace_unmanaged, - Tables: map[string]*vindexes.Table{}, + Tables: map[string]*vindexes.BaseTable{}, Vindexes: map[string]vindexes.Vindex{}, AggregateUDFs: []string{"udf1", "udf2"}, }, @@ -515,6 +516,40 @@ func TestVSchemaUDFsUpdate(t *testing.T) { utils.MustMatch(t, vs, vm.currentVschema, "currentVschema does not match Vschema") } +// TestVSchemaViewsUpdate tests that the views are updated in the VSchema. +func TestVSchemaViewsUpdate(t *testing.T) { + vm := &VSchemaManager{} + var vs *vindexes.VSchema + vm.subscriber = func(vschema *vindexes.VSchema, _ *VSchemaStats) { + vs = vschema + vs.ResetCreated() + } + vm.schema = &fakeSchema{v: map[string]sqlparser.TableStatement{ + "v1": &sqlparser.Select{ + From: sqlparser.TableExprs{sqlparser.NewAliasedTableExpr(sqlparser.NewTableName("t1"), "")}, + SelectExprs: sqlparser.SelectExprs{sqlparser.NewAliasedExpr(sqlparser.NewIntLiteral("1"), "")}, + }, + "v2": &sqlparser.Select{ + From: sqlparser.TableExprs{sqlparser.NewAliasedTableExpr(sqlparser.NewTableName("t2"), "")}, + SelectExprs: sqlparser.SelectExprs{sqlparser.NewAliasedExpr(sqlparser.NewIntLiteral("2"), "")}, + }, + }} + vm.VSchemaUpdate(&vschemapb.SrvVSchema{ + Keyspaces: map[string]*vschemapb.Keyspace{ + "ks": {Sharded: true}, + }, + }, nil) + + // find in views map + assert.NotNil(t, vs.FindView("ks", "v1")) + assert.NotNil(t, vs.FindView("ks", "v2")) + // find in global table + assert.NotNil(t, vs.FindView("", "v1")) + assert.NotNil(t, vs.FindView("", "v2")) + + utils.MustMatch(t, vs, vm.currentVschema, "currentVschema does not match Vschema") +} + func TestMarkErrorIfCyclesInFk(t *testing.T) { ksName := "ks" keyspace := &vindexes.Keyspace{ @@ -532,7 +567,7 @@ func TestMarkErrorIfCyclesInFk(t *testing.T) { Keyspaces: map[string]*vindexes.KeyspaceSchema{ ksName: { ForeignKeyMode: vschemapb.Keyspace_managed, - Tables: map[string]*vindexes.Table{ + Tables: map[string]*vindexes.BaseTable{ "t1": { Name: sqlparser.NewIdentifierCS("t1"), Keyspace: keyspace, @@ -563,7 +598,7 @@ func TestMarkErrorIfCyclesInFk(t *testing.T) { Keyspaces: map[string]*vindexes.KeyspaceSchema{ ksName: { ForeignKeyMode: vschemapb.Keyspace_managed, - Tables: map[string]*vindexes.Table{ + Tables: map[string]*vindexes.BaseTable{ "t1": { Name: sqlparser.NewIdentifierCS("t1"), Keyspace: keyspace, @@ -594,7 +629,7 @@ func TestMarkErrorIfCyclesInFk(t *testing.T) { Keyspaces: map[string]*vindexes.KeyspaceSchema{ ksName: { ForeignKeyMode: vschemapb.Keyspace_managed, - Tables: map[string]*vindexes.Table{ + Tables: map[string]*vindexes.BaseTable{ "t1": { Name: sqlparser.NewIdentifierCS("t1"), Keyspace: keyspace, @@ -623,7 +658,7 @@ func TestMarkErrorIfCyclesInFk(t *testing.T) { Keyspaces: map[string]*vindexes.KeyspaceSchema{ ksName: { ForeignKeyMode: vschemapb.Keyspace_managed, - Tables: map[string]*vindexes.Table{ + Tables: map[string]*vindexes.BaseTable{ "t1": { Name: sqlparser.NewIdentifierCS("t1"), Keyspace: keyspace, @@ -651,7 +686,7 @@ func TestMarkErrorIfCyclesInFk(t *testing.T) { Keyspaces: map[string]*vindexes.KeyspaceSchema{ ksName: { ForeignKeyMode: vschemapb.Keyspace_managed, - Tables: map[string]*vindexes.Table{ + Tables: map[string]*vindexes.BaseTable{ "t1": { Name: sqlparser.NewIdentifierCS("t1"), Keyspace: keyspace, @@ -679,7 +714,7 @@ func TestMarkErrorIfCyclesInFk(t *testing.T) { Keyspaces: map[string]*vindexes.KeyspaceSchema{ ksName: { ForeignKeyMode: vschemapb.Keyspace_managed, - Tables: map[string]*vindexes.Table{ + Tables: map[string]*vindexes.BaseTable{ "t1": { Name: sqlparser.NewIdentifierCS("t1"), Keyspace: keyspace, @@ -726,7 +761,7 @@ func TestMarkErrorIfCyclesInFk(t *testing.T) { Keyspaces: map[string]*vindexes.KeyspaceSchema{ ksName: { ForeignKeyMode: vschemapb.Keyspace_managed, - Tables: map[string]*vindexes.Table{ + Tables: map[string]*vindexes.BaseTable{ "t1": { Name: sqlparser.NewIdentifierCS("t1"), Keyspace: keyspace, @@ -768,13 +803,13 @@ func TestVSchemaUpdateWithFKReferenceToInternalTables(t *testing.T) { }} sqlparserCols1 := sqlparser.MakeColumns("id") - vindexTable_t1 := &vindexes.Table{ + vindexTable_t1 := &vindexes.BaseTable{ Name: sqlparser.NewIdentifierCS("t1"), Keyspace: ks, Columns: cols1, ColumnListAuthoritative: true, } - vindexTable_t2 := &vindexes.Table{ + vindexTable_t2 := &vindexes.BaseTable{ Name: sqlparser.NewIdentifierCS("t2"), Keyspace: ks, Columns: cols1, @@ -830,7 +865,7 @@ func TestVSchemaUpdateWithFKReferenceToInternalTables(t *testing.T) { Keyspace: ks, ForeignKeyMode: vschemapb.Keyspace_managed, Vindexes: map[string]vindexes.Vindex{}, - Tables: map[string]*vindexes.Table{ + Tables: map[string]*vindexes.BaseTable{ "t1": vindexTable_t1, "t2": vindexTable_t2, }, @@ -854,7 +889,7 @@ func createFkDefinition(childCols []string, parentTableName string, parentCols [ } } -func makeTestVSchema(ks string, sharded bool, tbls map[string]*vindexes.Table) *vindexes.VSchema { +func makeTestVSchema(ks string, sharded bool, tbls map[string]*vindexes.BaseTable) *vindexes.VSchema { keyspaceSchema := &vindexes.KeyspaceSchema{ Keyspace: &vindexes.Keyspace{ Name: ks, @@ -893,6 +928,7 @@ func makeTestSrvVSchema(ks string, sharded bool, tbls map[string]*vschemapb.Tabl type fakeSchema struct { t map[string]*vindexes.TableInfo + v map[string]sqlparser.TableStatement udfs []string } @@ -901,7 +937,7 @@ func (f *fakeSchema) Tables(string) map[string]*vindexes.TableInfo { } func (f *fakeSchema) Views(string) map[string]sqlparser.TableStatement { - return nil + return f.v } func (f *fakeSchema) UDFs(string) []string { return f.udfs } diff --git a/go/vt/vttablet/tabletserver/vstreamer/local_vschema.go b/go/vt/vttablet/tabletserver/vstreamer/local_vschema.go index abcdf840e84..e6f8128cc3f 100644 --- a/go/vt/vttablet/tabletserver/vstreamer/local_vschema.go +++ b/go/vt/vttablet/tabletserver/vstreamer/local_vschema.go @@ -65,7 +65,7 @@ func (lvs *localVSchema) FindOrCreateVindex(qualifiedName string) (vindexes.Vind return vindexes.CreateVindex(name, name, map[string]string{}) } -func (lvs *localVSchema) findTable(tablename string) (*vindexes.Table, error) { +func (lvs *localVSchema) findTable(tablename string) (*vindexes.BaseTable, error) { ks, ok := lvs.vschema.Keyspaces[lvs.keyspace] if !ok { return nil, fmt.Errorf("keyspace %s not found in vschema", lvs.keyspace) From 747c3089c8055c8978d2259349e5c4fa460f7893 Mon Sep 17 00:00:00 2001 From: wiebeytec Date: Wed, 5 Feb 2025 18:01:53 +0100 Subject: [PATCH 2/8] Don't exit tablet server on reloading invalid ACL (#17485) Signed-off-by: Wiebe Cazemier Signed-off-by: Matt Lord Co-authored-by: Matt Lord --- changelog/22.0/22.0.0/summary.md | 5 ++ go/cmd/vttablet/cli/cli.go | 5 +- go/vt/tableacl/tableacl.go | 4 +- go/vt/vttablet/tabletserver/tabletserver.go | 24 +++---- .../tabletserver/tabletserver_test.go | 66 +++++++++++++++---- 5 files changed, 76 insertions(+), 28 deletions(-) diff --git a/changelog/22.0/22.0.0/summary.md b/changelog/22.0/22.0.0/summary.md index f773df2b10c..c8ba10f995e 100644 --- a/changelog/22.0/22.0.0/summary.md +++ b/changelog/22.0/22.0.0/summary.md @@ -19,6 +19,7 @@ - **[Support for Filtering Query logs on Error](#query-logs)** - **[Minor Changes](#minor-changes)** - **[VTTablet Flags](#flags-vttablet)** + - **[VTTablet ACL enforcement and reloading](#reloading-vttablet-acl)** - **[Topology read concurrency behaviour changes](#topo-read-concurrency-changes)** - **[VTAdmin](#vtadmin)** - [Updated to node v22.13.1](#updated-node) @@ -155,6 +156,10 @@ While the flag will continue to accept float values (interpreted as seconds) for - `--consolidator-query-waiter-cap` flag to set the maximum number of clients allowed to wait on the consolidator. The default value is set to 0 for unlimited wait. Users can adjust this value based on the performance of VTTablet to avoid excessive memory usage and the risk of being OOMKilled, particularly in Kubernetes deployments. +#### VTTablet ACL enforcement and reloading + +When a tablet is started with `--enforce-tableacl-config` it will exit with an error if the contents of the file are not valid. After the changes made in https://github.com/vitessio/vitess/pull/17485 the tablet will no longer exit when reloading the contents of the file after receiving a SIGHUP. When the file contents are invalid on reload the tablet will now log an error and the active in-memory ACLs remain in effect. + ### `--topo_read_concurrency` behaviour changes The `--topo_read_concurrency` flag was added to all components that access the topology and the provided limit is now applied separately for each global or local cell _(default `32`)_. diff --git a/go/cmd/vttablet/cli/cli.go b/go/cmd/vttablet/cli/cli.go index 3b77b43d9cb..e48a11c79dc 100644 --- a/go/cmd/vttablet/cli/cli.go +++ b/go/cmd/vttablet/cli/cli.go @@ -248,7 +248,10 @@ func createTabletServer(ctx context.Context, env *vtenv.Environment, config *tab addStatusParts(qsc) }) servenv.OnClose(qsc.StopService) - qsc.InitACL(tableACLConfig, enforceTableACLConfig, tableACLConfigReloadInterval) + err := qsc.InitACL(tableACLConfig, tableACLConfigReloadInterval) + if err != nil && enforceTableACLConfig { + return nil, fmt.Errorf("failed to initialize table acl: %w", err) + } return qsc, nil } diff --git a/go/vt/tableacl/tableacl.go b/go/vt/tableacl/tableacl.go index 1b236cb1812..9d6762b4adb 100644 --- a/go/vt/tableacl/tableacl.go +++ b/go/vt/tableacl/tableacl.go @@ -107,14 +107,14 @@ func (tacl *tableACL) init(configFile string, aclCB func()) error { } data, err := os.ReadFile(configFile) if err != nil { - log.Infof("unable to read tableACL config file: %v Error: %v", configFile, err) + log.Errorf("unable to read tableACL config file: %v Error: %v", configFile, err) return err } config := &tableaclpb.Config{} if err := config.UnmarshalVT(data); err != nil { // try to parse tableacl as json file if jsonErr := json2.UnmarshalPB(data, config); jsonErr != nil { - log.Infof("unable to parse tableACL config file as a protobuf or json file. protobuf err: %v json err: %v", err, jsonErr) + log.Errorf("unable to parse tableACL config file as a protobuf or json file. protobuf err: %v json err: %v", err, jsonErr) return fmt.Errorf("unable to unmarshal Table ACL data: %s", data) } } diff --git a/go/vt/vttablet/tabletserver/tabletserver.go b/go/vt/vttablet/tabletserver/tabletserver.go index b65b3949354..53322384bdc 100644 --- a/go/vt/vttablet/tabletserver/tabletserver.go +++ b/go/vt/vttablet/tabletserver/tabletserver.go @@ -361,31 +361,32 @@ func (tsv *TabletServer) SetQueryRules(ruleSource string, qrs *rules.Rules) erro return nil } -func (tsv *TabletServer) initACL(tableACLConfigFile string, enforceTableACLConfig bool) { +func (tsv *TabletServer) initACL(tableACLConfigFile string) error { // tabletacl.Init loads ACL from file if *tableACLConfig is not empty - err := tableacl.Init( + return tableacl.Init( tableACLConfigFile, func() { tsv.ClearQueryPlanCache() }, ) - if err != nil { - log.Errorf("Fail to initialize Table ACL: %v", err) - if enforceTableACLConfig { - log.Exit("Need a valid initial Table ACL when enforce-tableacl-config is set, exiting.") - } - } } // InitACL loads the table ACL and sets up a SIGHUP handler for reloading it. -func (tsv *TabletServer) InitACL(tableACLConfigFile string, enforceTableACLConfig bool, reloadACLConfigFileInterval time.Duration) { - tsv.initACL(tableACLConfigFile, enforceTableACLConfig) +func (tsv *TabletServer) InitACL(tableACLConfigFile string, reloadACLConfigFileInterval time.Duration) error { + if err := tsv.initACL(tableACLConfigFile); err != nil { + return err + } sigChan := make(chan os.Signal, 1) signal.Notify(sigChan, syscall.SIGHUP) go func() { for range sigChan { - tsv.initACL(tableACLConfigFile, enforceTableACLConfig) + err := tsv.initACL(tableACLConfigFile) + if err != nil { + log.Errorf("Error reloading ACL config file %s in SIGHUP handler: %v", tableACLConfigFile, err) + } else { + log.Info("Successfully reloaded ACL file %s in SIGHUP handler", tableACLConfigFile) + } } }() @@ -397,6 +398,7 @@ func (tsv *TabletServer) InitACL(tableACLConfigFile string, enforceTableACLConfi } }() } + return nil } // SetServingType changes the serving type of the tabletserver. It starts or diff --git a/go/vt/vttablet/tabletserver/tabletserver_test.go b/go/vt/vttablet/tabletserver/tabletserver_test.go index e4faf4ee6c9..ef79560ca8f 100644 --- a/go/vt/vttablet/tabletserver/tabletserver_test.go +++ b/go/vt/vttablet/tabletserver/tabletserver_test.go @@ -2155,6 +2155,16 @@ var aclJSON2 = `{ } ] }` +var aclJSONOverlapError = `{ + "table_groups": [ + { + "name": "group02", + "table_names_or_prefixes": ["test_table2", "test_table2"], + "readers": ["vt2"], + "admins": ["vt2"] + } + ] + }` func TestACLHUP(t *testing.T) { ctx, cancel := context.WithCancel(context.Background()) @@ -2168,12 +2178,23 @@ func TestACLHUP(t *testing.T) { require.NoError(t, err) defer os.Remove(f.Name()) + // We need to confirm this ACL JSON is broken first, for later use. + _, err = io.WriteString(f, aclJSONOverlapError) + require.NoError(t, err) + err = f.Close() + require.NoError(t, err) + err = tsv.InitACL(f.Name(), 0) + require.Error(t, err) + + f, err = os.Create(f.Name()) + require.NoError(t, err) _, err = io.WriteString(f, aclJSON1) require.NoError(t, err) err = f.Close() require.NoError(t, err) - tsv.InitACL(f.Name(), true, 0) + err = tsv.InitACL(f.Name(), 0) + require.NoError(t, err) groups1 := tableacl.GetCurrentConfig().TableGroups if name1 := groups1[0].GetName(); name1 != "group01" { @@ -2188,20 +2209,37 @@ func TestACLHUP(t *testing.T) { syscall.Kill(syscall.Getpid(), syscall.SIGHUP) time.Sleep(100 * time.Millisecond) // wait for signal handler - groups2 := tableacl.GetCurrentConfig().TableGroups - if len(groups2) != 1 { - t.Fatalf("Expected only one table group") - } - group2 := groups2[0] - if name2 := group2.GetName(); name2 != "group02" { - t.Fatalf("Expected name 'group02', got '%s'", name2) - } - if group2.GetAdmins() == nil { - t.Fatalf("Expected 'admins' to exist, but it didn't") - } - if group2.GetWriters() != nil { - t.Fatalf("Expected 'writers' to not exist, got '%s'", group2.GetWriters()) + test_loaded_acl := func() { + groups2 := tableacl.GetCurrentConfig().TableGroups + if len(groups2) != 1 { + t.Fatalf("Expected only one table group") + } + group2 := groups2[0] + if name2 := group2.GetName(); name2 != "group02" { + t.Fatalf("Expected name 'group02', got '%s'", name2) + } + if group2.GetAdmins() == nil { + t.Fatalf("Expected 'admins' to exist, but it didn't") + } + if group2.GetWriters() != nil { + t.Fatalf("Expected 'writers' to not exist, got '%s'", group2.GetWriters()) + } } + + test_loaded_acl() + + // Now try to reload an invalid ACL and see if we are still operating with the same ACL config as before. + + f, err = os.Create(f.Name()) + require.NoError(t, err) + _, err = io.WriteString(f, aclJSONOverlapError) + require.NoError(t, err) + + syscall.Kill(syscall.Getpid(), syscall.SIGHUP) + time.Sleep(100 * time.Millisecond) // wait for signal handler + + test_loaded_acl() + } func TestConfigChanges(t *testing.T) { From cf28afab4e99c6aadea822734cb832852d4c0063 Mon Sep 17 00:00:00 2001 From: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> Date: Thu, 6 Feb 2025 09:07:02 +0200 Subject: [PATCH 3/8] Online DDL: removal of `gh-ost` and `pt-osc` strategies (#17626) Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> --- changelog/22.0/22.0.0/summary.md | 16 + go/cmd/vtctldclient/command/schema.go | 4 +- go/flags/endtoend/vtcombo.txt | 2 - go/flags/endtoend/vttablet.txt | 2 - go/vt/proto/vtctldata/vtctldata.pb.go | 4603 ++++++++--------- go/vt/schema/ddl_strategy.go | 10 +- go/vt/schema/ddl_strategy_test.go | 45 +- go/vt/schema/online_ddl_test.go | 2 +- go/vt/schemamanager/tablet_executor_test.go | 21 +- go/vt/vtctl/schematools/schematools.go | 14 - go/vt/vtctl/schematools/schematools_test.go | 8 - go/vt/vtctl/vtctl.go | 4 +- go/vt/vttablet/onlineddl/executor.go | 769 +-- go/vt/vttablet/onlineddl/schema.go | 26 - go/vt/vttablet/onlineddl/util.go | 86 - go/vt/vttablet/onlineddl/util_test.go | 32 - go/vt/vttablet/onlineddl/vrepl.go | 4 - .../tabletmanager/vreplication/vreplicator.go | 3 +- go/vt/vttablet/tabletserver/tabletserver.go | 13 - .../tabletserver/throttle/throttlerapp/app.go | 2 - .../tabletserver/vstreamer/vstreamer.go | 2 +- proto/vtctldata.proto | 4 +- web/vtadmin/src/proto/vtadmin.d.ts | 2 - web/vtadmin/src/proto/vtadmin.js | 14 - 24 files changed, 2350 insertions(+), 3338 deletions(-) delete mode 100644 go/vt/vttablet/onlineddl/util.go delete mode 100644 go/vt/vttablet/onlineddl/util_test.go diff --git a/changelog/22.0/22.0.0/summary.md b/changelog/22.0/22.0.0/summary.md index c8ba10f995e..1e7d713b60e 100644 --- a/changelog/22.0/22.0.0/summary.md +++ b/changelog/22.0/22.0.0/summary.md @@ -5,6 +5,7 @@ - **[Major Changes](#major-changes)** - **[Deprecations and Deletions](#deprecations-and-deletions)** - [Deprecated VTTablet Flags](#vttablet-flags) + - [Removing gh-ost and pt-osc Online DDL strategies](#ghost-ptosc) - **[RPC Changes](#rpc-changes)** - **[Prefer not promoting a replica that is currently taking a backup](#reparents-prefer-not-backing-up)** - **[VTOrc Config File Changes](#vtorc-config-file-changes)** @@ -38,6 +39,21 @@ These are the RPC changes made in this release - - `twopc_enable` flag is deprecated. Usage of TwoPC commit will be determined by the `transaction_mode` set on VTGate via flag or session variable. +#### Removing gh-ost and pt-osc Online DDL strategies + +Vitess no longer recognizes the `gh-ost` and `pt-osc` (`pt-online-schema-change`) Online DDL strategies. The `vitess` strategy is the recommended way to make schema changes at scale. `mysql` and `direct` strategies continue to be supported. + +These `vttablet` flags have been removed: + +- `--gh-ost-path` +- `--pt-osc-path` + +The use of `gh-ost` and `pt-osc` as strategies as follows, yields an error: +```sh +$ vtctldclient ApplySchema --ddl-strategy="gh-ost" ... +$ vtctldclient ApplySchema --ddl-strategy="pt-osc" ... +``` + ### Prefer not promoting a replica that is currently taking a backup Emergency reparents now prefer not promoting replicas that are currently taking backups with a backup engine other than diff --git a/go/cmd/vtctldclient/command/schema.go b/go/cmd/vtctldclient/command/schema.go index 21a995f30a1..6a36868d2b3 100644 --- a/go/cmd/vtctldclient/command/schema.go +++ b/go/cmd/vtctldclient/command/schema.go @@ -45,7 +45,7 @@ var ( Long: `Applies the schema change to the specified keyspace on every primary, running in parallel on all shards. The changes are then propagated to replicas via replication. If --allow-long-unavailability is set, schema changes affecting a large number of rows (and possibly incurring a longer period of unavailability) will not be rejected. ---ddl-strategy is used to instruct migrations via vreplication, gh-ost or pt-osc with optional parameters. +--ddl-strategy is used to instruct migrations via vreplication, mysql or direct with optional parameters. --migration-context allows the user to specify a custom migration context for online DDL migrations. If --skip-preflight, SQL goes directly to shards without going through sanity checks. @@ -430,7 +430,7 @@ func commandValidateSchemaShard(cmd *cobra.Command, args []string) error { } func init() { - ApplySchema.Flags().StringVar(&applySchemaOptions.DDLStrategy, "ddl-strategy", string(schema.DDLStrategyDirect), "Online DDL strategy, compatible with @@ddl_strategy session variable (examples: 'gh-ost', 'pt-osc', 'gh-ost --max-load=Threads_running=100'.") + ApplySchema.Flags().StringVar(&applySchemaOptions.DDLStrategy, "ddl-strategy", string(schema.DDLStrategyDirect), "Online DDL strategy, compatible with @@ddl_strategy session variable (examples: 'direct', 'mysql', 'vitess --postpone-completion'.") ApplySchema.Flags().StringSliceVar(&applySchemaOptions.UUIDList, "uuid", nil, "Optional, comma-delimited, repeatable, explicit UUIDs for migration. If given, must match number of DDL changes.") ApplySchema.Flags().StringVar(&applySchemaOptions.MigrationContext, "migration-context", "", "For Online DDL, optionally supply a custom unique string used as context for the migration(s) in this command. By default a unique context is auto-generated by Vitess.") ApplySchema.Flags().DurationVar(&applySchemaOptions.WaitReplicasTimeout, "wait-replicas-timeout", grpcvtctldserver.DefaultWaitReplicasTimeout, "Amount of time to wait for replicas to receive the schema change via replication.") diff --git a/go/flags/endtoend/vtcombo.txt b/go/flags/endtoend/vtcombo.txt index 3ae0cbc9b77..45ca4ee2a08 100644 --- a/go/flags/endtoend/vtcombo.txt +++ b/go/flags/endtoend/vtcombo.txt @@ -136,7 +136,6 @@ Flags: --gate_query_cache_memory int gate server query cache size in bytes, maximum amount of memory to be cached. vtgate analyzes every incoming query and generate a query plan, these plans are being cached in a lru cache. This config controls the capacity of the lru cache. (default 33554432) --gc_check_interval duration Interval between garbage collection checks (default 1h0m0s) --gc_purge_check_interval duration Interval between purge discovery checks (default 1m0s) - --gh-ost-path string override default gh-ost binary full path (default "gh-ost") --grpc-send-session-in-streaming If set, will send the session as last packet in streaming api to support transactions in streaming --grpc-use-effective-groups If set, and SSL is not used, will set the immediate caller's security groups from the effective caller id's groups. --grpc-use-static-authentication-callerid If set, will set the immediate caller id to the username authenticated by the static auth plugin. @@ -265,7 +264,6 @@ Flags: --proto_topo vttest.TopoData vttest proto definition of the topology, encoded in compact text format. See vttest.proto for more information. --proxy_protocol Enable HAProxy PROXY protocol on MySQL listener socket --proxy_tablets Setting this true will make vtctld proxy the tablet status instead of redirecting to them - --pt-osc-path string override default pt-online-schema-change binary full path (default "/usr/bin/pt-online-schema-change") --publish_retry_interval duration how long vttablet waits to retry publishing the tablet record (default 30s) --purge_logs_interval duration how often try to remove old logs (default 1h0m0s) --query-log-stream-handler string URL handler for streaming queries log (default "/debug/querylog") diff --git a/go/flags/endtoend/vttablet.txt b/go/flags/endtoend/vttablet.txt index 0a9a0ef99ce..a463db305ba 100644 --- a/go/flags/endtoend/vttablet.txt +++ b/go/flags/endtoend/vttablet.txt @@ -162,7 +162,6 @@ Flags: --gc_purge_check_interval duration Interval between purge discovery checks (default 1m0s) --gcs_backup_storage_bucket string Google Cloud Storage bucket to use for backups. --gcs_backup_storage_root string Root prefix for all backup-related object names. - --gh-ost-path string override default gh-ost binary full path (default "gh-ost") --grpc-dial-concurrency-limit int Maximum concurrency of grpc dial operations. This should be less than the golang max thread limit of 10000. (default 1024) --grpc_auth_mode string Which auth plugin implementation to use (eg: static) --grpc_auth_mtls_allowed_substrings string List of substrings of at least one of the client certificate names (separated by colon). @@ -259,7 +258,6 @@ Flags: --port int port for the server --pprof strings enable profiling --pprof-http enable pprof http endpoints - --pt-osc-path string override default pt-online-schema-change binary full path (default "/usr/bin/pt-online-schema-change") --publish_retry_interval duration how long vttablet waits to retry publishing the tablet record (default 30s) --purge_logs_interval duration how often try to remove old logs (default 1h0m0s) --query-log-stream-handler string URL handler for streaming queries log (default "/debug/querylog") diff --git a/go/vt/proto/vtctldata/vtctldata.pb.go b/go/vt/proto/vtctldata/vtctldata.pb.go index dc3122d4b5e..ded30cd7f34 100644 --- a/go/vt/proto/vtctldata/vtctldata.pb.go +++ b/go/vt/proto/vtctldata/vtctldata.pb.go @@ -209,8 +209,6 @@ const ( // SchemaMigration_VITESS was also formerly called "ONLINE". SchemaMigration_VITESS SchemaMigration_Strategy = 0 SchemaMigration_ONLINE SchemaMigration_Strategy = 0 - SchemaMigration_GHOST SchemaMigration_Strategy = 1 - SchemaMigration_PTOSC SchemaMigration_Strategy = 2 // SchemaMigration_DIRECT runs the migration directly against MySQL (e.g. `ALTER TABLE ...`), // meaning it is not actually an "online" DDL migration. SchemaMigration_DIRECT SchemaMigration_Strategy = 3 @@ -224,16 +222,12 @@ var ( SchemaMigration_Strategy_name = map[int32]string{ 0: "VITESS", // Duplicate value: 0: "ONLINE", - 1: "GHOST", - 2: "PTOSC", 3: "DIRECT", 4: "MYSQL", } SchemaMigration_Strategy_value = map[string]int32{ "VITESS": 0, "ONLINE": 0, - "GHOST": 1, - "PTOSC": 2, "DIRECT": 3, "MYSQL": 4, } @@ -17123,7 +17117,7 @@ var file_vtctldata_proto_rawDesc = string([]byte{ 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x08, 0x6b, 0x65, - 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0xc0, 0x13, 0x0a, 0x0f, 0x53, 0x63, 0x68, 0x65, 0x6d, + 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0xb6, 0x13, 0x0a, 0x0f, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, @@ -17267,468 +17261,369 @@ var file_vtctldata_proto_rawDesc = string([]byte{ 0x64, 0x5f, 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x36, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4b, 0x65, 0x79, 0x4e, 0x61, 0x6d, 0x65, - 0x73, 0x22, 0x53, 0x0a, 0x08, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x0a, 0x0a, + 0x73, 0x22, 0x49, 0x0a, 0x08, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x0a, 0x0a, 0x06, 0x56, 0x49, 0x54, 0x45, 0x53, 0x53, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x4f, 0x4e, 0x4c, - 0x49, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x47, 0x48, 0x4f, 0x53, 0x54, 0x10, 0x01, - 0x12, 0x09, 0x0a, 0x05, 0x50, 0x54, 0x4f, 0x53, 0x43, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x44, - 0x49, 0x52, 0x45, 0x43, 0x54, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x4d, 0x59, 0x53, 0x51, 0x4c, - 0x10, 0x04, 0x1a, 0x02, 0x10, 0x01, 0x22, 0x71, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0d, 0x0a, - 0x09, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, - 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x4c, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x51, - 0x55, 0x45, 0x55, 0x45, 0x44, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x52, 0x45, 0x41, 0x44, 0x59, - 0x10, 0x04, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x05, 0x12, - 0x0c, 0x0a, 0x08, 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x06, 0x12, 0x0a, 0x0a, - 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x07, 0x22, 0x5e, 0x0a, 0x05, 0x53, 0x68, 0x61, - 0x72, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x0f, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x68, 0x61, - 0x72, 0x64, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x22, 0xda, 0x02, 0x0a, 0x0f, 0x57, 0x6f, - 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1b, 0x0a, - 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x6e, 0x0a, 0x1f, 0x73, 0x68, - 0x61, 0x72, 0x64, 0x65, 0x64, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x69, 0x6e, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, - 0x53, 0x68, 0x61, 0x72, 0x64, 0x65, 0x64, 0x41, 0x75, 0x74, 0x6f, 0x49, 0x6e, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x69, 0x6e, 0x67, 0x52, 0x1c, 0x73, 0x68, - 0x61, 0x72, 0x64, 0x65, 0x64, 0x41, 0x75, 0x74, 0x6f, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x69, 0x6e, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x68, - 0x61, 0x72, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x73, 0x68, 0x61, 0x72, - 0x64, 0x73, 0x12, 0x3e, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x57, - 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x12, 0x27, 0x0a, 0x0f, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x5f, 0x6b, 0x65, 0x79, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x67, 0x6c, 0x6f, - 0x62, 0x61, 0x6c, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x1a, 0x39, 0x0a, 0x0b, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xcf, 0x11, 0x0a, 0x08, 0x57, 0x6f, 0x72, 0x6b, 0x66, - 0x6c, 0x6f, 0x77, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3f, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x52, 0x65, 0x70, - 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x3f, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, - 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, - 0x64, 0x61, 0x74, 0x61, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x52, 0x65, - 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x31, 0x0a, 0x15, 0x6d, 0x61, 0x78, - 0x5f, 0x76, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, - 0x61, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x6d, 0x61, 0x78, 0x56, 0x52, 0x65, - 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x61, 0x67, 0x12, 0x4a, 0x0a, 0x0d, - 0x73, 0x68, 0x61, 0x72, 0x64, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x18, 0x05, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, - 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x53, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x73, 0x68, 0x61, 0x72, - 0x64, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x77, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0c, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, - 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x73, 0x75, 0x62, 0x5f, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, - 0x6f, 0x77, 0x53, 0x75, 0x62, 0x54, 0x79, 0x70, 0x65, 0x12, 0x48, 0x0a, 0x21, 0x6d, 0x61, 0x78, - 0x5f, 0x76, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x61, 0x67, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x1d, 0x6d, 0x61, 0x78, 0x56, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x4c, 0x61, 0x67, 0x12, 0x30, 0x0a, 0x14, 0x64, 0x65, 0x66, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x63, - 0x6f, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x12, 0x64, 0x65, 0x66, 0x65, 0x72, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x61, 0x72, - 0x79, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x34, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, - 0x74, 0x61, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x60, 0x0a, 0x11, 0x53, - 0x68, 0x61, 0x72, 0x64, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x49, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x10, + 0x03, 0x12, 0x09, 0x0a, 0x05, 0x4d, 0x59, 0x53, 0x51, 0x4c, 0x10, 0x04, 0x1a, 0x02, 0x10, 0x01, + 0x22, 0x04, 0x08, 0x01, 0x10, 0x01, 0x22, 0x04, 0x08, 0x02, 0x10, 0x02, 0x22, 0x71, 0x0a, 0x06, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, + 0x4e, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x45, 0x44, + 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x4c, 0x45, 0x44, 0x10, + 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x51, 0x55, 0x45, 0x55, 0x45, 0x44, 0x10, 0x03, 0x12, 0x09, 0x0a, + 0x05, 0x52, 0x45, 0x41, 0x44, 0x59, 0x10, 0x04, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x55, 0x4e, 0x4e, + 0x49, 0x4e, 0x47, 0x10, 0x05, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x45, 0x54, + 0x45, 0x10, 0x06, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x07, 0x22, + 0x5e, 0x0a, 0x05, 0x53, 0x68, 0x61, 0x72, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, + 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x22, + 0xda, 0x02, 0x0a, 0x0f, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, 0x64, + 0x12, 0x6e, 0x0a, 0x1f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x65, 0x64, 0x5f, 0x61, 0x75, 0x74, 0x6f, + 0x5f, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, + 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x76, 0x74, 0x63, 0x74, + 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x65, 0x64, 0x41, 0x75, 0x74, + 0x6f, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x69, + 0x6e, 0x67, 0x52, 0x1c, 0x73, 0x68, 0x61, 0x72, 0x64, 0x65, 0x64, 0x41, 0x75, 0x74, 0x6f, 0x49, + 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x69, 0x6e, 0x67, + 0x12, 0x16, 0x0a, 0x06, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x06, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x12, 0x3e, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x27, 0x0a, 0x0f, 0x67, 0x6c, 0x6f, 0x62, + 0x61, 0x6c, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0e, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x1a, 0x39, 0x0a, 0x0b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, - 0x65, 0x79, 0x12, 0x35, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x57, 0x6f, - 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x53, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x49, 0x0a, - 0x13, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x12, 0x16, 0x0a, 0x06, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x06, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x1a, 0xb9, 0x01, 0x0a, 0x0b, 0x53, 0x68, 0x61, - 0x72, 0x64, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x34, 0x0a, 0x07, 0x73, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x76, 0x74, 0x63, 0x74, + 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xcf, 0x11, 0x0a, + 0x08, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3f, 0x0a, + 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, + 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, + 0x6f, 0x77, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x3f, + 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, + 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, + 0x31, 0x0a, 0x15, 0x6d, 0x61, 0x78, 0x5f, 0x76, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x61, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, + 0x6d, 0x61, 0x78, 0x56, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, + 0x61, 0x67, 0x12, 0x4a, 0x0a, 0x0d, 0x73, 0x68, 0x61, 0x72, 0x64, 0x5f, 0x73, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x53, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x07, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x12, 0x46, - 0x0a, 0x0f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, - 0x74, 0x61, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x43, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x52, 0x0e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x43, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x69, 0x73, 0x5f, 0x70, 0x72, 0x69, - 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x10, 0x69, 0x73, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x6e, 0x67, 0x1a, 0xc1, 0x0a, 0x0a, 0x06, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, - 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, - 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x2d, 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, - 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x06, 0x74, 0x61, - 0x62, 0x6c, 0x65, 0x74, 0x12, 0x3d, 0x0a, 0x0d, 0x62, 0x69, 0x6e, 0x6c, 0x6f, 0x67, 0x5f, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x62, 0x69, - 0x6e, 0x6c, 0x6f, 0x67, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x42, 0x69, 0x6e, 0x6c, 0x6f, 0x67, 0x53, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x0c, 0x62, 0x69, 0x6e, 0x6c, 0x6f, 0x67, 0x53, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x23, 0x0a, 0x0d, 0x73, 0x74, 0x6f, 0x70, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x74, 0x6f, 0x70, 0x50, 0x6f, 0x73, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x64, 0x62, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x62, 0x4e, - 0x61, 0x6d, 0x65, 0x12, 0x41, 0x0a, 0x15, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x09, 0x20, 0x01, + 0x68, 0x61, 0x72, 0x64, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x0c, 0x73, 0x68, 0x61, 0x72, 0x64, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x12, 0x23, + 0x0a, 0x0d, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, + 0x73, 0x75, 0x62, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, + 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x75, 0x62, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x48, 0x0a, 0x21, 0x6d, 0x61, 0x78, 0x5f, 0x76, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x6c, 0x61, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x1d, 0x6d, 0x61, 0x78, 0x56, + 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x61, 0x67, 0x12, 0x30, 0x0a, 0x14, 0x64, 0x65, 0x66, + 0x65, 0x72, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x5f, 0x6b, 0x65, 0x79, + 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x64, 0x65, 0x66, 0x65, 0x72, 0x53, 0x65, + 0x63, 0x6f, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x34, 0x0a, 0x07, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x76, + 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x1a, 0x60, 0x0a, 0x11, 0x53, 0x68, 0x61, 0x72, 0x64, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x35, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, + 0x61, 0x74, 0x61, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x53, 0x68, 0x61, + 0x72, 0x64, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x1a, 0x49, 0x0a, 0x13, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, + 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, + 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x1a, 0xb9, + 0x01, 0x0a, 0x0b, 0x53, 0x68, 0x61, 0x72, 0x64, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x34, + 0x0a, 0x07, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x57, 0x6f, 0x72, 0x6b, + 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x07, 0x73, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x73, 0x12, 0x46, 0x0a, 0x0f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, + 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x2e, 0x54, + 0x61, 0x62, 0x6c, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x52, 0x0e, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x73, 0x12, 0x2c, 0x0a, 0x12, + 0x69, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x69, 0x73, 0x50, 0x72, 0x69, 0x6d, + 0x61, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x6e, 0x67, 0x1a, 0xc1, 0x0a, 0x0a, 0x06, 0x53, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x2d, 0x0a, 0x06, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, + 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, + 0x61, 0x73, 0x52, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x12, 0x3d, 0x0a, 0x0d, 0x62, 0x69, + 0x6e, 0x6c, 0x6f, 0x67, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x18, 0x2e, 0x62, 0x69, 0x6e, 0x6c, 0x6f, 0x67, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x42, + 0x69, 0x6e, 0x6c, 0x6f, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x0c, 0x62, 0x69, 0x6e, + 0x6c, 0x6f, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x74, 0x6f, 0x70, 0x5f, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x74, + 0x6f, 0x70, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x12, 0x17, 0x0a, 0x07, 0x64, 0x62, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x64, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x41, 0x0a, 0x15, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x76, 0x74, 0x74, 0x69, 0x6d, + 0x65, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x14, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x2f, 0x0a, 0x0c, + 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x76, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x54, 0x69, 0x6d, 0x65, - 0x52, 0x14, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x2f, 0x0a, 0x0c, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x76, - 0x74, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x0b, 0x74, 0x69, 0x6d, 0x65, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x12, 0x45, 0x0a, 0x0b, 0x63, 0x6f, 0x70, 0x79, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x73, - 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, - 0x74, 0x61, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x53, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x2e, 0x43, 0x6f, 0x70, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0a, 0x63, 0x6f, - 0x70, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x04, 0x6c, 0x6f, 0x67, 0x73, - 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, - 0x74, 0x61, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x53, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x2e, 0x4c, 0x6f, 0x67, 0x52, 0x04, 0x6c, 0x6f, 0x67, 0x73, 0x12, 0x26, 0x0a, 0x0f, - 0x6c, 0x6f, 0x67, 0x5f, 0x66, 0x65, 0x74, 0x63, 0x68, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, - 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6c, 0x6f, 0x67, 0x46, 0x65, 0x74, 0x63, 0x68, 0x45, - 0x72, 0x72, 0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x0f, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x6f, 0x77, 0x73, - 0x5f, 0x63, 0x6f, 0x70, 0x69, 0x65, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x72, - 0x6f, 0x77, 0x73, 0x43, 0x6f, 0x70, 0x69, 0x65, 0x64, 0x12, 0x55, 0x0a, 0x10, 0x74, 0x68, 0x72, - 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x11, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, - 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, - 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, - 0x0f, 0x74, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x12, 0x37, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x18, 0x12, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, - 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x74, 0x61, - 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x6c, 0x0a, 0x1b, 0x74, 0x61, 0x62, - 0x6c, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, - 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, - 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, - 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x19, 0x74, 0x61, - 0x62, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x65, - 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, - 0x18, 0x14, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x1a, 0x57, 0x0a, - 0x09, 0x43, 0x6f, 0x70, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x61, - 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, - 0x12, 0x17, 0x0a, 0x07, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x70, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x6c, 0x61, 0x73, 0x74, 0x50, 0x6b, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x73, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x1a, 0xe6, 0x01, 0x0a, 0x03, 0x4c, 0x6f, 0x67, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, - 0x0a, 0x09, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x08, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, - 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, - 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2b, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, - 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x76, 0x74, 0x74, 0x69, - 0x6d, 0x65, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, - 0x41, 0x74, 0x12, 0x2b, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x76, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, - 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x1a, - 0x77, 0x0a, 0x0f, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x12, 0x2f, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x5f, - 0x74, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x12, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, - 0x6c, 0x65, 0x64, 0x12, 0x33, 0x0a, 0x0e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x74, 0x68, 0x72, 0x6f, - 0x74, 0x74, 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x76, 0x74, - 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x0d, 0x74, 0x69, 0x6d, 0x65, 0x54, - 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x64, 0x22, 0x59, 0x0a, 0x12, 0x41, 0x64, 0x64, 0x43, - 0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x2f, 0x0a, 0x09, 0x63, 0x65, 0x6c, 0x6c, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, - 0x2e, 0x43, 0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x63, 0x65, 0x6c, 0x6c, 0x49, - 0x6e, 0x66, 0x6f, 0x22, 0x15, 0x0a, 0x13, 0x41, 0x64, 0x64, 0x43, 0x65, 0x6c, 0x6c, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x40, 0x0a, 0x14, 0x41, 0x64, - 0x64, 0x43, 0x65, 0x6c, 0x6c, 0x73, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x22, 0x17, 0x0a, 0x15, - 0x41, 0x64, 0x64, 0x43, 0x65, 0x6c, 0x6c, 0x73, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xbf, 0x01, 0x0a, 0x20, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x4b, - 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, - 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x53, 0x0a, 0x16, 0x6b, 0x65, - 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x72, - 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x73, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x6f, 0x75, - 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x14, 0x6b, 0x65, 0x79, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, - 0x21, 0x0a, 0x0c, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x73, 0x6b, 0x69, 0x70, 0x52, 0x65, 0x62, 0x75, 0x69, - 0x6c, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x63, 0x65, - 0x6c, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x62, 0x75, 0x69, - 0x6c, 0x64, 0x43, 0x65, 0x6c, 0x6c, 0x73, 0x22, 0x78, 0x0a, 0x21, 0x41, 0x70, 0x70, 0x6c, 0x79, - 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, - 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x16, - 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, - 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, - 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, - 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x14, 0x6b, 0x65, 0x79, + 0x52, 0x0b, 0x74, 0x69, 0x6d, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, 0x18, 0x0a, + 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x45, 0x0a, 0x0b, 0x63, 0x6f, 0x70, 0x79, 0x5f, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x76, + 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x43, 0x6f, 0x70, 0x79, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x52, 0x0a, 0x63, 0x6f, 0x70, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x12, 0x32, + 0x0a, 0x04, 0x6c, 0x6f, 0x67, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x76, + 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x4c, 0x6f, 0x67, 0x52, 0x04, 0x6c, 0x6f, + 0x67, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6c, 0x6f, 0x67, 0x5f, 0x66, 0x65, 0x74, 0x63, 0x68, 0x5f, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6c, 0x6f, 0x67, + 0x46, 0x65, 0x74, 0x63, 0x68, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x61, + 0x67, 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x12, 0x1f, + 0x0a, 0x0b, 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x63, 0x6f, 0x70, 0x69, 0x65, 0x64, 0x18, 0x10, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x0a, 0x72, 0x6f, 0x77, 0x73, 0x43, 0x6f, 0x70, 0x69, 0x65, 0x64, 0x12, + 0x55, 0x0a, 0x10, 0x74, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x76, 0x74, 0x63, 0x74, + 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x53, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0f, 0x74, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x37, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x12, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x74, + 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, + 0x70, 0x65, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, + 0x6c, 0x0a, 0x1b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x13, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, + 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x53, + 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, + 0x63, 0x65, 0x52, 0x19, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x14, 0x0a, + 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x63, 0x65, + 0x6c, 0x6c, 0x73, 0x1a, 0x57, 0x0a, 0x09, 0x43, 0x6f, 0x70, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x12, 0x14, 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x70, + 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x61, 0x73, 0x74, 0x50, 0x6b, 0x12, + 0x1b, 0x0a, 0x09, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x08, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x1a, 0xe6, 0x01, 0x0a, + 0x03, 0x4c, 0x6f, 0x67, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x49, + 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2b, 0x0a, 0x0a, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0c, 0x2e, 0x76, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x09, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x2b, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x76, + 0x74, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, + 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x1a, 0x77, 0x0a, 0x0f, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, + 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2f, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x70, + 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, + 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x64, 0x12, 0x33, 0x0a, 0x0e, 0x74, 0x69, 0x6d, + 0x65, 0x5f, 0x74, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0c, 0x2e, 0x76, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x52, + 0x0d, 0x74, 0x69, 0x6d, 0x65, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x64, 0x22, 0x59, + 0x0a, 0x12, 0x41, 0x64, 0x64, 0x43, 0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2f, 0x0a, 0x09, 0x63, 0x65, 0x6c, 0x6c, + 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x74, 0x6f, + 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x08, 0x63, 0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x15, 0x0a, 0x13, 0x41, 0x64, 0x64, + 0x43, 0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x40, 0x0a, 0x14, 0x41, 0x64, 0x64, 0x43, 0x65, 0x6c, 0x6c, 0x73, 0x41, 0x6c, 0x69, 0x61, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, + 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x63, 0x65, 0x6c, + 0x6c, 0x73, 0x22, 0x17, 0x0a, 0x15, 0x41, 0x64, 0x64, 0x43, 0x65, 0x6c, 0x6c, 0x73, 0x41, 0x6c, + 0x69, 0x61, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xbf, 0x01, 0x0a, 0x20, + 0x41, 0x70, 0x70, 0x6c, 0x79, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x6f, 0x75, + 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x53, 0x0a, 0x16, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x72, 0x6f, 0x75, + 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1d, 0x2e, 0x76, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, + 0x14, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, + 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x72, 0x65, + 0x62, 0x75, 0x69, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x73, 0x6b, 0x69, + 0x70, 0x52, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x62, 0x75, + 0x69, 0x6c, 0x64, 0x5f, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x0c, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x43, 0x65, 0x6c, 0x6c, 0x73, 0x22, 0x78, 0x0a, + 0x21, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x6f, + 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x53, 0x0a, 0x16, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x72, + 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, - 0x73, 0x22, 0x9e, 0x01, 0x0a, 0x18, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x6f, 0x75, 0x74, 0x69, - 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, - 0x0a, 0x0d, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, - 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x0c, 0x72, 0x6f, - 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x6b, - 0x69, 0x70, 0x5f, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x0b, 0x73, 0x6b, 0x69, 0x70, 0x52, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x12, 0x23, 0x0a, - 0x0d, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x43, 0x65, 0x6c, - 0x6c, 0x73, 0x22, 0x1b, 0x0a, 0x19, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x6f, 0x75, 0x74, 0x69, - 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0xb3, 0x01, 0x0a, 0x1d, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x6f, - 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x4a, 0x0a, 0x13, 0x73, 0x68, 0x61, 0x72, 0x64, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x69, - 0x6e, 0x67, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x76, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x6f, - 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x11, 0x73, 0x68, 0x61, 0x72, - 0x64, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x21, 0x0a, + 0x73, 0x52, 0x14, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x69, + 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x22, 0x9e, 0x01, 0x0a, 0x18, 0x41, 0x70, 0x70, 0x6c, + 0x79, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x0d, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x73, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, + 0x65, 0x73, 0x52, 0x0c, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, + 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x73, 0x6b, 0x69, 0x70, 0x52, 0x65, 0x62, 0x75, + 0x69, 0x6c, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x63, + 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x62, 0x75, + 0x69, 0x6c, 0x64, 0x43, 0x65, 0x6c, 0x6c, 0x73, 0x22, 0x1b, 0x0a, 0x19, 0x41, 0x70, 0x70, 0x6c, + 0x79, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xb3, 0x01, 0x0a, 0x1d, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x53, + 0x68, 0x61, 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4a, 0x0a, 0x13, 0x73, 0x68, 0x61, 0x72, 0x64, + 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x76, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x53, + 0x68, 0x61, 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, + 0x52, 0x11, 0x73, 0x68, 0x61, 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, + 0x6c, 0x65, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x72, 0x65, 0x62, 0x75, + 0x69, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x73, 0x6b, 0x69, 0x70, 0x52, + 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, + 0x64, 0x5f, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x72, + 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x43, 0x65, 0x6c, 0x6c, 0x73, 0x22, 0x20, 0x0a, 0x1e, 0x41, + 0x70, 0x70, 0x6c, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, + 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xce, 0x02, + 0x0a, 0x12, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x12, 0x10, 0x0a, 0x03, 0x73, 0x71, 0x6c, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x73, + 0x71, 0x6c, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x64, 0x6c, 0x5f, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, + 0x67, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x64, 0x6c, 0x53, 0x74, 0x72, + 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x75, 0x75, 0x69, 0x64, 0x5f, 0x6c, 0x69, + 0x73, 0x74, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x75, 0x75, 0x69, 0x64, 0x4c, 0x69, + 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x11, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6d, + 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, + 0x44, 0x0a, 0x15, 0x77, 0x61, 0x69, 0x74, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, + 0x2e, 0x76, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x13, 0x77, 0x61, 0x69, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x54, 0x69, + 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x2c, 0x0a, 0x09, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, + 0x69, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, + 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x08, 0x63, 0x61, 0x6c, 0x6c, 0x65, + 0x72, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x73, 0x69, 0x7a, + 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x62, 0x61, 0x74, 0x63, 0x68, 0x53, 0x69, + 0x7a, 0x65, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x4a, 0x04, 0x08, 0x08, 0x10, 0x09, 0x22, 0xe8, + 0x01, 0x0a, 0x13, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x75, 0x75, 0x69, 0x64, 0x5f, 0x6c, + 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x75, 0x75, 0x69, 0x64, 0x4c, + 0x69, 0x73, 0x74, 0x12, 0x6c, 0x0a, 0x16, 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x61, 0x66, 0x66, 0x65, + 0x63, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x41, 0x70, 0x70, 0x6c, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x6f, 0x77, 0x73, 0x41, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, + 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x13, 0x72, 0x6f, + 0x77, 0x73, 0x41, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, + 0x64, 0x1a, 0x46, 0x0a, 0x18, 0x52, 0x6f, 0x77, 0x73, 0x41, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, + 0x64, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xdb, 0x01, 0x0a, 0x13, 0x41, 0x70, + 0x70, 0x6c, 0x79, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x73, 0x6b, 0x69, 0x70, 0x52, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, - 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x63, 0x65, 0x6c, 0x6c, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, - 0x43, 0x65, 0x6c, 0x6c, 0x73, 0x22, 0x20, 0x0a, 0x1e, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x53, 0x68, - 0x61, 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xce, 0x02, 0x0a, 0x12, 0x41, 0x70, 0x70, 0x6c, - 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, - 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x71, - 0x6c, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x73, 0x71, 0x6c, 0x12, 0x21, 0x0a, 0x0c, - 0x64, 0x64, 0x6c, 0x5f, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0b, 0x64, 0x64, 0x6c, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, - 0x1b, 0x0a, 0x09, 0x75, 0x75, 0x69, 0x64, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x05, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x08, 0x75, 0x75, 0x69, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x11, - 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, - 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x44, 0x0a, 0x15, 0x77, 0x61, 0x69, - 0x74, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, - 0x75, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x74, 0x74, 0x69, 0x6d, - 0x65, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x77, 0x61, 0x69, 0x74, - 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, - 0x2c, 0x0a, 0x09, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x09, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x65, - 0x72, 0x49, 0x44, 0x52, 0x08, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1d, 0x0a, - 0x0a, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x09, 0x62, 0x61, 0x74, 0x63, 0x68, 0x53, 0x69, 0x7a, 0x65, 0x4a, 0x04, 0x08, 0x02, - 0x10, 0x03, 0x4a, 0x04, 0x08, 0x08, 0x10, 0x09, 0x22, 0xe8, 0x01, 0x0a, 0x13, 0x41, 0x70, 0x70, - 0x6c, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x1b, 0x0a, 0x09, 0x75, 0x75, 0x69, 0x64, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x08, 0x75, 0x75, 0x69, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x6c, 0x0a, - 0x16, 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x61, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x62, - 0x79, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x37, 0x2e, - 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x53, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x6f, - 0x77, 0x73, 0x41, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, - 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x13, 0x72, 0x6f, 0x77, 0x73, 0x41, 0x66, 0x66, 0x65, - 0x63, 0x74, 0x65, 0x64, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x1a, 0x46, 0x0a, 0x18, 0x52, - 0x6f, 0x77, 0x73, 0x41, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x42, 0x79, 0x53, 0x68, 0x61, - 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x22, 0xdb, 0x01, 0x0a, 0x13, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x56, 0x53, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, - 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, - 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x6b, 0x69, 0x70, 0x5f, - 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x73, - 0x6b, 0x69, 0x70, 0x52, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x64, 0x72, - 0x79, 0x5f, 0x72, 0x75, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x64, 0x72, 0x79, - 0x52, 0x75, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x12, 0x2c, 0x0a, 0x08, 0x76, 0x5f, 0x73, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x76, 0x73, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x07, - 0x76, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x71, 0x6c, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x71, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x72, - 0x69, 0x63, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x73, 0x74, 0x72, 0x69, 0x63, - 0x74, 0x22, 0xca, 0x02, 0x0a, 0x14, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x56, 0x53, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x08, 0x76, 0x5f, - 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x76, - 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, - 0x07, 0x76, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x6c, 0x0a, 0x15, 0x75, 0x6e, 0x6b, 0x6e, - 0x6f, 0x77, 0x6e, 0x5f, 0x76, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, - 0x56, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x13, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x56, 0x69, 0x6e, 0x64, 0x65, 0x78, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x71, 0x0a, 0x18, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, - 0x6e, 0x56, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x6b, 0x65, 0x79, 0x12, 0x3f, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, - 0x41, 0x70, 0x70, 0x6c, 0x79, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x23, 0x0a, 0x09, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0xa1, - 0x02, 0x0a, 0x0d, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, - 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0b, 0x74, - 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x6c, - 0x6c, 0x6f, 0x77, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x0c, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x12, - 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, - 0x79, 0x12, 0x30, 0x0a, 0x14, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x6c, - 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x70, 0x6f, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x12, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x6c, 0x46, 0x72, 0x6f, 0x6d, - 0x50, 0x6f, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x73, - 0x61, 0x66, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x75, 0x70, 0x67, 0x72, 0x61, - 0x64, 0x65, 0x53, 0x61, 0x66, 0x65, 0x12, 0x28, 0x0a, 0x0d, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, - 0x5f, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, - 0x0c, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x88, 0x01, 0x01, - 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x5f, 0x65, 0x6e, 0x67, 0x69, - 0x6e, 0x65, 0x22, 0xa2, 0x01, 0x0a, 0x0e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, - 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, - 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, - 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, - 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, - 0x68, 0x61, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, - 0x64, 0x12, 0x24, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x0e, 0x2e, 0x6c, 0x6f, 0x67, 0x75, 0x74, 0x69, 0x6c, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, - 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, 0xe2, 0x01, 0x0a, 0x12, 0x42, 0x61, 0x63, 0x6b, - 0x75, 0x70, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, - 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, - 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, + 0x12, 0x17, 0x0a, 0x07, 0x64, 0x72, 0x79, 0x5f, 0x72, 0x75, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x06, 0x64, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x65, 0x6c, + 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x12, + 0x2c, 0x0a, 0x08, 0x76, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x11, 0x2e, 0x76, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x52, 0x07, 0x76, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x10, 0x0a, + 0x03, 0x73, 0x71, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x71, 0x6c, 0x12, + 0x16, 0x0a, 0x06, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x06, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x22, 0xca, 0x02, 0x0a, 0x14, 0x41, 0x70, 0x70, 0x6c, + 0x79, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x2c, 0x0a, 0x08, 0x76, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x76, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x4b, 0x65, 0x79, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x07, 0x76, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x6c, + 0x0a, 0x15, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x76, 0x69, 0x6e, 0x64, 0x65, 0x78, + 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, + 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x56, + 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x55, + 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x56, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x13, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, + 0x56, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x71, 0x0a, 0x18, + 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x56, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x3f, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x76, 0x74, 0x63, 0x74, + 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x56, 0x53, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x4c, 0x69, 0x73, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, + 0x23, 0x0a, 0x09, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x22, 0xa1, 0x02, 0x0a, 0x0d, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, + 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, + 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, + 0x69, 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, - 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x50, 0x72, + 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, - 0x65, 0x6e, 0x63, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x63, - 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x75, 0x70, 0x67, 0x72, 0x61, - 0x64, 0x65, 0x5f, 0x73, 0x61, 0x66, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x75, - 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x53, 0x61, 0x66, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x69, 0x6e, - 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x6c, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x70, - 0x6f, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x61, 0x6c, 0x46, 0x72, 0x6f, 0x6d, 0x50, 0x6f, 0x73, 0x22, 0x4e, 0x0a, 0x1c, - 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, - 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x22, 0xdf, 0x01, 0x0a, - 0x1d, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x69, 0x67, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x76, - 0x0a, 0x16, 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x61, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, - 0x62, 0x79, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x41, - 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, - 0x6c, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x6f, 0x77, 0x73, 0x41, 0x66, 0x66, - 0x65, 0x63, 0x74, 0x65, 0x64, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x13, 0x72, 0x6f, 0x77, 0x73, 0x41, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x42, - 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x1a, 0x46, 0x0a, 0x18, 0x52, 0x6f, 0x77, 0x73, 0x41, 0x66, - 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xe8, - 0x01, 0x0a, 0x17, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, - 0x61, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, - 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, - 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, - 0x6c, 0x69, 0x61, 0x73, 0x12, 0x40, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, - 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x61, 0x67, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, - 0x1a, 0x37, 0x0a, 0x09, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xc0, 0x02, 0x0a, 0x18, 0x43, 0x68, - 0x61, 0x6e, 0x67, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x0b, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, - 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x76, 0x74, - 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x61, - 0x62, 0x6c, 0x65, 0x74, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x2e, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x0a, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x54, 0x61, 0x67, 0x73, 0x12, 0x51, 0x0a, 0x0a, - 0x61, 0x66, 0x74, 0x65, 0x72, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x32, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x68, 0x61, - 0x6e, 0x67, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x41, 0x66, 0x74, 0x65, 0x72, 0x54, 0x61, 0x67, 0x73, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x61, 0x66, 0x74, 0x65, 0x72, 0x54, 0x61, 0x67, 0x73, 0x1a, - 0x3d, 0x0a, 0x0f, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3c, - 0x0a, 0x0e, 0x41, 0x66, 0x74, 0x65, 0x72, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, - 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x9b, 0x01, 0x0a, - 0x17, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, - 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, - 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, - 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, - 0x61, 0x73, 0x12, 0x2d, 0x0a, 0x07, 0x64, 0x62, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, - 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x06, 0x64, 0x62, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x17, 0x0a, 0x07, 0x64, 0x72, 0x79, 0x5f, 0x72, 0x75, 0x6e, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x06, 0x64, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x22, 0xa6, 0x01, 0x0a, 0x18, 0x43, - 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x0d, 0x62, 0x65, 0x66, 0x6f, 0x72, - 0x65, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, - 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, - 0x52, 0x0c, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x12, 0x33, - 0x0a, 0x0c, 0x61, 0x66, 0x74, 0x65, 0x72, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, - 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x0b, 0x61, 0x66, 0x74, 0x65, 0x72, 0x54, 0x61, 0x62, - 0x6c, 0x65, 0x74, 0x12, 0x1e, 0x0a, 0x0b, 0x77, 0x61, 0x73, 0x5f, 0x64, 0x72, 0x79, 0x5f, 0x72, - 0x75, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x77, 0x61, 0x73, 0x44, 0x72, 0x79, - 0x52, 0x75, 0x6e, 0x22, 0xe3, 0x01, 0x0a, 0x15, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x68, 0x72, - 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, - 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, - 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, - 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x70, 0x70, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x70, 0x70, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x36, 0x0a, 0x17, 0x73, 0x6b, 0x69, 0x70, - 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, - 0x61, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x73, 0x6b, 0x69, 0x70, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x73, - 0x12, 0x27, 0x0a, 0x10, 0x6f, 0x6b, 0x5f, 0x69, 0x66, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x65, 0x78, - 0x69, 0x73, 0x74, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x6f, 0x6b, 0x49, 0x66, - 0x4e, 0x6f, 0x74, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x22, 0x93, 0x01, 0x0a, 0x16, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, - 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, - 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, - 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x3f, - 0x0a, 0x05, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, - 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, - 0x61, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x05, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x22, - 0x4f, 0x0a, 0x1d, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, - 0x75, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, - 0x22, 0xe1, 0x01, 0x0a, 0x1e, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x53, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x77, 0x0a, 0x16, 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x61, 0x66, 0x66, 0x65, - 0x63, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, - 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x69, 0x67, + 0x65, 0x6e, 0x63, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x63, + 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x30, 0x0a, 0x14, 0x69, 0x6e, 0x63, 0x72, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x6c, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x70, 0x6f, 0x73, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x61, 0x6c, 0x46, 0x72, 0x6f, 0x6d, 0x50, 0x6f, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x75, 0x70, 0x67, + 0x72, 0x61, 0x64, 0x65, 0x5f, 0x73, 0x61, 0x66, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0b, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x53, 0x61, 0x66, 0x65, 0x12, 0x28, 0x0a, 0x0d, + 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x5f, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x45, 0x6e, 0x67, + 0x69, 0x6e, 0x65, 0x88, 0x01, 0x01, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x75, + 0x70, 0x5f, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x22, 0xa2, 0x01, 0x0a, 0x0e, 0x42, 0x61, 0x63, + 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x0c, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, + 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, + 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x24, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6c, 0x6f, 0x67, 0x75, 0x74, 0x69, 0x6c, + 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, 0xe2, 0x01, + 0x0a, 0x12, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, + 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x61, + 0x6c, 0x6c, 0x6f, 0x77, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x63, + 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x21, 0x0a, + 0x0c, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x73, 0x61, 0x66, 0x65, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x0b, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x53, 0x61, 0x66, 0x65, + 0x12, 0x30, 0x0a, 0x14, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x6c, 0x5f, + 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x70, 0x6f, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, + 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x6c, 0x46, 0x72, 0x6f, 0x6d, 0x50, + 0x6f, 0x73, 0x22, 0x4e, 0x0a, 0x1c, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x53, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, + 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, + 0x69, 0x64, 0x22, 0xdf, 0x01, 0x0a, 0x1d, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x53, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x76, 0x0a, 0x16, 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x61, 0x66, 0x66, + 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x6f, 0x77, 0x73, 0x41, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x13, 0x72, 0x6f, 0x77, 0x73, 0x41, 0x66, 0x66, @@ -17737,1314 +17632,1467 @@ var file_vtctldata_proto_rawDesc = string([]byte{ 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x3a, 0x02, 0x38, 0x01, 0x22, 0x50, 0x0a, 0x1e, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, - 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x22, 0xe3, 0x01, 0x0a, 0x1f, 0x43, 0x6f, 0x6d, 0x70, 0x6c, - 0x65, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x78, 0x0a, 0x16, 0x72, 0x6f, - 0x77, 0x73, 0x5f, 0x61, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x5f, 0x73, - 0x68, 0x61, 0x72, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x76, 0x74, 0x63, - 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x53, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x6f, 0x77, 0x73, 0x41, 0x66, 0x66, 0x65, 0x63, - 0x74, 0x65, 0x64, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, - 0x13, 0x72, 0x6f, 0x77, 0x73, 0x41, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x42, 0x79, 0x53, - 0x68, 0x61, 0x72, 0x64, 0x1a, 0x46, 0x0a, 0x18, 0x52, 0x6f, 0x77, 0x73, 0x41, 0x66, 0x66, 0x65, - 0x63, 0x74, 0x65, 0x64, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, - 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x8a, 0x03, 0x0a, - 0x16, 0x43, 0x6f, 0x70, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x53, 0x68, 0x61, 0x72, 0x64, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x45, 0x0a, 0x13, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, + 0x3a, 0x02, 0x38, 0x01, 0x22, 0xe8, 0x01, 0x0a, 0x17, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, + 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, + 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0b, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x40, 0x0a, 0x04, 0x74, 0x61, + 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, + 0x74, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x54, 0x61, 0x67, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x12, 0x18, 0x0a, 0x07, + 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, + 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x1a, 0x37, 0x0a, 0x09, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, + 0xc0, 0x02, 0x0a, 0x18, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, + 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x0b, + 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x33, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x54, 0x61, 0x67, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x54, 0x61, + 0x67, 0x73, 0x12, 0x51, 0x0a, 0x0a, 0x61, 0x66, 0x74, 0x65, 0x72, 0x5f, 0x74, 0x61, 0x67, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, + 0x61, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x41, 0x66, 0x74, 0x65, + 0x72, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x61, 0x66, 0x74, 0x65, + 0x72, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x3d, 0x0a, 0x0f, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x54, + 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3c, 0x0a, 0x0e, 0x41, 0x66, 0x74, 0x65, 0x72, 0x54, 0x61, 0x67, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, + 0x38, 0x01, 0x22, 0x9b, 0x01, 0x0a, 0x17, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x61, 0x62, + 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, + 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, - 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x11, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x16, - 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, - 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, - 0x65, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, - 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x23, 0x0a, - 0x0d, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x73, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x56, 0x69, 0x65, - 0x77, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, - 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x73, 0x6b, 0x69, 0x70, 0x56, 0x65, 0x72, - 0x69, 0x66, 0x79, 0x12, 0x44, 0x0a, 0x15, 0x77, 0x61, 0x69, 0x74, 0x5f, 0x72, 0x65, 0x70, 0x6c, - 0x69, 0x63, 0x61, 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x44, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x77, 0x61, 0x69, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, - 0x61, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x31, 0x0a, 0x14, 0x64, 0x65, 0x73, - 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x2b, 0x0a, 0x11, - 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x68, 0x61, 0x72, - 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x22, 0x19, 0x0a, 0x17, 0x43, 0x6f, 0x70, - 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xdd, 0x02, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4b, - 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x12, 0x2f, 0x0a, 0x14, 0x61, 0x6c, 0x6c, 0x6f, - 0x77, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x5f, 0x76, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x45, 0x6d, 0x70, - 0x74, 0x79, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x2a, 0x0a, 0x04, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, - 0x74, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, - 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x6b, 0x65, - 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x62, 0x61, - 0x73, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x31, 0x0a, 0x0d, 0x73, 0x6e, - 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x0c, 0x2e, 0x76, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x52, - 0x0c, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2b, 0x0a, - 0x11, 0x64, 0x75, 0x72, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x64, 0x75, 0x72, 0x61, 0x62, 0x69, - 0x6c, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x26, 0x0a, 0x0f, 0x73, 0x69, - 0x64, 0x65, 0x63, 0x61, 0x72, 0x5f, 0x64, 0x62, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0b, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x69, 0x64, 0x65, 0x63, 0x61, 0x72, 0x44, 0x62, 0x4e, 0x61, - 0x6d, 0x65, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x4a, 0x04, - 0x08, 0x06, 0x10, 0x07, 0x22, 0x49, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4b, 0x65, - 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, - 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x13, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x65, 0x79, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, - 0x8c, 0x01, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x68, 0x61, 0x72, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x68, 0x61, 0x72, 0x64, 0x4e, 0x61, 0x6d, - 0x65, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x69, 0x6e, 0x63, 0x6c, 0x75, - 0x64, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x0d, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x22, 0xa0, - 0x01, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, - 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x08, 0x6b, - 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x26, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, - 0x74, 0x61, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, - 0x30, 0x0a, 0x14, 0x73, 0x68, 0x61, 0x72, 0x64, 0x5f, 0x61, 0x6c, 0x72, 0x65, 0x61, 0x64, 0x79, - 0x5f, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x73, - 0x68, 0x61, 0x72, 0x64, 0x41, 0x6c, 0x72, 0x65, 0x61, 0x64, 0x79, 0x45, 0x78, 0x69, 0x73, 0x74, - 0x73, 0x22, 0x41, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x65, 0x6c, 0x6c, 0x49, - 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, - 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, - 0x6f, 0x72, 0x63, 0x65, 0x22, 0x18, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x65, - 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2d, - 0x0a, 0x17, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x65, 0x6c, 0x6c, 0x73, 0x41, 0x6c, 0x69, - 0x61, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x1a, 0x0a, - 0x18, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x65, 0x6c, 0x6c, 0x73, 0x41, 0x6c, 0x69, 0x61, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x67, 0x0a, 0x15, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1c, - 0x0a, 0x09, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x09, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x12, 0x14, 0x0a, 0x05, - 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, - 0x63, 0x65, 0x22, 0x18, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9b, 0x01, 0x0a, - 0x13, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x06, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, - 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x06, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x12, 0x1c, - 0x0a, 0x09, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x09, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x12, 0x26, 0x0a, 0x0f, - 0x65, 0x76, 0x65, 0x6e, 0x5f, 0x69, 0x66, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x6e, 0x67, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x65, 0x76, 0x65, 0x6e, 0x49, 0x66, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x6e, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x22, 0x16, 0x0a, 0x14, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x2d, 0x0a, 0x17, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x72, 0x76, 0x56, - 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, - 0x04, 0x63, 0x65, 0x6c, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x65, 0x6c, - 0x6c, 0x22, 0x1a, 0x0a, 0x18, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x72, 0x76, 0x56, 0x53, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x79, 0x0a, - 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3c, 0x0a, 0x0e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, - 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, - 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, - 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0d, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, - 0x73, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x70, 0x72, 0x69, - 0x6d, 0x61, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x61, 0x6c, 0x6c, 0x6f, - 0x77, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x22, 0x17, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0xc3, 0x03, 0x0a, 0x1d, 0x45, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x6e, 0x63, 0x79, 0x52, - 0x65, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, - 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x36, 0x0a, 0x0b, 0x6e, 0x65, 0x77, 0x5f, 0x70, 0x72, 0x69, - 0x6d, 0x61, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, - 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, - 0x73, 0x52, 0x0a, 0x6e, 0x65, 0x77, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x3e, 0x0a, - 0x0f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, - 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, - 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0e, 0x69, - 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x12, 0x44, 0x0a, - 0x15, 0x77, 0x61, 0x69, 0x74, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x5f, 0x74, - 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, - 0x74, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, - 0x77, 0x61, 0x69, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x54, 0x69, 0x6d, 0x65, - 0x6f, 0x75, 0x74, 0x12, 0x3f, 0x0a, 0x1c, 0x70, 0x72, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x63, - 0x72, 0x6f, 0x73, 0x73, 0x5f, 0x63, 0x65, 0x6c, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x19, 0x70, 0x72, 0x65, 0x76, 0x65, - 0x6e, 0x74, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x65, 0x6c, 0x6c, 0x50, 0x72, 0x6f, 0x6d, 0x6f, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x14, 0x77, 0x61, 0x69, 0x74, 0x5f, 0x66, 0x6f, 0x72, - 0x5f, 0x61, 0x6c, 0x6c, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x73, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x11, 0x77, 0x61, 0x69, 0x74, 0x46, 0x6f, 0x72, 0x41, 0x6c, 0x6c, 0x54, 0x61, - 0x62, 0x6c, 0x65, 0x74, 0x73, 0x12, 0x40, 0x0a, 0x10, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, - 0x64, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, - 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0f, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, - 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x22, 0xbc, 0x01, 0x0a, 0x1e, 0x45, 0x6d, 0x65, 0x72, - 0x67, 0x65, 0x6e, 0x63, 0x79, 0x52, 0x65, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x68, 0x61, - 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, - 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, - 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x40, 0x0a, 0x10, - 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, - 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0f, 0x70, - 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x26, - 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, - 0x2e, 0x6c, 0x6f, 0x67, 0x75, 0x74, 0x69, 0x6c, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x06, - 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xa0, 0x01, 0x0a, 0x18, 0x45, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x65, 0x46, 0x65, 0x74, 0x63, 0x68, 0x41, 0x73, 0x41, 0x70, 0x70, 0x52, 0x65, 0x71, 0x75, + 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, + 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x2d, 0x0a, 0x07, 0x64, 0x62, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x74, 0x6f, 0x70, 0x6f, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x06, 0x64, 0x62, 0x54, 0x79, 0x70, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x64, 0x72, 0x79, 0x5f, 0x72, + 0x75, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x64, 0x72, 0x79, 0x52, 0x75, 0x6e, + 0x22, 0xa6, 0x01, 0x0a, 0x18, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, + 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, + 0x0d, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x0c, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x54, 0x61, + 0x62, 0x6c, 0x65, 0x74, 0x12, 0x33, 0x0a, 0x0c, 0x61, 0x66, 0x74, 0x65, 0x72, 0x5f, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x74, 0x6f, 0x70, + 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x0b, 0x61, 0x66, + 0x74, 0x65, 0x72, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x12, 0x1e, 0x0a, 0x0b, 0x77, 0x61, 0x73, + 0x5f, 0x64, 0x72, 0x79, 0x5f, 0x72, 0x75, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, + 0x77, 0x61, 0x73, 0x44, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x22, 0xe3, 0x01, 0x0a, 0x15, 0x43, 0x68, + 0x65, 0x63, 0x6b, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, - 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x14, 0x0a, - 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, - 0x65, 0x72, 0x79, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x6f, 0x77, 0x73, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x52, 0x6f, 0x77, 0x73, 0x12, 0x19, - 0x0a, 0x08, 0x75, 0x73, 0x65, 0x5f, 0x70, 0x6f, 0x6f, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x07, 0x75, 0x73, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x22, 0x47, 0x0a, 0x19, 0x45, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x65, 0x46, 0x65, 0x74, 0x63, 0x68, 0x41, 0x73, 0x41, 0x70, 0x70, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x22, 0xd3, 0x01, 0x0a, 0x18, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x46, 0x65, - 0x74, 0x63, 0x68, 0x41, 0x73, 0x44, 0x42, 0x41, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, - 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, - 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, - 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, - 0x19, 0x0a, 0x08, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x6f, 0x77, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x52, 0x6f, 0x77, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x69, - 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x62, 0x69, 0x6e, 0x6c, 0x6f, 0x67, 0x73, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x0e, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x6c, - 0x6f, 0x67, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x72, 0x65, 0x6c, 0x6f, - 0x61, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x47, 0x0a, 0x19, 0x45, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x65, 0x46, 0x65, 0x74, 0x63, 0x68, 0x41, 0x73, 0x44, 0x42, 0x41, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x22, 0xa5, 0x01, 0x0a, 0x12, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, - 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, - 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, - 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, - 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, - 0x61, 0x73, 0x12, 0x55, 0x0a, 0x13, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x68, 0x6f, 0x6f, - 0x6b, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x25, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x11, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x48, 0x6f, - 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x5e, 0x0a, 0x13, 0x45, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x47, 0x0a, 0x0b, 0x68, 0x6f, 0x6f, 0x6b, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, - 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x68, - 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0xd4, 0x01, 0x0a, 0x1d, 0x45, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x65, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x46, 0x65, 0x74, 0x63, 0x68, 0x41, - 0x73, 0x44, 0x42, 0x41, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, - 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, - 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, - 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x71, 0x6c, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x73, 0x71, 0x6c, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x61, 0x78, 0x5f, 0x72, - 0x6f, 0x77, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x52, 0x6f, - 0x77, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x62, 0x69, - 0x6e, 0x6c, 0x6f, 0x67, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x64, 0x69, 0x73, - 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x6c, 0x6f, 0x67, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x72, - 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x0c, 0x72, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x22, 0x4e, 0x0a, 0x1e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x4d, 0x75, 0x6c, 0x74, 0x69, - 0x46, 0x65, 0x74, 0x63, 0x68, 0x41, 0x73, 0x44, 0x42, 0x41, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, - 0x22, 0x3c, 0x0a, 0x1e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x53, 0x68, 0x61, 0x72, 0x64, - 0x73, 0x49, 0x6e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0xbe, - 0x01, 0x0a, 0x1f, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x53, 0x68, 0x61, 0x72, 0x64, 0x73, - 0x49, 0x6e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x06, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x46, - 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x53, 0x68, 0x61, 0x72, 0x64, 0x73, 0x49, 0x6e, 0x4b, 0x65, - 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, - 0x68, 0x61, 0x72, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x73, 0x68, 0x61, 0x72, - 0x64, 0x73, 0x1a, 0x4b, 0x0a, 0x0b, 0x53, 0x68, 0x61, 0x72, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x6b, 0x65, 0x79, 0x12, 0x26, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, - 0x68, 0x61, 0x72, 0x64, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, - 0x54, 0x0a, 0x22, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x43, 0x75, 0x74, 0x4f, 0x76, 0x65, 0x72, 0x53, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x75, 0x75, 0x69, 0x64, 0x22, 0xeb, 0x01, 0x0a, 0x23, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x43, - 0x75, 0x74, 0x4f, 0x76, 0x65, 0x72, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7c, 0x0a, - 0x16, 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x61, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x62, - 0x79, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x47, 0x2e, - 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x43, - 0x75, 0x74, 0x4f, 0x76, 0x65, 0x72, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x6f, - 0x77, 0x73, 0x41, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, - 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x13, 0x72, 0x6f, 0x77, 0x73, 0x41, 0x66, 0x66, 0x65, - 0x63, 0x74, 0x65, 0x64, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x1a, 0x46, 0x0a, 0x18, 0x52, + 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x19, 0x0a, + 0x08, 0x61, 0x70, 0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x61, 0x70, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x36, + 0x0a, 0x17, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, + 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x15, 0x73, 0x6b, 0x69, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x72, + 0x74, 0x62, 0x65, 0x61, 0x74, 0x73, 0x12, 0x27, 0x0a, 0x10, 0x6f, 0x6b, 0x5f, 0x69, 0x66, 0x5f, + 0x6e, 0x6f, 0x74, 0x5f, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0d, 0x6f, 0x6b, 0x49, 0x66, 0x4e, 0x6f, 0x74, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x22, + 0x93, 0x01, 0x0a, 0x16, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, + 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, + 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, + 0x6c, 0x69, 0x61, 0x73, 0x12, 0x3f, 0x0a, 0x05, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x68, 0x72, + 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x05, + 0x43, 0x68, 0x65, 0x63, 0x6b, 0x22, 0x4f, 0x0a, 0x1d, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, + 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x22, 0xe1, 0x01, 0x0a, 0x1e, 0x43, 0x6c, 0x65, 0x61, 0x6e, + 0x75, 0x70, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x77, 0x0a, 0x16, 0x72, 0x6f, 0x77, + 0x73, 0x5f, 0x61, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x5f, 0x73, 0x68, + 0x61, 0x72, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x76, 0x74, 0x63, 0x74, + 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x53, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x6f, 0x77, 0x73, 0x41, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, + 0x64, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x13, 0x72, 0x6f, 0x77, 0x73, 0x41, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x42, 0x79, 0x53, 0x68, 0x61, - 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x22, 0x9e, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x42, 0x61, 0x63, 0x6b, 0x75, - 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6c, - 0x69, 0x6d, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, - 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x08, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x25, 0x0a, - 0x0e, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x4c, - 0x69, 0x6d, 0x69, 0x74, 0x22, 0x44, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x42, 0x61, 0x63, 0x6b, 0x75, - 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x07, 0x62, 0x61, - 0x63, 0x6b, 0x75, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6d, 0x79, - 0x73, 0x71, 0x6c, 0x63, 0x74, 0x6c, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x49, 0x6e, 0x66, - 0x6f, 0x52, 0x07, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x22, 0x28, 0x0a, 0x12, 0x47, 0x65, - 0x74, 0x43, 0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x12, 0x0a, 0x04, 0x63, 0x65, 0x6c, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x63, 0x65, 0x6c, 0x6c, 0x22, 0x46, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x43, 0x65, 0x6c, 0x6c, 0x49, - 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x09, 0x63, - 0x65, 0x6c, 0x6c, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, - 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x65, 0x6c, 0x6c, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x08, 0x63, 0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x19, 0x0a, 0x17, - 0x47, 0x65, 0x74, 0x43, 0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x4e, 0x61, 0x6d, 0x65, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x30, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x43, 0x65, - 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0x18, 0x0a, 0x16, 0x47, 0x65, 0x74, - 0x43, 0x65, 0x6c, 0x6c, 0x73, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x22, 0xb6, 0x01, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x43, 0x65, 0x6c, 0x6c, 0x73, - 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x49, 0x0a, 0x07, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x2f, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, - 0x43, 0x65, 0x6c, 0x6c, 0x73, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x07, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x1a, 0x50, 0x0a, 0x0c, 0x41, 0x6c, - 0x69, 0x61, 0x73, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x74, 0x6f, - 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x65, 0x6c, 0x6c, 0x73, 0x41, 0x6c, 0x69, 0x61, - 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x50, 0x0a, 0x14, - 0x47, 0x65, 0x74, 0x46, 0x75, 0x6c, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, + 0x72, 0x64, 0x1a, 0x46, 0x0a, 0x18, 0x52, 0x6f, 0x77, 0x73, 0x41, 0x66, 0x66, 0x65, 0x63, 0x74, + 0x65, 0x64, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x50, 0x0a, 0x1e, 0x43, 0x6f, + 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, + 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x22, 0xe3, 0x01, 0x0a, + 0x1f, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, + 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x78, 0x0a, 0x16, 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x61, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, + 0x64, 0x5f, 0x62, 0x79, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x43, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, + 0x70, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x6f, 0x77, + 0x73, 0x41, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x13, 0x72, 0x6f, 0x77, 0x73, 0x41, 0x66, 0x66, 0x65, 0x63, + 0x74, 0x65, 0x64, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x1a, 0x46, 0x0a, 0x18, 0x52, 0x6f, + 0x77, 0x73, 0x41, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, + 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, + 0x38, 0x01, 0x22, 0x8a, 0x03, 0x0a, 0x16, 0x43, 0x6f, 0x70, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x45, 0x0a, + 0x13, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, - 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x4c, - 0x0a, 0x15, 0x47, 0x65, 0x74, 0x46, 0x75, 0x6c, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x46, 0x75, 0x6c, 0x6c, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x15, 0x0a, 0x13, - 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x22, 0x49, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x09, 0x6b, - 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, + 0x73, 0x52, 0x11, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, + 0x6c, 0x69, 0x61, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, + 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x54, 0x61, 0x62, + 0x6c, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x76, + 0x69, 0x65, 0x77, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, 0x6e, 0x63, 0x6c, + 0x75, 0x64, 0x65, 0x56, 0x69, 0x65, 0x77, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6b, 0x69, 0x70, + 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x73, + 0x6b, 0x69, 0x70, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x12, 0x44, 0x0a, 0x15, 0x77, 0x61, 0x69, + 0x74, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, + 0x75, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x74, 0x74, 0x69, 0x6d, + 0x65, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x77, 0x61, 0x69, 0x74, + 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, + 0x31, 0x0a, 0x14, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6b, + 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x64, + 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x64, + 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x22, + 0x19, 0x0a, 0x17, 0x43, 0x6f, 0x70, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x53, 0x68, 0x61, + 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xdd, 0x02, 0x0a, 0x15, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x12, 0x2f, + 0x0a, 0x14, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x5f, 0x76, 0x5f, + 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x61, 0x6c, + 0x6c, 0x6f, 0x77, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, + 0x2a, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, + 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x62, + 0x61, 0x73, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0c, 0x62, 0x61, 0x73, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x12, 0x31, 0x0a, 0x0d, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x76, 0x74, 0x74, 0x69, 0x6d, 0x65, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x0c, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x54, + 0x69, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x64, 0x75, 0x72, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, + 0x79, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, + 0x64, 0x75, 0x72, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x12, 0x26, 0x0a, 0x0f, 0x73, 0x69, 0x64, 0x65, 0x63, 0x61, 0x72, 0x5f, 0x64, 0x62, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x69, 0x64, 0x65, 0x63, + 0x61, 0x72, 0x44, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, + 0x08, 0x05, 0x10, 0x06, 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, 0x22, 0x49, 0x0a, 0x16, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x08, 0x6b, 0x65, 0x79, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x8c, 0x01, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, + 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x68, 0x61, 0x72, + 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x68, + 0x61, 0x72, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x12, 0x25, 0x0a, + 0x0e, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x50, 0x61, + 0x72, 0x65, 0x6e, 0x74, 0x22, 0xa0, 0x01, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, + 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x08, + 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x52, 0x09, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x22, 0x30, - 0x0a, 0x12, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x22, 0x46, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x76, 0x74, 0x63, 0x74, - 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x08, - 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x51, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x50, - 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x61, 0x63, 0x65, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x26, 0x0a, + 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, + 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x05, + 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x73, 0x68, 0x61, 0x72, 0x64, 0x5f, 0x61, + 0x6c, 0x72, 0x65, 0x61, 0x64, 0x79, 0x5f, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x12, 0x73, 0x68, 0x61, 0x72, 0x64, 0x41, 0x6c, 0x72, 0x65, 0x61, 0x64, + 0x79, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x22, 0x41, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x43, 0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x22, 0x18, 0x0a, 0x16, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x43, 0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2d, 0x0a, 0x17, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x65, + 0x6c, 0x6c, 0x73, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x22, 0x1a, 0x0a, 0x18, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x65, 0x6c, + 0x6c, 0x73, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x67, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, + 0x76, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x22, 0x18, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x9b, 0x01, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x68, 0x61, + 0x72, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x06, 0x73, 0x68, + 0x61, 0x72, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x74, 0x63, + 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x06, 0x73, 0x68, + 0x61, 0x72, 0x64, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, + 0x76, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x65, 0x76, 0x65, 0x6e, 0x5f, 0x69, 0x66, 0x5f, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x65, 0x76, 0x65, + 0x6e, 0x49, 0x66, 0x53, 0x65, 0x72, 0x76, 0x69, 0x6e, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, + 0x72, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, + 0x22, 0x16, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2d, 0x0a, 0x17, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x53, 0x72, 0x76, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x65, 0x6c, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x63, 0x65, 0x6c, 0x6c, 0x22, 0x1a, 0x0a, 0x18, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x53, 0x72, 0x76, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x79, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x62, + 0x6c, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3c, 0x0a, 0x0e, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, + 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0d, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x6c, 0x6c, + 0x6f, 0x77, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0c, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x22, 0x17, + 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xc3, 0x03, 0x0a, 0x1d, 0x45, 0x6d, 0x65, 0x72, + 0x67, 0x65, 0x6e, 0x63, 0x79, 0x52, 0x65, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x68, 0x61, + 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x36, 0x0a, 0x0b, 0x6e, + 0x65, 0x77, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, + 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0a, 0x6e, 0x65, 0x77, 0x50, 0x72, 0x69, 0x6d, + 0x61, 0x72, 0x79, 0x12, 0x3e, 0x0a, 0x0f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x72, 0x65, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, + 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, + 0x69, 0x61, 0x73, 0x52, 0x0e, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x73, 0x12, 0x44, 0x0a, 0x15, 0x77, 0x61, 0x69, 0x74, 0x5f, 0x72, 0x65, 0x70, 0x6c, + 0x69, 0x63, 0x61, 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x44, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x77, 0x61, 0x69, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, + 0x61, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x3f, 0x0a, 0x1c, 0x70, 0x72, 0x65, + 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x72, 0x6f, 0x73, 0x73, 0x5f, 0x63, 0x65, 0x6c, 0x6c, 0x5f, + 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x19, 0x70, 0x72, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x65, 0x6c, + 0x6c, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x14, 0x77, 0x61, + 0x69, 0x74, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x61, 0x6c, 0x6c, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x74, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x77, 0x61, 0x69, 0x74, 0x46, 0x6f, + 0x72, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x73, 0x12, 0x40, 0x0a, 0x10, 0x65, + 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0f, 0x65, 0x78, + 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x22, 0xbc, 0x01, + 0x0a, 0x1e, 0x45, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x6e, 0x63, 0x79, 0x52, 0x65, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, + 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, + 0x72, 0x64, 0x12, 0x40, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x64, 0x5f, 0x70, + 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, + 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, + 0x69, 0x61, 0x73, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, + 0x6d, 0x61, 0x72, 0x79, 0x12, 0x26, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x04, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6c, 0x6f, 0x67, 0x75, 0x74, 0x69, 0x6c, 0x2e, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xa0, 0x01, 0x0a, + 0x18, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x46, 0x65, 0x74, 0x63, 0x68, 0x41, 0x73, 0x41, + 0x70, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, + 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, + 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, + 0x69, 0x61, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x61, 0x78, + 0x5f, 0x72, 0x6f, 0x77, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x6d, 0x61, 0x78, + 0x52, 0x6f, 0x77, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x5f, 0x70, 0x6f, 0x6f, 0x6c, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x75, 0x73, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x22, + 0x47, 0x0a, 0x19, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x46, 0x65, 0x74, 0x63, 0x68, 0x41, + 0x73, 0x41, 0x70, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x06, + 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x71, + 0x75, 0x65, 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0xd3, 0x01, 0x0a, 0x18, 0x45, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x65, 0x46, 0x65, 0x74, 0x63, 0x68, 0x41, 0x73, 0x44, 0x42, 0x41, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, + 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, + 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, + 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, + 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x6f, 0x77, + 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x52, 0x6f, 0x77, 0x73, + 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x62, 0x69, 0x6e, 0x6c, + 0x6f, 0x67, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x64, 0x69, 0x73, 0x61, 0x62, + 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x6c, 0x6f, 0x67, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x6c, + 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0c, 0x72, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x47, + 0x0a, 0x19, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x46, 0x65, 0x74, 0x63, 0x68, 0x41, 0x73, + 0x44, 0x42, 0x41, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x72, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, + 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0xa5, 0x01, 0x0a, 0x12, 0x45, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, + 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, + 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x55, 0x0a, 0x13, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x74, 0x5f, 0x68, 0x6f, 0x6f, 0x6b, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, + 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x11, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x74, 0x48, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, + 0x5e, 0x0a, 0x13, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0b, 0x68, 0x6f, 0x6f, 0x6b, 0x5f, 0x72, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x68, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, + 0xd4, 0x01, 0x0a, 0x1d, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x4d, 0x75, 0x6c, 0x74, 0x69, + 0x46, 0x65, 0x74, 0x63, 0x68, 0x41, 0x73, 0x44, 0x42, 0x41, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0b, - 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x5a, 0x0a, 0x16, 0x47, - 0x65, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x74, 0x61, 0x62, - 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50, - 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0b, 0x70, 0x65, 0x72, 0x6d, - 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x20, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x4b, 0x65, - 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, - 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x76, 0x0a, 0x1f, 0x47, 0x65, 0x74, - 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, - 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x16, - 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, - 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, - 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, - 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x14, 0x6b, 0x65, 0x79, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, - 0x73, 0x22, 0x18, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, - 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x55, 0x0a, 0x17, 0x47, - 0x65, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x0d, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, - 0x67, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, - 0x76, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, - 0x75, 0x6c, 0x65, 0x73, 0x52, 0x0c, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, - 0x65, 0x73, 0x22, 0xb0, 0x02, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x73, + 0x71, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x71, 0x6c, 0x12, 0x19, 0x0a, + 0x08, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x6f, 0x77, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x07, 0x6d, 0x61, 0x78, 0x52, 0x6f, 0x77, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x69, 0x73, 0x61, + 0x62, 0x6c, 0x65, 0x5f, 0x62, 0x69, 0x6e, 0x6c, 0x6f, 0x67, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0e, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x6c, 0x6f, 0x67, + 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x72, 0x65, 0x6c, 0x6f, 0x61, 0x64, + 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x4e, 0x0a, 0x1e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x65, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x46, 0x65, 0x74, 0x63, 0x68, 0x41, 0x73, 0x44, 0x42, 0x41, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x07, 0x72, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x22, 0x3c, 0x0a, 0x1e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, + 0x6c, 0x53, 0x68, 0x61, 0x72, 0x64, 0x73, 0x49, 0x6e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x22, 0xbe, 0x01, 0x0a, 0x1f, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, + 0x53, 0x68, 0x61, 0x72, 0x64, 0x73, 0x49, 0x6e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x06, 0x73, 0x68, 0x61, 0x72, + 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x53, 0x68, 0x61, 0x72, + 0x64, 0x73, 0x49, 0x6e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x06, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x1a, 0x4b, 0x0a, 0x0b, 0x53, 0x68, 0x61, 0x72, + 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x26, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x54, 0x0a, 0x22, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x43, 0x75, + 0x74, 0x4f, 0x76, 0x65, 0x72, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, + 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, + 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x22, 0xeb, 0x01, 0x0a, 0x23, + 0x46, 0x6f, 0x72, 0x63, 0x65, 0x43, 0x75, 0x74, 0x4f, 0x76, 0x65, 0x72, 0x53, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x7c, 0x0a, 0x16, 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x61, 0x66, 0x66, 0x65, + 0x63, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x47, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x46, 0x6f, 0x72, 0x63, 0x65, 0x43, 0x75, 0x74, 0x4f, 0x76, 0x65, 0x72, 0x53, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x6f, 0x77, 0x73, 0x41, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, + 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x13, 0x72, 0x6f, + 0x77, 0x73, 0x41, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, + 0x64, 0x1a, 0x46, 0x0a, 0x18, 0x52, 0x6f, 0x77, 0x73, 0x41, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, + 0x64, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x9e, 0x01, 0x0a, 0x11, 0x47, 0x65, + 0x74, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, + 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, + 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x74, 0x61, 0x69, + 0x6c, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x64, 0x65, 0x74, 0x61, 0x69, + 0x6c, 0x65, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x5f, + 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x64, 0x65, 0x74, + 0x61, 0x69, 0x6c, 0x65, 0x64, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0x44, 0x0a, 0x12, 0x47, 0x65, + 0x74, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x2e, 0x0a, 0x07, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x14, 0x2e, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x63, 0x74, 0x6c, 0x2e, 0x42, 0x61, 0x63, + 0x6b, 0x75, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x73, + 0x22, 0x28, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x43, 0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x65, 0x6c, 0x6c, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x65, 0x6c, 0x6c, 0x22, 0x46, 0x0a, 0x13, 0x47, 0x65, + 0x74, 0x43, 0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x2f, 0x0a, 0x09, 0x63, 0x65, 0x6c, 0x6c, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x43, 0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x63, 0x65, 0x6c, 0x6c, 0x49, 0x6e, + 0x66, 0x6f, 0x22, 0x19, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x43, 0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, + 0x6f, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x30, 0x0a, + 0x18, 0x47, 0x65, 0x74, 0x43, 0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x4e, 0x61, 0x6d, 0x65, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x22, + 0x18, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x43, 0x65, 0x6c, 0x6c, 0x73, 0x41, 0x6c, 0x69, 0x61, 0x73, + 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xb6, 0x01, 0x0a, 0x17, 0x47, 0x65, + 0x74, 0x43, 0x65, 0x6c, 0x6c, 0x73, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x07, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x65, 0x6c, 0x6c, 0x73, 0x41, 0x6c, 0x69, 0x61, 0x73, + 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x41, 0x6c, 0x69, 0x61, 0x73, + 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, + 0x1a, 0x50, 0x0a, 0x0c, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x14, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x65, 0x6c, + 0x6c, 0x73, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, + 0x38, 0x01, 0x22, 0x50, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x46, 0x75, 0x6c, 0x6c, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, + 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, + 0x6c, 0x69, 0x61, 0x73, 0x22, 0x4c, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x46, 0x75, 0x6c, 0x6c, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, + 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x46, 0x75, 0x6c, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x22, 0x15, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x49, 0x0a, 0x14, 0x47, 0x65, 0x74, + 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x31, 0x0a, 0x09, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x09, 0x6b, 0x65, 0x79, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x73, 0x22, 0x30, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, + 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, + 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x46, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, + 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x13, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x51, + 0x0a, 0x15, 0x47, 0x65, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, - 0x73, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x78, 0x63, - 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x0d, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, - 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x76, 0x69, 0x65, 0x77, - 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, - 0x56, 0x69, 0x65, 0x77, 0x73, 0x12, 0x28, 0x0a, 0x10, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x0e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x4f, 0x6e, 0x6c, 0x79, 0x12, - 0x28, 0x0a, 0x10, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x73, 0x5f, 0x6f, - 0x6e, 0x6c, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x74, 0x61, 0x62, 0x6c, 0x65, - 0x53, 0x69, 0x7a, 0x65, 0x73, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x2a, 0x0a, 0x11, 0x74, 0x61, 0x62, - 0x6c, 0x65, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, - 0x61, 0x4f, 0x6e, 0x6c, 0x79, 0x22, 0x50, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x06, 0x73, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x74, 0x61, 0x62, - 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0xb8, 0x02, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x53, + 0x73, 0x22, 0x5a, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x70, + 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1e, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x52, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x20, 0x0a, + 0x1e, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x6f, 0x75, 0x74, + 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, + 0x76, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x6f, + 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x53, 0x0a, 0x16, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x72, + 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x4b, 0x65, 0x79, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, + 0x73, 0x52, 0x14, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x69, + 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x22, 0x18, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x52, 0x6f, + 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x22, 0x55, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, + 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x0d, + 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x52, 0x6f, + 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x0c, 0x72, 0x6f, 0x75, 0x74, + 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x22, 0xb0, 0x02, 0x0a, 0x10, 0x47, 0x65, 0x74, + 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, + 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, + 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, + 0x25, 0x0a, 0x0e, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, + 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, + 0x65, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, + 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x56, 0x69, 0x65, 0x77, 0x73, 0x12, 0x28, 0x0a, 0x10, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, + 0x73, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x28, 0x0a, 0x10, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, + 0x69, 0x7a, 0x65, 0x73, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x73, 0x4f, 0x6e, 0x6c, 0x79, 0x12, + 0x2a, 0x0a, 0x11, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, + 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4f, 0x6e, 0x6c, 0x79, 0x22, 0x50, 0x0a, 0x11, 0x47, + 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x3b, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x23, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x66, 0x69, 0x6e, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0xb8, 0x02, + 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, + 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x2b, 0x0a, 0x11, + 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x39, 0x0a, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x76, 0x74, 0x63, 0x74, + 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x12, 0x28, 0x0a, 0x06, 0x72, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x44, 0x75, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x72, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x2e, + 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, + 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, + 0x72, 0x64, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x14, + 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x6c, + 0x69, 0x6d, 0x69, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6b, 0x69, 0x70, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x04, 0x73, 0x6b, 0x69, 0x70, 0x22, 0x59, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x2b, 0x0a, 0x11, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x10, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, - 0x65, 0x78, 0x74, 0x12, 0x39, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, - 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x28, - 0x0a, 0x06, 0x72, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, - 0x2e, 0x76, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x06, 0x72, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x2e, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, - 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x69, 0x6e, - 0x67, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, - 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x12, - 0x0a, 0x04, 0x73, 0x6b, 0x69, 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x6b, - 0x69, 0x70, 0x22, 0x59, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, - 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x3a, 0x0a, 0x0a, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, - 0x61, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x0a, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x64, 0x0a, - 0x1a, 0x47, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, - 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, - 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x14, 0x0a, - 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x63, 0x65, - 0x6c, 0x6c, 0x73, 0x22, 0x83, 0x02, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, - 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x7d, 0x0a, 0x19, 0x73, 0x68, 0x61, 0x72, 0x64, 0x5f, 0x72, 0x65, 0x70, - 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x79, 0x5f, 0x63, 0x65, 0x6c, 0x6c, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, - 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, - 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, - 0x79, 0x43, 0x65, 0x6c, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x16, 0x73, 0x68, 0x61, 0x72, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x0a, 0x6d, 0x69, 0x67, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x76, 0x74, + 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x69, + 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x22, 0x64, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, + 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, + 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, + 0x61, 0x72, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x22, 0x83, 0x02, 0x0a, 0x1b, 0x47, 0x65, + 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7d, 0x0a, 0x19, 0x73, 0x68, 0x61, + 0x72, 0x64, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, + 0x79, 0x5f, 0x63, 0x65, 0x6c, 0x6c, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x76, + 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, + 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x43, 0x65, 0x6c, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x16, 0x73, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x42, 0x79, 0x43, 0x65, 0x6c, 0x6c, 0x1a, 0x65, 0x0a, 0x1b, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x43, 0x65, - 0x6c, 0x6c, 0x1a, 0x65, 0x0a, 0x1b, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x43, 0x65, 0x6c, 0x6c, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x6b, 0x65, 0x79, 0x12, 0x30, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x68, - 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x4c, 0x0a, 0x0f, 0x47, 0x65, 0x74, - 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, - 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x68, 0x61, 0x72, - 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x68, - 0x61, 0x72, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x3a, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x53, 0x68, - 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x05, 0x73, - 0x68, 0x61, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x74, 0x63, - 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x05, 0x73, 0x68, - 0x61, 0x72, 0x64, 0x22, 0x1d, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, - 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x22, 0x6a, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x6f, - 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x13, 0x73, 0x68, 0x61, 0x72, 0x64, 0x5f, 0x72, 0x6f, 0x75, 0x74, - 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x76, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, - 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x11, 0x73, 0x68, 0x61, - 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x22, 0x32, - 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x53, 0x72, 0x76, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, - 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x63, 0x65, 0x6c, - 0x6c, 0x73, 0x22, 0xf3, 0x01, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x53, 0x72, 0x76, 0x4b, 0x65, 0x79, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x47, 0x0a, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x31, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, - 0x74, 0x53, 0x72, 0x76, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x1a, 0x69, 0x0a, 0x0a, 0x4e, - 0x61, 0x6d, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x45, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x76, 0x74, 0x63, - 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x72, 0x76, 0x4b, 0x65, 0x79, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x20, 0x0a, 0x08, 0x4e, 0x61, 0x6d, 0x65, 0x4c, 0x69, - 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0x4a, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x53, - 0x72, 0x76, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x6c, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x30, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, + 0x61, 0x74, 0x61, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, + 0x4c, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, - 0x0a, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x63, - 0x65, 0x6c, 0x6c, 0x73, 0x22, 0xcc, 0x01, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x53, 0x72, 0x76, 0x4b, - 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x59, 0x0a, 0x0d, 0x73, 0x72, 0x76, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1d, + 0x0a, 0x0a, 0x73, 0x68, 0x61, 0x72, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x73, 0x68, 0x61, 0x72, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x3a, 0x0a, + 0x10, 0x47, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x26, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x10, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x68, 0x61, + 0x72, 0x64, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x22, 0x1d, 0x0a, 0x1b, 0x47, 0x65, 0x74, + 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x6a, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x53, + 0x68, 0x61, 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x13, 0x73, 0x68, 0x61, 0x72, + 0x64, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x76, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, + 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, + 0x73, 0x52, 0x11, 0x73, 0x68, 0x61, 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, + 0x75, 0x6c, 0x65, 0x73, 0x22, 0x32, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x53, 0x72, 0x76, 0x4b, 0x65, + 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x22, 0xf3, 0x01, 0x0a, 0x1b, 0x47, 0x65, 0x74, + 0x53, 0x72, 0x76, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x05, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x72, 0x76, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x72, 0x76, 0x4b, - 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x73, - 0x72, 0x76, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x1a, 0x56, 0x0a, 0x11, 0x53, - 0x72, 0x76, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, - 0x65, 0x79, 0x12, 0x2b, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x72, 0x76, - 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x22, 0xe4, 0x03, 0x0a, 0x1c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x68, - 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x12, 0x16, 0x0a, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x69, 0x73, 0x61, - 0x62, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x64, 0x69, 0x73, 0x61, 0x62, - 0x6c, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, - 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x12, 0x28, 0x0a, 0x10, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x71, 0x75, - 0x65, 0x72, 0x79, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x63, - 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x74, 0x12, 0x2d, 0x0a, - 0x13, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x61, 0x73, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, - 0x73, 0x65, 0x6c, 0x66, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x63, 0x68, 0x65, 0x63, - 0x6b, 0x41, 0x73, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x65, 0x6c, 0x66, 0x12, 0x2f, 0x0a, 0x14, - 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x61, 0x73, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x73, - 0x68, 0x61, 0x72, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x63, 0x68, 0x65, 0x63, - 0x6b, 0x41, 0x73, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x68, 0x61, 0x72, 0x64, 0x12, 0x3f, 0x0a, - 0x0d, 0x74, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x64, 0x5f, 0x61, 0x70, 0x70, 0x18, 0x09, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, - 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x64, 0x41, 0x70, 0x70, 0x52, 0x75, 0x6c, 0x65, - 0x52, 0x0c, 0x74, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x64, 0x41, 0x70, 0x70, 0x12, 0x1f, - 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x4e, 0x61, 0x6d, 0x65, 0x12, - 0x19, 0x0a, 0x08, 0x61, 0x70, 0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x61, 0x70, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x61, 0x70, - 0x70, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x61, 0x70, 0x70, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x22, 0x1f, 0x0a, 0x1d, 0x55, 0x70, + 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, + 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x1a, 0x69, 0x0a, 0x0a, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x45, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x2f, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, + 0x53, 0x72, 0x76, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x4c, 0x69, 0x73, + 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x20, 0x0a, 0x08, + 0x4e, 0x61, 0x6d, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0x4a, + 0x0a, 0x16, 0x47, 0x65, 0x74, 0x53, 0x72, 0x76, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x22, 0xcc, 0x01, 0x0a, 0x17, 0x47, + 0x65, 0x74, 0x53, 0x72, 0x76, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x0d, 0x73, 0x72, 0x76, 0x5f, 0x6b, 0x65, + 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, + 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x72, 0x76, + 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x2e, 0x53, 0x72, 0x76, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x0c, 0x73, 0x72, 0x76, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x73, 0x1a, 0x56, 0x0a, 0x11, 0x53, 0x72, 0x76, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2b, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x53, 0x72, 0x76, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xe4, 0x03, 0x0a, 0x1c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x0a, 0x14, 0x47, - 0x65, 0x74, 0x53, 0x72, 0x76, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x65, 0x6c, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x63, 0x65, 0x6c, 0x6c, 0x22, 0x4e, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x53, 0x72, - 0x76, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x35, 0x0a, 0x0c, 0x73, 0x72, 0x76, 0x5f, 0x76, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x76, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x2e, 0x53, 0x72, 0x76, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x0a, 0x73, 0x72, 0x76, - 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x2d, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x53, 0x72, - 0x76, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x14, 0x0a, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x22, 0xc5, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x53, 0x72, + 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, + 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, + 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x18, + 0x0a, 0x07, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x07, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x68, 0x72, 0x65, + 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x74, 0x68, 0x72, + 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, + 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x75, + 0x73, 0x74, 0x6f, 0x6d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x28, 0x0a, 0x10, 0x63, 0x75, 0x73, + 0x74, 0x6f, 0x6d, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x0e, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x53, 0x65, 0x74, 0x12, 0x2d, 0x0a, 0x13, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x61, 0x73, 0x5f, + 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x73, 0x65, 0x6c, 0x66, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x10, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x41, 0x73, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x65, + 0x6c, 0x66, 0x12, 0x2f, 0x0a, 0x14, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x61, 0x73, 0x5f, 0x63, + 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x11, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x41, 0x73, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x68, + 0x61, 0x72, 0x64, 0x12, 0x3f, 0x0a, 0x0d, 0x74, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x64, + 0x5f, 0x61, 0x70, 0x70, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x74, 0x6f, 0x70, + 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x64, 0x41, + 0x70, 0x70, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x0c, 0x74, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, + 0x64, 0x41, 0x70, 0x70, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x70, 0x70, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x70, 0x70, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x2e, 0x0a, 0x13, 0x61, 0x70, 0x70, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x5f, + 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x61, + 0x70, 0x70, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, + 0x22, 0x1f, 0x0a, 0x1d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, + 0x6c, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x2a, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x53, 0x72, 0x76, 0x56, 0x53, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x65, 0x6c, + 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x65, 0x6c, 0x6c, 0x22, 0x4e, 0x0a, + 0x15, 0x47, 0x65, 0x74, 0x53, 0x72, 0x76, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x0c, 0x73, 0x72, 0x76, 0x5f, 0x76, 0x5f, + 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x76, + 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x53, 0x72, 0x76, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x52, 0x0a, 0x73, 0x72, 0x76, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x2d, 0x0a, + 0x15, 0x47, 0x65, 0x74, 0x53, 0x72, 0x76, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x22, 0xc5, 0x01, 0x0a, + 0x16, 0x47, 0x65, 0x74, 0x53, 0x72, 0x76, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x0d, 0x73, 0x72, 0x76, 0x5f, 0x76, + 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, + 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x72, 0x76, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x56, 0x0a, 0x0d, 0x73, 0x72, 0x76, 0x5f, 0x76, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, - 0x61, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, - 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x72, 0x76, 0x56, 0x53, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x72, 0x76, 0x56, - 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x73, 0x72, - 0x76, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x1a, 0x53, 0x0a, 0x10, 0x53, 0x72, 0x76, - 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x29, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, - 0x2e, 0x76, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x53, 0x72, 0x76, 0x56, 0x53, 0x63, 0x68, - 0x65, 0x6d, 0x61, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x4c, - 0x0a, 0x10, 0x47, 0x65, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, - 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, - 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x3d, 0x0a, 0x11, - 0x47, 0x65, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x28, 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x10, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, - 0x6c, 0x65, 0x74, 0x52, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x22, 0xe8, 0x01, 0x0a, 0x11, - 0x47, 0x65, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, - 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, - 0x61, 0x72, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x72, - 0x69, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x73, 0x74, 0x72, 0x69, 0x63, - 0x74, 0x12, 0x3c, 0x0a, 0x0e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, - 0x73, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, - 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, - 0x52, 0x0d, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x12, - 0x35, 0x0a, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, - 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x74, 0x61, 0x62, 0x6c, - 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x22, 0x40, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x54, 0x61, 0x62, - 0x6c, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x07, - 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, - 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, - 0x07, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x73, 0x22, 0x55, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x54, - 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, - 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, - 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, - 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, - 0x63, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, - 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, - 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, - 0x61, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x06, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x22, 0x5f, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x70, 0x6f, 0x6c, - 0x6f, 0x67, 0x79, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, - 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, - 0x74, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x07, - 0x61, 0x73, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x61, - 0x73, 0x4a, 0x73, 0x6f, 0x6e, 0x22, 0x46, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x70, 0x6f, - 0x6c, 0x6f, 0x67, 0x79, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x2b, 0x0a, 0x04, 0x63, 0x65, 0x6c, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, - 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x6f, 0x70, 0x6f, 0x6c, - 0x6f, 0x67, 0x79, 0x43, 0x65, 0x6c, 0x6c, 0x52, 0x04, 0x63, 0x65, 0x6c, 0x6c, 0x22, 0x80, 0x01, - 0x0a, 0x0c, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x43, 0x65, 0x6c, 0x6c, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x22, 0x5f, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x55, 0x6e, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, - 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x62, 0x61, 0x6e, 0x64, 0x6f, 0x6e, 0x5f, 0x61, 0x67, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x61, 0x62, 0x61, 0x6e, 0x64, 0x6f, 0x6e, 0x41, 0x67, - 0x65, 0x22, 0x63, 0x0a, 0x21, 0x47, 0x65, 0x74, 0x55, 0x6e, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, - 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x71, - 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x2f, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x74, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x64, 0x74, 0x69, 0x64, 0x22, 0xa0, 0x01, 0x0a, 0x15, 0x53, 0x68, 0x61, 0x72, - 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x18, 0x0a, - 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x69, 0x6d, 0x65, 0x5f, - 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x74, - 0x69, 0x6d, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, - 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x99, 0x01, 0x0a, 0x1a, 0x47, - 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, - 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x08, 0x6d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x71, 0x75, - 0x65, 0x72, 0x79, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x12, 0x43, 0x0a, 0x0c, 0x73, 0x68, 0x61, 0x72, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0b, 0x73, 0x68, 0x61, 0x72, 0x64, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x22, 0x63, 0x0a, 0x1a, 0x43, 0x6f, 0x6e, 0x63, 0x6c, 0x75, - 0x64, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x74, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x64, 0x74, 0x69, 0x64, 0x12, 0x31, 0x0a, 0x0c, 0x70, 0x61, 0x72, 0x74, - 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, - 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x0c, 0x70, - 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x73, 0x22, 0x1d, 0x0a, 0x1b, 0x43, - 0x6f, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x0a, 0x11, 0x47, 0x65, - 0x74, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x4d, 0x0a, 0x11, 0x47, - 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, - 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0b, 0x74, - 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x2e, 0x0a, 0x12, 0x47, 0x65, - 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x42, 0x0a, 0x12, 0x47, 0x65, - 0x74, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x2c, 0x0a, 0x08, 0x76, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x76, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x4b, 0x65, 0x79, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x07, 0x76, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0xc6, - 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x6f, 0x6e, 0x6c, - 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x4f, - 0x6e, 0x6c, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6e, 0x61, 0x6d, 0x65, 0x4f, 0x6e, 0x6c, 0x79, - 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x21, 0x0a, 0x0c, - 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x6c, 0x6f, 0x67, 0x73, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x0b, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x4c, 0x6f, 0x67, 0x73, 0x12, - 0x16, 0x0a, 0x06, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x06, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x22, 0x49, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x57, 0x6f, - 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x31, 0x0a, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x57, - 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, - 0x77, 0x73, 0x22, 0xfb, 0x01, 0x0a, 0x17, 0x49, 0x6e, 0x69, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, - 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, - 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, - 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, - 0x12, 0x52, 0x0a, 0x1a, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x65, 0x6c, 0x65, 0x63, - 0x74, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, - 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x17, 0x70, 0x72, 0x69, - 0x6d, 0x61, 0x72, 0x79, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, - 0x6c, 0x69, 0x61, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x12, 0x44, 0x0a, 0x15, 0x77, 0x61, - 0x69, 0x74, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65, - 0x6f, 0x75, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x74, 0x74, 0x69, - 0x6d, 0x65, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x77, 0x61, 0x69, - 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, - 0x22, 0x42, 0x0a, 0x18, 0x49, 0x6e, 0x69, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x50, 0x72, 0x69, - 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x06, - 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6c, - 0x6f, 0x67, 0x75, 0x74, 0x69, 0x6c, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x65, 0x76, - 0x65, 0x6e, 0x74, 0x73, 0x22, 0x4e, 0x0a, 0x1c, 0x4c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x53, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x65, 0x2e, 0x53, 0x72, 0x76, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x52, 0x0b, 0x73, 0x72, 0x76, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x1a, + 0x53, 0x0a, 0x10, 0x53, 0x72, 0x76, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x29, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x76, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x53, + 0x72, 0x76, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x22, 0x4c, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, + 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, + 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, + 0x61, 0x73, 0x22, 0x3d, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x74, 0x22, 0xe8, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x65, 0x6c, + 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x12, + 0x16, 0x0a, 0x06, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x06, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x12, 0x3c, 0x0a, 0x0e, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, + 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0d, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, + 0x69, 0x61, 0x73, 0x65, 0x73, 0x12, 0x35, 0x0a, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x74, 0x6f, 0x70, + 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, + 0x52, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x22, 0x40, 0x0a, 0x12, + 0x47, 0x65, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x07, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, + 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x07, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x73, 0x22, 0x55, + 0x0a, 0x19, 0x47, 0x65, 0x74, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, + 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, + 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x63, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x54, 0x68, 0x72, 0x6f, + 0x74, 0x74, 0x6c, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x68, 0x72, 0x6f, 0x74, + 0x74, 0x6c, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x5f, 0x0a, 0x16, 0x47, 0x65, + 0x74, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x07, 0x61, 0x73, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x06, 0x61, 0x73, 0x4a, 0x73, 0x6f, 0x6e, 0x22, 0x46, 0x0a, 0x17, 0x47, + 0x65, 0x74, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x04, 0x63, 0x65, 0x6c, 0x6c, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x43, 0x65, 0x6c, 0x6c, 0x52, 0x04, 0x63, + 0x65, 0x6c, 0x6c, 0x22, 0x80, 0x01, 0x0a, 0x0c, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, + 0x43, 0x65, 0x6c, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x12, 0x0a, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, + 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x12, 0x18, 0x0a, 0x07, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x5f, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x55, 0x6e, 0x72, + 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, + 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, + 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x62, 0x61, 0x6e, 0x64, 0x6f, + 0x6e, 0x5f, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x61, 0x62, 0x61, + 0x6e, 0x64, 0x6f, 0x6e, 0x41, 0x67, 0x65, 0x22, 0x63, 0x0a, 0x21, 0x47, 0x65, 0x74, 0x55, 0x6e, + 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x0c, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x0c, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x2f, 0x0a, 0x19, + 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, + 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x74, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x74, 0x69, 0x64, 0x22, 0xa0, 0x01, + 0x0a, 0x15, 0x53, 0x68, 0x61, 0x72, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x14, 0x0a, + 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x21, 0x0a, + 0x0c, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x0b, 0x74, 0x69, 0x6d, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, + 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x05, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, + 0x22, 0x99, 0x01, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x36, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x43, 0x0a, 0x0c, 0x73, 0x68, 0x61, 0x72, 0x64, + 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, + 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, + 0x0b, 0x73, 0x68, 0x61, 0x72, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x22, 0x63, 0x0a, 0x1a, + 0x43, 0x6f, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x74, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x74, 0x69, 0x64, 0x12, 0x31, + 0x0a, 0x0c, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x61, 0x72, + 0x67, 0x65, 0x74, 0x52, 0x0c, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, + 0x73, 0x22, 0x1d, 0x0a, 0x1b, 0x43, 0x6f, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x2f, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x22, 0x4d, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, + 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, + 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, + 0x69, 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, + 0x22, 0x2e, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x22, 0x42, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x08, 0x76, 0x5f, 0x73, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x76, 0x73, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x07, 0x76, 0x53, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x22, 0xc6, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, + 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, + 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x63, 0x74, 0x69, + 0x76, 0x65, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x61, + 0x63, 0x74, 0x69, 0x76, 0x65, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x61, 0x6d, + 0x65, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6e, 0x61, + 0x6d, 0x65, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, + 0x6f, 0x77, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, + 0x6f, 0x77, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x6c, 0x6f, + 0x67, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, + 0x65, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x18, + 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x22, 0x49, 0x0a, + 0x14, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x09, 0x77, + 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x22, 0xfb, 0x01, 0x0a, 0x17, 0x49, 0x6e, 0x69, + 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x75, 0x75, 0x69, 0x64, 0x22, 0xdf, 0x01, 0x0a, 0x1d, 0x4c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x53, + 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x52, 0x0a, 0x1a, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, + 0x79, 0x5f, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, + 0x6c, 0x69, 0x61, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, + 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, + 0x73, 0x52, 0x17, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x54, + 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, + 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, + 0x12, 0x44, 0x0a, 0x15, 0x77, 0x61, 0x69, 0x74, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x10, 0x2e, 0x76, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x13, 0x77, 0x61, 0x69, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x54, + 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x22, 0x42, 0x0a, 0x18, 0x49, 0x6e, 0x69, 0x74, 0x53, 0x68, + 0x61, 0x72, 0x64, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x26, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6c, 0x6f, 0x67, 0x75, 0x74, 0x69, 0x6c, 0x2e, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x4e, 0x0a, 0x1c, 0x4c, 0x61, + 0x75, 0x6e, 0x63, 0x68, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, + 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, + 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x22, 0xdf, 0x01, 0x0a, 0x1d, 0x4c, + 0x61, 0x75, 0x6e, 0x63, 0x68, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x76, 0x0a, 0x16, + 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x61, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, + 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x76, + 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x76, 0x0a, 0x16, 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x61, - 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, - 0x74, 0x61, 0x2e, 0x4c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, - 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x2e, 0x52, 0x6f, 0x77, 0x73, 0x41, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x42, 0x79, 0x53, - 0x68, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x13, 0x72, 0x6f, 0x77, 0x73, 0x41, - 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x1a, 0x46, - 0x0a, 0x18, 0x52, 0x6f, 0x77, 0x73, 0x41, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x42, 0x79, - 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x74, 0x0a, 0x1b, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, - 0x56, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x6f, 0x77, 0x73, 0x41, 0x66, 0x66, 0x65, 0x63, + 0x74, 0x65, 0x64, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x13, 0x72, 0x6f, 0x77, 0x73, 0x41, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x42, 0x79, 0x53, + 0x68, 0x61, 0x72, 0x64, 0x1a, 0x46, 0x0a, 0x18, 0x52, 0x6f, 0x77, 0x73, 0x41, 0x66, 0x66, 0x65, + 0x63, 0x74, 0x65, 0x64, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x74, 0x0a, 0x1b, + 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x56, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x43, 0x6f, 0x6d, 0x70, + 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, + 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, + 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0d, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x22, 0x1e, 0x0a, 0x1c, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x56, 0x69, 0x6e, 0x64, + 0x65, 0x78, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0xff, 0x02, 0x0a, 0x19, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x56, 0x69, 0x6e, + 0x64, 0x65, 0x78, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x08, + 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x65, 0x6c, 0x6c, + 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x12, 0x29, + 0x0a, 0x06, 0x76, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, + 0x2e, 0x76, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x52, 0x06, 0x76, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x42, 0x0a, 0x1e, 0x63, 0x6f, 0x6e, + 0x74, 0x69, 0x6e, 0x75, 0x65, 0x5f, 0x61, 0x66, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x70, 0x79, + 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x1a, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, 0x41, 0x66, 0x74, 0x65, 0x72, + 0x43, 0x6f, 0x70, 0x79, 0x57, 0x69, 0x74, 0x68, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x37, 0x0a, + 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x06, 0x20, + 0x03, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, + 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x6c, 0x0a, 0x1b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, + 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x65, + 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, + 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x19, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, + 0x65, 0x6e, 0x63, 0x65, 0x22, 0x1c, 0x0a, 0x1a, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x56, 0x69, + 0x6e, 0x64, 0x65, 0x78, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0xa0, 0x01, 0x0a, 0x1e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x56, 0x69, 0x6e, + 0x64, 0x65, 0x78, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x74, - 0x61, 0x62, 0x6c, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x1e, 0x0a, 0x1c, - 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x56, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x43, 0x6f, 0x6d, 0x70, - 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xff, 0x02, 0x0a, - 0x19, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x56, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, - 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, - 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, - 0x6f, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, - 0x6f, 0x77, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x12, 0x29, 0x0a, 0x06, 0x76, 0x69, 0x6e, 0x64, - 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x76, 0x73, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x06, 0x76, 0x69, 0x6e, - 0x64, 0x65, 0x78, 0x12, 0x42, 0x0a, 0x1e, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, 0x5f, - 0x61, 0x66, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x70, 0x79, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, - 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1a, 0x63, 0x6f, 0x6e, - 0x74, 0x69, 0x6e, 0x75, 0x65, 0x41, 0x66, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x70, 0x79, 0x57, 0x69, - 0x74, 0x68, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x37, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, - 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x14, 0x2e, - 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, - 0x79, 0x70, 0x65, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, - 0x12, 0x6c, 0x0a, 0x1b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, - 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, - 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, - 0x6e, 0x63, 0x65, 0x52, 0x19, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x22, 0x1c, - 0x0a, 0x1a, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x56, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa0, 0x01, 0x0a, - 0x1e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x56, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x45, 0x78, 0x74, - 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x25, 0x0a, 0x0e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x4b, 0x65, - 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x0e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x22, - 0x77, 0x0a, 0x1f, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x56, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x45, - 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x73, - 0x74, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x77, 0x6f, - 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x12, 0x29, 0x0a, - 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, - 0x77, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x22, 0x77, 0x0a, 0x1e, 0x4c, 0x6f, 0x6f, 0x6b, - 0x75, 0x70, 0x56, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, - 0x69, 0x7a, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, - 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, - 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x61, - 0x62, 0x6c, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0d, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x22, 0x21, 0x0a, 0x1f, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x56, 0x69, 0x6e, 0x64, 0x65, - 0x78, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x56, 0x0a, 0x18, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, - 0x69, 0x7a, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x3a, 0x0a, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4d, - 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, - 0x67, 0x73, 0x52, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x1b, 0x0a, 0x19, - 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xdd, 0x05, 0x0a, 0x14, 0x4d, 0x69, - 0x67, 0x72, 0x61, 0x74, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x27, - 0x0a, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4b, - 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, - 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, - 0x14, 0x0a, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, - 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x12, 0x37, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x74, 0x6f, - 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, - 0x65, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x6c, - 0x0a, 0x1b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, - 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x53, 0x65, - 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, - 0x65, 0x52, 0x19, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x1d, 0x0a, 0x0a, - 0x61, 0x6c, 0x6c, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x09, 0x61, 0x6c, 0x6c, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x69, - 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x09, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x0d, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x54, 0x61, 0x62, 0x6c, - 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x74, 0x61, - 0x62, 0x6c, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x65, 0x78, 0x63, 0x6c, - 0x75, 0x64, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x28, 0x0a, 0x10, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x7a, 0x6f, 0x6e, 0x65, 0x18, 0x0b, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x5a, - 0x6f, 0x6e, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x6e, 0x5f, 0x64, 0x64, 0x6c, 0x18, 0x0c, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x6e, 0x44, 0x64, 0x6c, 0x12, 0x26, 0x0a, 0x0f, 0x73, 0x74, - 0x6f, 0x70, 0x5f, 0x61, 0x66, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x70, 0x79, 0x18, 0x0d, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x0d, 0x73, 0x74, 0x6f, 0x70, 0x41, 0x66, 0x74, 0x65, 0x72, 0x43, 0x6f, - 0x70, 0x79, 0x12, 0x2a, 0x0a, 0x11, 0x64, 0x72, 0x6f, 0x70, 0x5f, 0x66, 0x6f, 0x72, 0x65, 0x69, - 0x67, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x64, - 0x72, 0x6f, 0x70, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x30, - 0x0a, 0x14, 0x64, 0x65, 0x66, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x61, 0x72, - 0x79, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x64, 0x65, - 0x66, 0x65, 0x72, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x73, - 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x10, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x61, 0x75, 0x74, 0x6f, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, - 0x28, 0x0a, 0x10, 0x6e, 0x6f, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x75, - 0x6c, 0x65, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x6e, 0x6f, 0x52, 0x6f, 0x75, - 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x22, 0xe6, 0x01, 0x0a, 0x16, 0x4d, 0x69, - 0x67, 0x72, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, - 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6b, 0x65, 0x65, - 0x70, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6b, 0x65, - 0x65, 0x70, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2c, 0x0a, 0x12, 0x6b, 0x65, 0x65, 0x70, 0x5f, 0x72, - 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x10, 0x6b, 0x65, 0x65, 0x70, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, - 0x75, 0x6c, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x74, - 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x72, 0x65, 0x6e, - 0x61, 0x6d, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x64, 0x72, 0x79, - 0x5f, 0x72, 0x75, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x64, 0x72, 0x79, 0x52, - 0x75, 0x6e, 0x22, 0x5b, 0x0a, 0x17, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6d, - 0x70, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, - 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x26, 0x0a, 0x0f, 0x64, 0x72, 0x79, 0x5f, 0x72, - 0x75, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x0d, 0x64, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x22, - 0x85, 0x01, 0x0a, 0x14, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, - 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x6f, 0x70, 0x6f, - 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x6f, 0x70, - 0x6f, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x6f, 0x70, 0x6f, 0x5f, 0x73, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x6f, 0x70, 0x6f, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x6f, 0x70, 0x6f, 0x5f, 0x72, - 0x6f, 0x6f, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x6f, 0x70, 0x6f, 0x52, - 0x6f, 0x6f, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x17, 0x0a, 0x15, 0x4d, 0x6f, 0x75, 0x6e, 0x74, - 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x2c, 0x0a, 0x16, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x19, - 0x0a, 0x17, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, - 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x0a, 0x10, 0x4d, 0x6f, 0x75, - 0x6e, 0x74, 0x53, 0x68, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x22, 0x82, 0x01, 0x0a, 0x11, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x68, 0x6f, 0x77, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x6f, 0x70, 0x6f, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x6f, 0x70, 0x6f, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x6f, 0x70, 0x6f, 0x5f, 0x73, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x6f, 0x70, 0x6f, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x6f, 0x70, 0x6f, 0x5f, 0x72, 0x6f, - 0x6f, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x6f, 0x70, 0x6f, 0x52, 0x6f, - 0x6f, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x12, 0x0a, 0x10, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x4c, - 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x29, 0x0a, 0x11, 0x4d, 0x6f, - 0x75, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x14, 0x0a, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0x82, 0x07, 0x0a, 0x17, 0x4d, 0x6f, 0x76, 0x65, 0x54, 0x61, - 0x62, 0x6c, 0x65, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x27, 0x0a, - 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4b, 0x65, - 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, - 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, - 0x14, 0x0a, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, - 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x12, 0x37, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x74, 0x6f, - 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, - 0x65, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x6c, - 0x0a, 0x1b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, - 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x53, 0x65, - 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, - 0x65, 0x52, 0x19, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x23, 0x0a, 0x0d, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x18, 0x07, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, - 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x6c, 0x6c, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x61, 0x6c, 0x6c, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, - 0x12, 0x25, 0x0a, 0x0e, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x74, 0x61, 0x62, 0x6c, - 0x65, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, - 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x78, 0x63, 0x6c, 0x75, - 0x64, 0x65, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x0d, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x32, - 0x0a, 0x15, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x65, - 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x69, 0x6d, - 0x65, 0x5f, 0x7a, 0x6f, 0x6e, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x5a, 0x6f, 0x6e, 0x65, 0x12, 0x15, 0x0a, 0x06, - 0x6f, 0x6e, 0x5f, 0x64, 0x64, 0x6c, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x6e, - 0x44, 0x64, 0x6c, 0x12, 0x26, 0x0a, 0x0f, 0x73, 0x74, 0x6f, 0x70, 0x5f, 0x61, 0x66, 0x74, 0x65, - 0x72, 0x5f, 0x63, 0x6f, 0x70, 0x79, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x73, 0x74, - 0x6f, 0x70, 0x41, 0x66, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x70, 0x79, 0x12, 0x2a, 0x0a, 0x11, 0x64, - 0x72, 0x6f, 0x70, 0x5f, 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x73, - 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x64, 0x72, 0x6f, 0x70, 0x46, 0x6f, 0x72, 0x65, - 0x69, 0x67, 0x6e, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x64, 0x65, 0x66, 0x65, 0x72, - 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, - 0x10, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x64, 0x65, 0x66, 0x65, 0x72, 0x53, 0x65, 0x63, 0x6f, - 0x6e, 0x64, 0x61, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x75, 0x74, - 0x6f, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x61, - 0x75, 0x74, 0x6f, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x6e, 0x6f, 0x5f, 0x72, - 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x12, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x0e, 0x6e, 0x6f, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, - 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x74, 0x6f, 0x6d, 0x69, 0x63, 0x5f, 0x63, 0x6f, 0x70, - 0x79, 0x18, 0x13, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x61, 0x74, 0x6f, 0x6d, 0x69, 0x63, 0x43, - 0x6f, 0x70, 0x79, 0x12, 0x45, 0x0a, 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, - 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, - 0x6f, 0x77, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0f, 0x77, 0x6f, 0x72, 0x6b, 0x66, - 0x6c, 0x6f, 0x77, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xd5, 0x01, 0x0a, 0x18, 0x4d, - 0x6f, 0x76, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, - 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, - 0x79, 0x12, 0x48, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4d, - 0x6f, 0x76, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x1a, 0x55, 0x0a, 0x0a, 0x54, - 0x61, 0x62, 0x6c, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2d, 0x0a, 0x06, 0x74, 0x61, 0x62, - 0x6c, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, - 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, - 0x52, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x64, 0x22, 0x81, 0x02, 0x0a, 0x19, 0x4d, 0x6f, 0x76, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, - 0x73, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x27, 0x0a, 0x0f, - 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4b, 0x65, 0x79, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6b, 0x65, 0x65, 0x70, 0x5f, 0x64, 0x61, - 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6b, 0x65, 0x65, 0x70, 0x44, 0x61, - 0x74, 0x61, 0x12, 0x2c, 0x0a, 0x12, 0x6b, 0x65, 0x65, 0x70, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x69, - 0x6e, 0x67, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, - 0x6b, 0x65, 0x65, 0x70, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, - 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, - 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x54, - 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x64, 0x72, 0x79, 0x5f, 0x72, 0x75, 0x6e, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x64, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x12, 0x16, - 0x0a, 0x06, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, - 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x22, 0x5e, 0x0a, 0x1a, 0x4d, 0x6f, 0x76, 0x65, 0x54, 0x61, - 0x62, 0x6c, 0x65, 0x73, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x26, - 0x0a, 0x0f, 0x64, 0x72, 0x79, 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x64, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x52, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x22, 0x4d, 0x0a, 0x11, 0x50, 0x69, 0x6e, 0x67, 0x54, 0x61, - 0x62, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, - 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, - 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, - 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x14, 0x0a, 0x12, 0x50, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x62, - 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xd6, 0x03, 0x0a, 0x1b, - 0x50, 0x6c, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x52, 0x65, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x53, - 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, - 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, - 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x36, 0x0a, - 0x0b, 0x6e, 0x65, 0x77, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, - 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0a, 0x6e, 0x65, 0x77, 0x50, 0x72, - 0x69, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x3a, 0x0a, 0x0d, 0x61, 0x76, 0x6f, 0x69, 0x64, 0x5f, 0x70, - 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, - 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, - 0x69, 0x61, 0x73, 0x52, 0x0c, 0x61, 0x76, 0x6f, 0x69, 0x64, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, - 0x79, 0x12, 0x44, 0x0a, 0x15, 0x77, 0x61, 0x69, 0x74, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, - 0x61, 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x10, 0x2e, 0x76, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x13, 0x77, 0x61, 0x69, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, - 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x4c, 0x0a, 0x19, 0x74, 0x6f, 0x6c, 0x65, 0x72, - 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x6c, 0x61, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x74, 0x74, - 0x69, 0x6d, 0x65, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x17, 0x74, 0x6f, - 0x6c, 0x65, 0x72, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x4c, 0x61, 0x67, 0x12, 0x3b, 0x0a, 0x1a, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x63, - 0x72, 0x6f, 0x73, 0x73, 0x5f, 0x63, 0x65, 0x6c, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, 0x61, 0x6c, 0x6c, 0x6f, 0x77, - 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x65, 0x6c, 0x6c, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x10, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x70, - 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, - 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, - 0x69, 0x61, 0x73, 0x52, 0x0f, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, - 0x6d, 0x61, 0x72, 0x79, 0x22, 0xba, 0x01, 0x0a, 0x1c, 0x50, 0x6c, 0x61, 0x6e, 0x6e, 0x65, 0x64, - 0x52, 0x65, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x40, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x6d, 0x6f, - 0x74, 0x65, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, - 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, - 0x65, 0x64, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x26, 0x0a, 0x06, 0x65, 0x76, 0x65, - 0x6e, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6c, 0x6f, 0x67, 0x75, - 0x74, 0x69, 0x6c, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, - 0x73, 0x22, 0x74, 0x0a, 0x1b, 0x52, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x4b, 0x65, 0x79, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x27, 0x0a, 0x0f, + 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x57, 0x6f, 0x72, + 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x22, 0x77, 0x0a, 0x1f, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x56, + 0x69, 0x6e, 0x64, 0x65, 0x78, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x77, 0x6f, 0x72, 0x6b, + 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x73, 0x74, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x0f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x6f, 0x70, + 0x70, 0x65, 0x64, 0x12, 0x29, 0x0a, 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, + 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x77, + 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x22, 0x77, + 0x0a, 0x1e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x56, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, - 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x63, 0x65, 0x6c, - 0x6c, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x70, 0x61, 0x72, 0x74, - 0x69, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x61, 0x6c, 0x6c, 0x6f, 0x77, - 0x50, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x22, 0x1e, 0x0a, 0x1c, 0x52, 0x65, 0x62, 0x75, 0x69, - 0x6c, 0x64, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, 0x0a, 0x1a, 0x52, 0x65, 0x62, 0x75, 0x69, - 0x6c, 0x64, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x22, 0x1d, 0x0a, 0x1b, 0x52, - 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x47, 0x72, 0x61, - 0x70, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4f, 0x0a, 0x13, 0x52, 0x65, - 0x66, 0x72, 0x65, 0x73, 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x4b, + 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x21, 0x0a, 0x1f, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, + 0x70, 0x56, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x69, + 0x7a, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x56, 0x0a, 0x18, 0x4d, 0x61, + 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, + 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x73, 0x22, 0x1b, 0x0a, 0x19, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, + 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0xdd, 0x05, 0x0a, 0x14, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, + 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, + 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6b, + 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x27, 0x0a, + 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4b, 0x65, + 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x6f, 0x75, 0x6e, + 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x05, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x12, 0x37, 0x0a, 0x0c, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, + 0x0e, 0x32, 0x14, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, + 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, + 0x79, 0x70, 0x65, 0x73, 0x12, 0x6c, 0x0a, 0x1b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x73, + 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, + 0x6e, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, + 0x62, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x65, + 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x19, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x53, + 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, + 0x63, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x6c, 0x6c, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x61, 0x6c, 0x6c, 0x54, 0x61, 0x62, 0x6c, 0x65, + 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x74, 0x61, 0x62, + 0x6c, 0x65, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x69, 0x6e, 0x63, 0x6c, 0x75, + 0x64, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x78, 0x63, 0x6c, + 0x75, 0x64, 0x65, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x0d, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, + 0x28, 0x0a, 0x10, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x7a, + 0x6f, 0x6e, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x54, 0x69, 0x6d, 0x65, 0x5a, 0x6f, 0x6e, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x6e, 0x5f, + 0x64, 0x64, 0x6c, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x6e, 0x44, 0x64, 0x6c, + 0x12, 0x26, 0x0a, 0x0f, 0x73, 0x74, 0x6f, 0x70, 0x5f, 0x61, 0x66, 0x74, 0x65, 0x72, 0x5f, 0x63, + 0x6f, 0x70, 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x73, 0x74, 0x6f, 0x70, 0x41, + 0x66, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x70, 0x79, 0x12, 0x2a, 0x0a, 0x11, 0x64, 0x72, 0x6f, 0x70, + 0x5f, 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x0e, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x0f, 0x64, 0x72, 0x6f, 0x70, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, + 0x4b, 0x65, 0x79, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x64, 0x65, 0x66, 0x65, 0x72, 0x5f, 0x73, 0x65, + 0x63, 0x6f, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x0f, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x12, 0x64, 0x65, 0x66, 0x65, 0x72, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x61, + 0x72, 0x79, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x61, 0x75, 0x74, 0x6f, + 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x6e, 0x6f, 0x5f, 0x72, 0x6f, 0x75, 0x74, + 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0e, 0x6e, 0x6f, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x22, + 0xe6, 0x01, 0x0a, 0x16, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x6c, + 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, + 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, + 0x1b, 0x0a, 0x09, 0x6b, 0x65, 0x65, 0x70, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x08, 0x6b, 0x65, 0x65, 0x70, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2c, 0x0a, 0x12, + 0x6b, 0x65, 0x65, 0x70, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x6b, 0x65, 0x65, 0x70, 0x52, 0x6f, + 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, + 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0c, 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, + 0x17, 0x0a, 0x07, 0x64, 0x72, 0x79, 0x5f, 0x72, 0x75, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x06, 0x64, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x22, 0x5b, 0x0a, 0x17, 0x4d, 0x69, 0x67, 0x72, + 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x26, 0x0a, + 0x0f, 0x64, 0x72, 0x79, 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x64, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x52, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x73, 0x22, 0x85, 0x01, 0x0a, 0x14, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x52, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, + 0x0a, 0x09, 0x74, 0x6f, 0x70, 0x6f, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x74, 0x6f, 0x70, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x74, + 0x6f, 0x70, 0x6f, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x74, 0x6f, 0x70, 0x6f, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, + 0x74, 0x6f, 0x70, 0x6f, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x74, 0x6f, 0x70, 0x6f, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x17, 0x0a, + 0x15, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x0a, 0x16, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x55, + 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x6e, 0x72, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x26, 0x0a, 0x10, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x68, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x82, 0x01, 0x0a, 0x11, 0x4d, 0x6f, 0x75, 0x6e, + 0x74, 0x53, 0x68, 0x6f, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, + 0x09, 0x74, 0x6f, 0x70, 0x6f, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x74, 0x6f, 0x70, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x6f, + 0x70, 0x6f, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x74, 0x6f, 0x70, 0x6f, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x74, + 0x6f, 0x70, 0x6f, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x74, 0x6f, 0x70, 0x6f, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x12, 0x0a, 0x10, + 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x22, 0x29, 0x0a, 0x11, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0x82, 0x07, 0x0a, 0x17, + 0x4d, 0x6f, 0x76, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6b, 0x65, + 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x27, 0x0a, 0x0f, + 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4b, 0x65, 0x79, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x04, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x12, 0x37, 0x0a, 0x0c, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, + 0x0e, 0x32, 0x14, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, + 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, + 0x79, 0x70, 0x65, 0x73, 0x12, 0x6c, 0x0a, 0x1b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x73, + 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, + 0x6e, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, + 0x62, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x65, + 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x19, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x53, + 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, + 0x63, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x73, 0x68, 0x61, + 0x72, 0x64, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x6c, 0x6c, 0x5f, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x61, 0x6c, 0x6c, + 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, + 0x65, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, + 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x25, 0x0a, + 0x0e, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, + 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x54, 0x61, + 0x62, 0x6c, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0b, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x13, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x7a, 0x6f, 0x6e, 0x65, 0x18, 0x0c, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x5a, 0x6f, + 0x6e, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x6e, 0x5f, 0x64, 0x64, 0x6c, 0x18, 0x0d, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x6f, 0x6e, 0x44, 0x64, 0x6c, 0x12, 0x26, 0x0a, 0x0f, 0x73, 0x74, 0x6f, + 0x70, 0x5f, 0x61, 0x66, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x70, 0x79, 0x18, 0x0e, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x0d, 0x73, 0x74, 0x6f, 0x70, 0x41, 0x66, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x70, + 0x79, 0x12, 0x2a, 0x0a, 0x11, 0x64, 0x72, 0x6f, 0x70, 0x5f, 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, + 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x64, 0x72, + 0x6f, 0x70, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x30, 0x0a, + 0x14, 0x64, 0x65, 0x66, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x61, 0x72, 0x79, + 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x64, 0x65, 0x66, + 0x65, 0x72, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x73, 0x12, + 0x1d, 0x0a, 0x0a, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x11, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x09, 0x61, 0x75, 0x74, 0x6f, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x28, + 0x0a, 0x10, 0x6e, 0x6f, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x6e, 0x6f, 0x52, 0x6f, 0x75, 0x74, + 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x74, 0x6f, 0x6d, + 0x69, 0x63, 0x5f, 0x63, 0x6f, 0x70, 0x79, 0x18, 0x13, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x61, + 0x74, 0x6f, 0x6d, 0x69, 0x63, 0x43, 0x6f, 0x70, 0x79, 0x12, 0x45, 0x0a, 0x10, 0x77, 0x6f, 0x72, + 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x14, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, + 0x0f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x22, 0xd5, 0x01, 0x0a, 0x18, 0x4d, 0x6f, 0x76, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, + 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x48, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, + 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4d, 0x6f, 0x76, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x61, + 0x62, 0x6c, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, + 0x73, 0x1a, 0x55, 0x0a, 0x0a, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, + 0x2d, 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, + 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x12, 0x18, + 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x22, 0x81, 0x02, 0x0a, 0x19, 0x4d, 0x6f, 0x76, + 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, + 0x6f, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, + 0x6f, 0x77, 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x6b, 0x65, 0x79, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x61, 0x72, + 0x67, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6b, + 0x65, 0x65, 0x70, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, + 0x6b, 0x65, 0x65, 0x70, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2c, 0x0a, 0x12, 0x6b, 0x65, 0x65, 0x70, + 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x6b, 0x65, 0x65, 0x70, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, + 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, + 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x72, + 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x64, + 0x72, 0x79, 0x5f, 0x72, 0x75, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x64, 0x72, + 0x79, 0x52, 0x75, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x18, 0x08, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x22, 0x5e, 0x0a, 0x1a, + 0x4d, 0x6f, 0x76, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, + 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, + 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x6d, + 0x6d, 0x61, 0x72, 0x79, 0x12, 0x26, 0x0a, 0x0f, 0x64, 0x72, 0x79, 0x5f, 0x72, 0x75, 0x6e, 0x5f, + 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x64, + 0x72, 0x79, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x22, 0x4d, 0x0a, 0x11, + 0x50, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0b, - 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x16, 0x0a, 0x14, 0x52, - 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x64, 0x0a, 0x1a, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x14, 0x0a, 0x12, 0x50, + 0x69, 0x6e, 0x67, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0xd6, 0x03, 0x0a, 0x1b, 0x50, 0x6c, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x52, 0x65, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, - 0x61, 0x72, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x22, 0x83, 0x01, 0x0a, 0x1b, 0x52, 0x65, - 0x66, 0x72, 0x65, 0x73, 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, - 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x69, 0x73, 0x5f, - 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x69, 0x73, 0x50, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, - 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x12, 0x36, 0x0a, 0x17, 0x70, 0x61, 0x72, 0x74, 0x69, - 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, - 0x6c, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, - 0x6c, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, - 0x4f, 0x0a, 0x13, 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, - 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, - 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, - 0x69, 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, - 0x22, 0x16, 0x0a, 0x14, 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa9, 0x01, 0x0a, 0x1b, 0x52, 0x65, 0x6c, - 0x6f, 0x61, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x77, 0x61, 0x69, 0x74, 0x5f, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x77, 0x61, 0x69, - 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x0a, 0x0f, 0x69, 0x6e, 0x63, - 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x0e, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x50, 0x72, 0x69, 0x6d, 0x61, - 0x72, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, - 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, - 0x65, 0x6e, 0x63, 0x79, 0x22, 0x46, 0x0a, 0x1c, 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6c, 0x6f, 0x67, 0x75, 0x74, 0x69, 0x6c, 0x2e, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xbc, 0x01, 0x0a, - 0x18, 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x53, 0x68, 0x61, - 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x77, - 0x61, 0x69, 0x74, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0c, 0x77, 0x61, 0x69, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x27, 0x0a, 0x0f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x70, 0x72, 0x69, 0x6d, - 0x61, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x69, 0x6e, 0x63, 0x6c, 0x75, - 0x64, 0x65, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, - 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, - 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x22, 0x43, 0x0a, 0x19, 0x52, - 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x53, 0x68, 0x61, 0x72, 0x64, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, - 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6c, 0x6f, 0x67, 0x75, 0x74, - 0x69, 0x6c, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, - 0x22, 0x5b, 0x0a, 0x13, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, + 0x61, 0x72, 0x64, 0x12, 0x36, 0x0a, 0x0b, 0x6e, 0x65, 0x77, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x61, + 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, + 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, + 0x0a, 0x6e, 0x65, 0x77, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x3a, 0x0a, 0x0d, 0x61, + 0x76, 0x6f, 0x69, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, + 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0c, 0x61, 0x76, 0x6f, 0x69, 0x64, + 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x44, 0x0a, 0x15, 0x77, 0x61, 0x69, 0x74, 0x5f, + 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x2e, + 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x77, 0x61, 0x69, 0x74, 0x52, 0x65, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x4c, 0x0a, + 0x19, 0x74, 0x6f, 0x6c, 0x65, 0x72, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x61, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x10, 0x2e, 0x76, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x17, 0x74, 0x6f, 0x6c, 0x65, 0x72, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x70, + 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x61, 0x67, 0x12, 0x3b, 0x0a, 0x1a, 0x61, + 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x63, 0x72, 0x6f, 0x73, 0x73, 0x5f, 0x63, 0x65, 0x6c, 0x6c, 0x5f, + 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x17, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x65, 0x6c, 0x6c, 0x50, + 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x10, 0x65, 0x78, 0x70, 0x65, + 0x63, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, + 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0f, 0x65, 0x78, 0x70, 0x65, 0x63, + 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x22, 0xba, 0x01, 0x0a, 0x1c, 0x50, + 0x6c, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x52, 0x65, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x68, + 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6b, + 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, + 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x40, 0x0a, + 0x10, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, + 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0f, + 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x12, + 0x26, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x0e, 0x2e, 0x6c, 0x6f, 0x67, 0x75, 0x74, 0x69, 0x6c, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, + 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x74, 0x0a, 0x1b, 0x52, 0x65, 0x62, 0x75, 0x69, + 0x6c, 0x64, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x6c, 0x6c, 0x6f, + 0x77, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0c, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x50, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x22, 0x1e, 0x0a, + 0x1c, 0x52, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, 0x0a, + 0x1a, 0x52, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x47, + 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x63, + 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x63, 0x65, 0x6c, 0x6c, + 0x73, 0x22, 0x1d, 0x0a, 0x1b, 0x52, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x56, 0x53, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x4f, 0x0a, 0x13, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, + 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, + 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, + 0x73, 0x22, 0x16, 0x0a, 0x14, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x64, 0x0a, 0x1a, 0x52, 0x65, 0x66, + 0x72, 0x65, 0x73, 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x16, 0x0a, - 0x14, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x7f, 0x0a, 0x19, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4b, - 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x65, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, - 0x0a, 0x04, 0x63, 0x65, 0x6c, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x65, - 0x6c, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x75, - 0x72, 0x73, 0x69, 0x76, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x72, 0x65, 0x63, - 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x22, 0x1c, 0x0a, 0x1a, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, - 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x65, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9b, 0x01, 0x0a, 0x16, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, - 0x68, 0x61, 0x72, 0x64, 0x43, 0x65, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, - 0x68, 0x61, 0x72, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x73, 0x68, 0x61, 0x72, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x65, - 0x6c, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x65, 0x6c, 0x6c, 0x12, 0x14, - 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, - 0x6f, 0x72, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, - 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, - 0x76, 0x65, 0x22, 0x19, 0x0a, 0x17, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x68, 0x61, 0x72, - 0x64, 0x43, 0x65, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x46, 0x0a, - 0x15, 0x52, 0x65, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, - 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x06, 0x74, - 0x61, 0x62, 0x6c, 0x65, 0x74, 0x22, 0x7b, 0x0a, 0x16, 0x52, 0x65, 0x70, 0x61, 0x72, 0x65, 0x6e, - 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x65, 0x6c, + 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x22, + 0x83, 0x01, 0x0a, 0x1b, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x2c, 0x0a, 0x12, 0x69, 0x73, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x72, 0x65, + 0x66, 0x72, 0x65, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x69, 0x73, 0x50, + 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x12, 0x36, 0x0a, + 0x17, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, + 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, + 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x44, 0x65, + 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, 0x4f, 0x0a, 0x13, 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x53, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, + 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x16, 0x0a, 0x14, 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, + 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa9, + 0x01, 0x0a, 0x1b, 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4b, + 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, + 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x77, 0x61, + 0x69, 0x74, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0c, 0x77, 0x61, 0x69, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x27, 0x0a, 0x0f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x61, + 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, + 0x65, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x63, + 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x63, + 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x22, 0x46, 0x0a, 0x1c, 0x52, 0x65, + 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x06, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6c, 0x6f, 0x67, + 0x75, 0x74, 0x69, 0x6c, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, + 0x74, 0x73, 0x22, 0xbc, 0x01, 0x0a, 0x18, 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, - 0x64, 0x12, 0x2f, 0x0a, 0x07, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, - 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x07, 0x70, 0x72, 0x69, 0x6d, 0x61, - 0x72, 0x79, 0x22, 0xd6, 0x04, 0x0a, 0x14, 0x52, 0x65, 0x73, 0x68, 0x61, 0x72, 0x64, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x77, - 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, - 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x73, 0x68, - 0x61, 0x72, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x61, 0x72, 0x67, - 0x65, 0x74, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x0c, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x73, 0x12, 0x14, 0x0a, - 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x63, 0x65, - 0x6c, 0x6c, 0x73, 0x12, 0x37, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x74, 0x79, - 0x70, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x74, 0x6f, 0x70, 0x6f, - 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, - 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x6c, 0x0a, 0x1b, - 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x2c, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, - 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x6c, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, - 0x19, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x73, 0x6b, - 0x69, 0x70, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x63, 0x6f, 0x70, 0x79, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x73, 0x6b, 0x69, 0x70, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x43, 0x6f, 0x70, 0x79, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x6e, 0x5f, 0x64, 0x64, 0x6c, 0x18, 0x09, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x6e, 0x44, 0x64, 0x6c, 0x12, 0x26, 0x0a, 0x0f, 0x73, - 0x74, 0x6f, 0x70, 0x5f, 0x61, 0x66, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x70, 0x79, 0x18, 0x0a, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x73, 0x74, 0x6f, 0x70, 0x41, 0x66, 0x74, 0x65, 0x72, 0x43, - 0x6f, 0x70, 0x79, 0x12, 0x30, 0x0a, 0x14, 0x64, 0x65, 0x66, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x63, - 0x6f, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x12, 0x64, 0x65, 0x66, 0x65, 0x72, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x61, 0x72, - 0x79, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x61, 0x75, 0x74, 0x6f, 0x53, - 0x74, 0x61, 0x72, 0x74, 0x12, 0x45, 0x0a, 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, - 0x6c, 0x6f, 0x77, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0f, 0x77, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xb8, 0x02, 0x0a, 0x18, - 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x42, 0x61, 0x63, 0x6b, 0x75, - 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, - 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, - 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, - 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, - 0x61, 0x73, 0x12, 0x2d, 0x0a, 0x0b, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x5f, 0x74, 0x69, 0x6d, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x76, 0x74, 0x74, 0x69, 0x6d, 0x65, - 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x0a, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x54, 0x69, 0x6d, - 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x74, 0x6f, 0x5f, - 0x70, 0x6f, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x74, 0x6f, - 0x72, 0x65, 0x54, 0x6f, 0x50, 0x6f, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x64, 0x72, 0x79, 0x5f, 0x72, - 0x75, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x64, 0x72, 0x79, 0x52, 0x75, 0x6e, - 0x12, 0x3e, 0x0a, 0x14, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x74, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, - 0x2e, 0x76, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x12, 0x72, 0x65, - 0x73, 0x74, 0x6f, 0x72, 0x65, 0x54, 0x6f, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x12, 0x34, 0x0a, 0x16, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x62, 0x61, 0x63, 0x6b, - 0x75, 0x70, 0x5f, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x14, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x45, - 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x73, 0x22, 0xad, 0x01, 0x0a, 0x19, 0x52, 0x65, 0x73, 0x74, 0x6f, - 0x72, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, - 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, - 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, - 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x1a, - 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, - 0x61, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, - 0x12, 0x24, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x0e, 0x2e, 0x6c, 0x6f, 0x67, 0x75, 0x74, 0x69, 0x6c, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, - 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x4d, 0x0a, 0x1b, 0x52, 0x65, 0x74, 0x72, 0x79, 0x53, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x77, 0x61, 0x69, 0x74, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x77, 0x61, 0x69, 0x74, 0x50, 0x6f, + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x0a, 0x0f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, + 0x65, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0e, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x12, + 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, + 0x79, 0x22, 0x43, 0x0a, 0x19, 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, + 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, + 0x2e, 0x6c, 0x6f, 0x67, 0x75, 0x74, 0x69, 0x6c, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x06, + 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x5b, 0x0a, 0x13, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, + 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, + 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, + 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x22, 0x16, 0x0a, 0x14, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x42, 0x61, 0x63, + 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x7f, 0x0a, 0x19, 0x52, + 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x65, 0x6c, + 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x65, 0x6c, 0x6c, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x63, 0x65, 0x6c, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x12, 0x1c, + 0x0a, 0x09, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x09, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x22, 0x1c, 0x0a, 0x1a, + 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x65, + 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9b, 0x01, 0x0a, 0x16, 0x52, + 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x43, 0x65, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x75, 0x75, 0x69, 0x64, 0x22, 0xdd, 0x01, 0x0a, 0x1c, 0x52, 0x65, 0x74, 0x72, 0x79, 0x53, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x75, 0x0a, 0x16, 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x61, - 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, - 0x74, 0x61, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x69, - 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, - 0x52, 0x6f, 0x77, 0x73, 0x41, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x42, 0x79, 0x53, 0x68, - 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x13, 0x72, 0x6f, 0x77, 0x73, 0x41, 0x66, - 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x1a, 0x46, 0x0a, - 0x18, 0x52, 0x6f, 0x77, 0x73, 0x41, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x42, 0x79, 0x53, - 0x68, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x51, 0x0a, 0x15, 0x52, 0x75, 0x6e, 0x48, 0x65, 0x61, 0x6c, - 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, + 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x68, 0x61, 0x72, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x68, 0x61, 0x72, 0x64, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x12, 0x0a, 0x04, 0x63, 0x65, 0x6c, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x63, 0x65, 0x6c, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, + 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x72, + 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x22, 0x19, 0x0a, 0x17, 0x52, 0x65, 0x6d, 0x6f, + 0x76, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x43, 0x65, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x46, 0x0a, 0x15, 0x52, 0x65, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x54, + 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x06, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, + 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, + 0x69, 0x61, 0x73, 0x52, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x22, 0x7b, 0x0a, 0x16, 0x52, + 0x65, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x2f, 0x0a, 0x07, 0x70, 0x72, 0x69, 0x6d, 0x61, + 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, + 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, + 0x07, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x22, 0xd6, 0x04, 0x0a, 0x14, 0x52, 0x65, 0x73, + 0x68, 0x61, 0x72, 0x64, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x1a, 0x0a, + 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x73, 0x12, 0x23, + 0x0a, 0x0d, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x18, + 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x53, 0x68, 0x61, + 0x72, 0x64, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x12, 0x37, 0x0a, 0x0c, 0x74, 0x61, 0x62, + 0x6c, 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0e, 0x32, + 0x14, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, + 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, + 0x65, 0x73, 0x12, 0x6c, 0x0a, 0x1b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x6c, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, + 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, + 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, + 0x65, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x66, 0x65, + 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x19, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x6c, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, + 0x12, 0x28, 0x0a, 0x10, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, + 0x63, 0x6f, 0x70, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x73, 0x6b, 0x69, 0x70, + 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x43, 0x6f, 0x70, 0x79, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x6e, + 0x5f, 0x64, 0x64, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x6e, 0x44, 0x64, + 0x6c, 0x12, 0x26, 0x0a, 0x0f, 0x73, 0x74, 0x6f, 0x70, 0x5f, 0x61, 0x66, 0x74, 0x65, 0x72, 0x5f, + 0x63, 0x6f, 0x70, 0x79, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x73, 0x74, 0x6f, 0x70, + 0x41, 0x66, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x70, 0x79, 0x12, 0x30, 0x0a, 0x14, 0x64, 0x65, 0x66, + 0x65, 0x72, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x5f, 0x6b, 0x65, 0x79, + 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x64, 0x65, 0x66, 0x65, 0x72, 0x53, 0x65, + 0x63, 0x6f, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x61, + 0x75, 0x74, 0x6f, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x09, 0x61, 0x75, 0x74, 0x6f, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x45, 0x0a, 0x10, 0x77, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0d, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x52, 0x0f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x22, 0xb8, 0x02, 0x0a, 0x18, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x46, 0x72, 0x6f, + 0x6d, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, - 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x18, 0x0a, 0x16, 0x52, 0x75, 0x6e, 0x48, - 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x6d, 0x0a, 0x22, 0x53, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x44, 0x75, 0x72, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x64, 0x75, 0x72, 0x61, 0x62, 0x69, 0x6c, 0x69, - 0x74, 0x79, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x10, 0x64, 0x75, 0x72, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x22, 0x55, 0x0a, 0x23, 0x53, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x44, 0x75, 0x72, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x74, 0x6f, 0x70, - 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x08, - 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x5e, 0x0a, 0x1e, 0x53, 0x65, 0x74, 0x4b, - 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x49, - 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, - 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, - 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x4a, 0x04, 0x08, 0x02, - 0x10, 0x03, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x22, 0x51, 0x0a, 0x1f, 0x53, 0x65, 0x74, 0x4b, - 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x49, - 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x08, 0x6b, - 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, - 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x72, 0x0a, 0x1f, 0x53, - 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x49, 0x73, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, + 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x2d, 0x0a, 0x0b, 0x62, 0x61, 0x63, 0x6b, + 0x75, 0x70, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, + 0x76, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x0a, 0x62, 0x61, 0x63, + 0x6b, 0x75, 0x70, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x74, 0x6f, + 0x72, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x70, 0x6f, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0c, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x54, 0x6f, 0x50, 0x6f, 0x73, 0x12, 0x17, 0x0a, + 0x07, 0x64, 0x72, 0x79, 0x5f, 0x72, 0x75, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, + 0x64, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x12, 0x3e, 0x0a, 0x14, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, + 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x76, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x52, 0x12, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x54, 0x6f, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x34, 0x0a, 0x16, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, + 0x64, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x5f, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x73, + 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x14, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x42, + 0x61, 0x63, 0x6b, 0x75, 0x70, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x73, 0x22, 0xad, 0x01, 0x0a, + 0x19, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x42, 0x61, 0x63, 0x6b, + 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, + 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, + 0x6c, 0x69, 0x61, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x24, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6c, 0x6f, 0x67, 0x75, 0x74, 0x69, 0x6c, 0x2e, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x4d, 0x0a, 0x1b, + 0x52, 0x65, 0x74, 0x72, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, + 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, + 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x22, 0xdd, 0x01, 0x0a, 0x1c, + 0x52, 0x65, 0x74, 0x72, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x75, 0x0a, 0x16, + 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x61, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, + 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x76, + 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x53, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x6f, 0x77, 0x73, 0x41, 0x66, 0x66, 0x65, 0x63, 0x74, + 0x65, 0x64, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x13, + 0x72, 0x6f, 0x77, 0x73, 0x41, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x42, 0x79, 0x53, 0x68, + 0x61, 0x72, 0x64, 0x1a, 0x46, 0x0a, 0x18, 0x52, 0x6f, 0x77, 0x73, 0x41, 0x66, 0x66, 0x65, 0x63, + 0x74, 0x65, 0x64, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x51, 0x0a, 0x15, 0x52, + 0x75, 0x6e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, + 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, + 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, + 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x18, + 0x0a, 0x16, 0x52, 0x75, 0x6e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x6d, 0x0a, 0x22, 0x53, 0x65, 0x74, 0x4b, + 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x44, 0x75, 0x72, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, + 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, - 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, - 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x6e, 0x67, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x6e, 0x67, 0x22, - 0x49, 0x0a, 0x20, 0x53, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x49, 0x73, 0x50, 0x72, 0x69, - 0x6d, 0x61, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x68, - 0x61, 0x72, 0x64, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x22, 0x8e, 0x02, 0x0a, 0x1c, 0x53, - 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x43, 0x6f, 0x6e, - 0x74, 0x72, 0x6f, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, + 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x64, 0x75, + 0x72, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x64, 0x75, 0x72, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, + 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x55, 0x0a, 0x23, 0x53, 0x65, 0x74, 0x4b, 0x65, + 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x44, 0x75, 0x72, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, + 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, + 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x12, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x5e, + 0x0a, 0x1e, 0x53, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x68, 0x61, + 0x72, 0x64, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, + 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, + 0x63, 0x65, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x22, 0x51, + 0x0a, 0x1f, 0x53, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x68, 0x61, + 0x72, 0x64, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x2e, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4b, + 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x22, 0x72, 0x0a, 0x1f, 0x53, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x49, 0x73, 0x50, + 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x6e, 0x67, 0x22, 0x49, 0x0a, 0x20, 0x53, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, + 0x64, 0x49, 0x73, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x6e, + 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x05, 0x73, 0x68, 0x61, + 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, + 0x61, 0x74, 0x61, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, + 0x22, 0x8e, 0x02, 0x0a, 0x1c, 0x53, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x54, 0x61, 0x62, + 0x6c, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, + 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, + 0x61, 0x72, 0x64, 0x12, 0x35, 0x0a, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, + 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x65, + 0x6c, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, + 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x6e, 0x69, 0x65, 0x64, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x6e, 0x69, 0x65, 0x64, 0x54, + 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, + 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x6d, + 0x6f, 0x76, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x72, 0x65, 0x6d, 0x6f, 0x76, + 0x65, 0x22, 0x46, 0x0a, 0x1d, 0x53, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x54, 0x61, 0x62, + 0x6c, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x25, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0f, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x68, 0x61, + 0x72, 0x64, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x22, 0x6a, 0x0a, 0x12, 0x53, 0x65, 0x74, + 0x57, 0x72, 0x69, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x72, 0x69, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x77, 0x72, 0x69, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x15, 0x0a, 0x13, 0x53, 0x65, 0x74, 0x57, 0x72, 0x69, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x88, 0x01, 0x0a, + 0x1a, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x41, 0x64, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x35, 0x0a, - 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, - 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x04, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, - 0x6e, 0x69, 0x65, 0x64, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x0c, 0x64, 0x65, 0x6e, 0x69, 0x65, 0x64, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, - 0x32, 0x0a, 0x15, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, - 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x06, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x22, 0x46, 0x0a, 0x1d, 0x53, - 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x43, 0x6f, 0x6e, - 0x74, 0x72, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x05, - 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x74, 0x6f, - 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x05, 0x73, 0x68, - 0x61, 0x72, 0x64, 0x22, 0x6a, 0x0a, 0x12, 0x53, 0x65, 0x74, 0x57, 0x72, 0x69, 0x74, 0x61, 0x62, - 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, - 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, - 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, - 0x69, 0x61, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x72, 0x69, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x77, 0x72, 0x69, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x22, - 0x15, 0x0a, 0x13, 0x53, 0x65, 0x74, 0x57, 0x72, 0x69, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x88, 0x01, 0x0a, 0x1a, 0x53, 0x68, 0x61, 0x72, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x38, 0x0a, + 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, + 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x1d, 0x0a, 0x1b, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x64, 0x64, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x62, 0x0a, 0x1a, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, + 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x78, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x65, 0x6c, 0x6c, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x65, 0x6c, 0x6c, 0x22, 0x54, 0x0a, 0x1b, 0x53, 0x68, + 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, + 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x05, 0x65, 0x72, 0x72, + 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, + 0x61, 0x74, 0x61, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, + 0x22, 0x54, 0x0a, 0x20, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x22, 0xaa, 0x03, 0x0a, 0x21, 0x53, 0x68, 0x61, 0x72, 0x64, + 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x73, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x78, 0x0a, 0x14, + 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x76, 0x74, 0x63, + 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x13, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x12, 0x5a, 0x0a, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, + 0x5f, 0x6d, 0x61, 0x70, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x76, 0x74, 0x63, + 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x4d, + 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x4d, + 0x61, 0x70, 0x1a, 0x5f, 0x0a, 0x18, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x12, 0x2d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x17, 0x2e, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x64, 0x61, 0x74, + 0x61, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x1a, 0x4e, 0x0a, 0x0e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x4d, 0x61, 0x70, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x26, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, + 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x22, 0x8b, 0x01, 0x0a, 0x1d, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, + 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, @@ -19052,190 +19100,206 @@ var file_vtctldata_proto_rawDesc = string([]byte{ 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, - 0x73, 0x22, 0x1d, 0x0a, 0x1b, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x64, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x62, 0x0a, 0x1a, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, - 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, - 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, - 0x12, 0x12, 0x0a, 0x04, 0x63, 0x65, 0x6c, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x63, 0x65, 0x6c, 0x6c, 0x22, 0x54, 0x0a, 0x1b, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, - 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x68, - 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x72, - 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x54, 0x0a, 0x20, 0x53, 0x68, - 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, - 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, - 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, - 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, - 0x22, 0xaa, 0x03, 0x0a, 0x21, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x78, 0x0a, 0x14, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, - 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x13, 0x72, 0x65, 0x70, - 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, - 0x12, 0x5a, 0x0a, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x6d, 0x61, 0x70, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, - 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x09, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x4d, 0x61, 0x70, 0x1a, 0x5f, 0x0a, 0x18, - 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2d, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x72, 0x65, 0x70, 0x6c, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x4e, 0x0a, - 0x0e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x26, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x10, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, - 0x65, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x8b, 0x01, - 0x0a, 0x1d, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, - 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, - 0x64, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, - 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, - 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0b, - 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x20, 0x0a, 0x1e, 0x53, - 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x7c, 0x0a, - 0x12, 0x53, 0x6c, 0x65, 0x65, 0x70, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, - 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, - 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, - 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x2c, 0x0a, - 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x10, 0x2e, 0x76, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x15, 0x0a, 0x13, 0x53, - 0x6c, 0x65, 0x65, 0x70, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0xf0, 0x01, 0x0a, 0x15, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x68, 0x61, - 0x72, 0x64, 0x41, 0x64, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, - 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x10, - 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x75, 0x69, 0x64, - 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x12, 0x2f, 0x0a, 0x09, - 0x6b, 0x65, 0x79, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x12, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x52, 0x61, - 0x6e, 0x67, 0x65, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x16, 0x0a, - 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x74, - 0x61, 0x62, 0x6c, 0x65, 0x73, 0x22, 0x3f, 0x0a, 0x16, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, - 0x68, 0x61, 0x72, 0x64, 0x41, 0x64, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x25, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, - 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, - 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x22, 0x5e, 0x0a, 0x18, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x53, 0x68, 0x61, 0x72, 0x64, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x22, 0x20, 0x0a, 0x1e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x7c, 0x0a, 0x12, 0x53, 0x6c, 0x65, 0x65, 0x70, 0x54, 0x61, 0x62, 0x6c, + 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, + 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, + 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, + 0x69, 0x61, 0x73, 0x12, 0x2c, 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x44, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x22, 0x15, 0x0a, 0x13, 0x53, 0x6c, 0x65, 0x65, 0x70, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xf0, 0x01, 0x0a, 0x15, 0x53, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x41, 0x64, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x42, 0x0a, 0x19, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x53, 0x68, 0x61, 0x72, 0x64, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x68, - 0x61, 0x72, 0x64, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x22, 0x53, 0x0a, 0x17, 0x53, 0x74, - 0x61, 0x72, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, - 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, - 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, - 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, - 0x1a, 0x0a, 0x18, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x52, 0x0a, 0x16, 0x53, - 0x74, 0x6f, 0x70, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, - 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, - 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, - 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, - 0x19, 0x0a, 0x17, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x52, 0x0a, 0x21, 0x54, 0x61, - 0x62, 0x6c, 0x65, 0x74, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, - 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x2d, 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, - 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x22, 0xc6, - 0x01, 0x0a, 0x22, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, - 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x65, 0x64, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x36, 0x0a, 0x0b, 0x6e, 0x65, 0x77, 0x5f, 0x70, - 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, - 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, - 0x69, 0x61, 0x73, 0x52, 0x0a, 0x6e, 0x65, 0x77, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x12, - 0x36, 0x0a, 0x0b, 0x6f, 0x6c, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, - 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0a, 0x6f, 0x6c, 0x64, - 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x22, 0x5c, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x43, 0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2f, 0x0a, 0x09, 0x63, 0x65, 0x6c, 0x6c, 0x5f, 0x69, 0x6e, 0x66, - 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, - 0x74, 0x61, 0x2e, 0x43, 0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x63, 0x65, 0x6c, - 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x5d, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, - 0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x2f, 0x0a, 0x09, 0x63, 0x65, 0x6c, 0x6c, 0x5f, 0x69, 0x6e, 0x66, 0x6f, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, - 0x61, 0x2e, 0x43, 0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x63, 0x65, 0x6c, 0x6c, - 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x64, 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x65, - 0x6c, 0x6c, 0x73, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x0b, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x5f, 0x61, 0x6c, 0x69, - 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x43, 0x65, 0x6c, 0x6c, 0x73, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0a, - 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x65, 0x0a, 0x18, 0x55, 0x70, + 0x05, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, + 0x21, 0x0a, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x68, 0x61, + 0x72, 0x64, 0x12, 0x2f, 0x0a, 0x09, 0x6b, 0x65, 0x79, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x52, 0x61, + 0x6e, 0x67, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x07, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x22, 0x3f, 0x0a, 0x16, 0x53, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x41, 0x64, 0x64, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x22, 0x5e, 0x0a, 0x18, + 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, + 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x42, 0x0a, 0x19, + 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x05, 0x73, 0x68, 0x61, + 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, + 0x61, 0x74, 0x61, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, + 0x22, 0x53, 0x0a, 0x17, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, + 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, + 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x1a, 0x0a, 0x18, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x52, 0x0a, 0x16, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, + 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, + 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x19, 0x0a, 0x17, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x70, + 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x52, 0x0a, 0x21, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x65, 0x64, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x06, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x74, 0x22, 0xc6, 0x01, 0x0a, 0x22, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x45, + 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6b, + 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, + 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x36, 0x0a, + 0x0b, 0x6e, 0x65, 0x77, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, + 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0a, 0x6e, 0x65, 0x77, 0x50, 0x72, + 0x69, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x36, 0x0a, 0x0b, 0x6f, 0x6c, 0x64, 0x5f, 0x70, 0x72, 0x69, + 0x6d, 0x61, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, + 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, + 0x73, 0x52, 0x0a, 0x6f, 0x6c, 0x64, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x22, 0x5c, 0x0a, + 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2f, 0x0a, 0x09, 0x63, 0x65, + 0x6c, 0x6c, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, + 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, + 0x6f, 0x52, 0x08, 0x63, 0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x5d, 0x0a, 0x16, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2f, 0x0a, 0x09, 0x63, 0x65, 0x6c, + 0x6c, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x74, + 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x08, 0x63, 0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x64, 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x65, 0x6c, 0x6c, 0x73, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x0b, 0x63, 0x65, - 0x6c, 0x6c, 0x73, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x14, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x65, 0x6c, 0x6c, 0x73, - 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0a, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x41, 0x6c, 0x69, 0x61, - 0x73, 0x22, 0x34, 0x0a, 0x0f, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x61, 0x62, - 0x6c, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x70, 0x69, 0x6e, 0x67, - 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x73, 0x22, 0xfb, 0x01, 0x0a, 0x10, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, - 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x72, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x62, 0x0a, 0x13, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x73, 0x5f, 0x62, 0x79, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, 0x79, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x11, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, - 0x42, 0x79, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x1a, 0x69, 0x0a, 0x16, 0x52, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, 0x79, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x39, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, - 0x61, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x58, 0x0a, 0x17, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x65, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, - 0x70, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x0b, 0x70, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x73, 0x22, - 0xfc, 0x01, 0x0a, 0x18, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, - 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x72, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x61, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x73, 0x5f, 0x62, 0x79, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x37, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x0b, 0x63, 0x65, 0x6c, + 0x6c, 0x73, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, + 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x65, 0x6c, 0x6c, 0x73, 0x41, + 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0a, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x41, 0x6c, 0x69, 0x61, 0x73, + 0x22, 0x65, 0x0a, 0x18, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x65, 0x6c, 0x6c, 0x73, 0x41, + 0x6c, 0x69, 0x61, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x35, 0x0a, 0x0b, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x43, 0x65, 0x6c, 0x6c, 0x73, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0a, 0x63, 0x65, 0x6c, + 0x6c, 0x73, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x34, 0x0a, 0x0f, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x69, + 0x6e, 0x67, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0b, 0x70, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x73, 0x22, 0xfb, 0x01, + 0x0a, 0x10, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x62, 0x0a, 0x13, + 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x5f, 0x62, 0x79, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x76, 0x74, 0x63, 0x74, + 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, 0x79, + 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x11, 0x72, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, 0x79, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x1a, 0x69, 0x0a, 0x16, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, 0x79, 0x4b, 0x65, 0x79, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x39, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x76, 0x74, + 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x58, 0x0a, 0x17, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x70, 0x69, 0x6e, 0x67, 0x54, 0x61, + 0x62, 0x6c, 0x65, 0x74, 0x73, 0x22, 0xfc, 0x01, 0x0a, 0x18, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x61, 0x0a, 0x10, + 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x5f, 0x62, 0x79, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x73, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x0e, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x1a, + 0x63, 0x0a, 0x13, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, + 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x36, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, + 0x61, 0x74, 0x61, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x53, 0x68, 0x61, 0x72, + 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x22, 0x58, 0x0a, 0x22, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x4b, 0x65, 0x79, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, + 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, + 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x22, 0x25, + 0x0a, 0x23, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xf0, 0x01, 0x0a, 0x1d, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x65, 0x78, 0x63, + 0x6c, 0x75, 0x64, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, + 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0c, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x56, 0x69, 0x65, 0x77, 0x73, 0x12, + 0x26, 0x0a, 0x0f, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x6e, 0x6f, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x61, + 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x73, 0x6b, 0x69, 0x70, 0x4e, 0x6f, + 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x27, 0x0a, 0x0f, 0x69, 0x6e, 0x63, 0x6c, 0x75, + 0x64, 0x65, 0x5f, 0x76, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0e, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x56, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x12, 0x16, 0x0a, 0x06, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x06, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x22, 0x88, 0x02, 0x0a, 0x1e, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4b, 0x65, 0x79, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x67, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, + 0x5f, 0x62, 0x79, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x3d, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x73, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, + 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x1a, 0x63, + 0x0a, 0x13, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x36, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x22, 0x6b, 0x0a, 0x14, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x53, + 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, + 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, + 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x21, 0x0a, + 0x0c, 0x70, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x0b, 0x70, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x73, + 0x22, 0x31, 0x0a, 0x15, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x53, 0x68, 0x61, 0x72, + 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x73, 0x22, 0x3c, 0x0a, 0x1e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x22, 0x8a, 0x02, 0x0a, 0x1f, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, + 0x68, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x5f, 0x62, 0x79, 0x5f, 0x73, 0x68, + 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x76, 0x74, 0x63, 0x74, + 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x1a, 0x63, 0x0a, 0x13, 0x52, 0x65, 0x73, @@ -19244,432 +19308,361 @@ var file_vtctldata_proto_rawDesc = string([]byte{ 0x65, 0x79, 0x12, 0x36, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x58, - 0x0a, 0x22, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, + 0x6e, 0x73, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x4f, + 0x0a, 0x1b, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, + 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, + 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x22, + 0x38, 0x0a, 0x1c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x18, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x22, 0x98, 0x01, 0x0a, 0x16, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x06, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x22, 0x25, 0x0a, 0x23, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x65, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x4b, - 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0xf0, 0x01, 0x0a, 0x1d, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x25, 0x0a, - 0x0e, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x54, 0x61, - 0x62, 0x6c, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, - 0x76, 0x69, 0x65, 0x77, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, 0x6e, 0x63, - 0x6c, 0x75, 0x64, 0x65, 0x56, 0x69, 0x65, 0x77, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x73, 0x6b, 0x69, - 0x70, 0x5f, 0x6e, 0x6f, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x0d, 0x73, 0x6b, 0x69, 0x70, 0x4e, 0x6f, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, - 0x79, 0x12, 0x27, 0x0a, 0x0f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x76, 0x73, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x69, 0x6e, 0x63, 0x6c, - 0x75, 0x64, 0x65, 0x56, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x68, - 0x61, 0x72, 0x64, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x73, 0x68, 0x61, 0x72, - 0x64, 0x73, 0x22, 0x88, 0x02, 0x0a, 0x1e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x53, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, - 0x67, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x5f, 0x62, 0x79, 0x5f, 0x73, 0x68, - 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x76, 0x74, 0x63, 0x74, - 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x53, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, 0x79, 0x53, 0x68, - 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x73, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x1a, 0x63, 0x0a, 0x13, 0x52, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x73, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x36, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x20, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x6b, 0x0a, - 0x14, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x69, 0x6e, 0x67, 0x5f, - 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x70, - 0x69, 0x6e, 0x67, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x73, 0x22, 0x31, 0x0a, 0x15, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x22, 0x3c, 0x0a, - 0x1e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x8a, 0x02, 0x0a, 0x1f, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x4b, - 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x18, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x68, 0x0a, 0x10, 0x72, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x73, 0x5f, 0x62, 0x79, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x4b, - 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, + 0x52, 0x06, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x78, 0x63, 0x6c, + 0x75, 0x64, 0x65, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x0d, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, + 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x73, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x56, + 0x69, 0x65, 0x77, 0x73, 0x22, 0xfa, 0x01, 0x0a, 0x17, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x65, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x60, 0x0a, 0x10, 0x72, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x73, 0x5f, 0x62, 0x79, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, + 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x72, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x1a, 0x63, 0x0a, 0x13, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x52, 0x0e, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, 0x79, 0x53, 0x68, - 0x61, 0x72, 0x64, 0x1a, 0x63, 0x0a, 0x13, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, 0x79, - 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x36, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x74, - 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x4f, 0x0a, 0x1b, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x68, 0x61, 0x72, 0x64, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x22, 0x38, 0x0a, 0x1c, 0x56, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x68, 0x61, 0x72, - 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x73, 0x22, 0x98, 0x01, 0x0a, 0x16, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, - 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x68, - 0x61, 0x72, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x73, 0x68, 0x61, 0x72, - 0x64, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x74, 0x61, - 0x62, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x65, 0x78, 0x63, 0x6c, - 0x75, 0x64, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x63, - 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x0c, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x56, 0x69, 0x65, 0x77, 0x73, 0x22, 0xfa, - 0x01, 0x0a, 0x17, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x56, 0x53, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x73, 0x12, 0x60, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x5f, - 0x62, 0x79, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, - 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x65, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, - 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, - 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x1a, 0x63, 0x0a, 0x13, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x73, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x36, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, - 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xf9, 0x07, 0x0a, 0x12, - 0x56, 0x44, 0x69, 0x66, 0x66, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x27, - 0x0a, 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4b, - 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x65, 0x6c, 0x6c, 0x73, 0x12, 0x21, - 0x0a, 0x0c, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x05, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x43, 0x65, 0x6c, 0x6c, - 0x73, 0x12, 0x37, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, - 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, - 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x74, - 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x6c, 0x0a, 0x1b, 0x74, 0x61, - 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, - 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x2c, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x19, 0x74, - 0x61, 0x62, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, - 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, - 0x65, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, - 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x55, 0x0a, 0x1e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x65, 0x64, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x77, - 0x61, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, - 0x2e, 0x76, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x1b, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x57, 0x61, 0x69, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1f, 0x0a, - 0x0b, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x0b, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x0a, 0x64, 0x65, 0x62, 0x75, 0x67, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x1a, - 0x0a, 0x09, 0x6f, 0x6e, 0x6c, 0x79, 0x5f, 0x70, 0x5f, 0x6b, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x07, 0x6f, 0x6e, 0x6c, 0x79, 0x50, 0x4b, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x75, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, - 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, - 0x62, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x38, 0x0a, 0x19, 0x6d, 0x61, 0x78, 0x5f, - 0x65, 0x78, 0x74, 0x72, 0x61, 0x5f, 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x63, 0x6f, - 0x6d, 0x70, 0x61, 0x72, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x03, 0x52, 0x15, 0x6d, 0x61, 0x78, - 0x45, 0x78, 0x74, 0x72, 0x61, 0x52, 0x6f, 0x77, 0x73, 0x54, 0x6f, 0x43, 0x6f, 0x6d, 0x70, 0x61, - 0x72, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x77, 0x61, 0x69, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x04, 0x77, 0x61, 0x69, 0x74, 0x12, 0x42, 0x0a, 0x14, 0x77, 0x61, 0x69, 0x74, 0x5f, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x10, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x44, 0x75, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x12, 0x77, 0x61, 0x69, 0x74, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x75, - 0x74, 0x6f, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x79, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, - 0x61, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x74, 0x72, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, - 0x62, 0x6f, 0x73, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x76, 0x65, 0x72, 0x62, - 0x6f, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x16, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, - 0x74, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x72, 0x6f, 0x77, 0x73, 0x18, 0x13, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x13, 0x6d, 0x61, 0x78, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x61, - 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x6f, 0x77, 0x73, 0x12, 0x3c, 0x0a, 0x11, 0x6d, 0x61, 0x78, 0x5f, - 0x64, 0x69, 0x66, 0x66, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x14, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x44, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x6d, 0x61, 0x78, 0x44, 0x69, 0x66, 0x66, 0x44, 0x75, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3c, 0x0a, 0x1b, 0x72, 0x6f, 0x77, 0x5f, 0x64, 0x69, - 0x66, 0x66, 0x5f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x74, 0x72, 0x75, 0x6e, 0x63, 0x61, - 0x74, 0x65, 0x5f, 0x61, 0x74, 0x18, 0x15, 0x20, 0x01, 0x28, 0x03, 0x52, 0x17, 0x72, 0x6f, 0x77, - 0x44, 0x69, 0x66, 0x66, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61, - 0x74, 0x65, 0x41, 0x74, 0x12, 0x22, 0x0a, 0x0a, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x18, 0x16, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x09, 0x61, 0x75, 0x74, 0x6f, - 0x53, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x61, 0x75, 0x74, - 0x6f, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x22, 0x29, 0x0a, 0x13, 0x56, 0x44, 0x69, 0x66, 0x66, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, - 0x0a, 0x04, 0x55, 0x55, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x55, 0x55, - 0x49, 0x44, 0x22, 0x6b, 0x0a, 0x12, 0x56, 0x44, 0x69, 0x66, 0x66, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x36, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x22, 0xf9, 0x07, 0x0a, 0x12, 0x56, 0x44, 0x69, 0x66, 0x66, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, - 0x61, 0x72, 0x67, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, - 0x03, 0x61, 0x72, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x61, 0x72, 0x67, 0x22, - 0x15, 0x0a, 0x13, 0x56, 0x44, 0x69, 0x66, 0x66, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x92, 0x01, 0x0a, 0x12, 0x56, 0x44, 0x69, 0x66, 0x66, - 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, - 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x61, 0x72, - 0x67, 0x65, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, - 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x74, - 0x61, 0x72, 0x67, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x73, 0x22, 0x15, 0x0a, 0x13, 0x56, - 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x69, 0x0a, 0x10, 0x56, 0x44, 0x69, 0x66, 0x66, 0x53, 0x68, 0x6f, 0x77, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, - 0x6f, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, - 0x6f, 0x77, 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x6b, 0x65, 0x79, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x61, 0x72, - 0x67, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x61, - 0x72, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x61, 0x72, 0x67, 0x22, 0xd7, 0x01, - 0x0a, 0x11, 0x56, 0x44, 0x69, 0x66, 0x66, 0x53, 0x68, 0x6f, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x10, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x72, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, - 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x44, 0x69, 0x66, 0x66, 0x53, - 0x68, 0x6f, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x61, 0x62, 0x6c, - 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x0f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x73, 0x1a, 0x64, 0x0a, 0x14, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x36, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x74, 0x61, 0x62, - 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, - 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x90, 0x01, 0x0a, 0x10, 0x56, 0x44, 0x69, 0x66, - 0x66, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, + 0x61, 0x72, 0x67, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, + 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, + 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x65, 0x6c, 0x6c, + 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, + 0x65, 0x6c, 0x6c, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x63, + 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x74, 0x61, 0x72, 0x67, + 0x65, 0x74, 0x43, 0x65, 0x6c, 0x6c, 0x73, 0x12, 0x37, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x14, 0x2e, + 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, + 0x79, 0x70, 0x65, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, + 0x12, 0x6c, 0x0a, 0x1b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, + 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, + 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, + 0x6e, 0x63, 0x65, 0x52, 0x19, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x16, + 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x55, 0x0a, 0x1e, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x77, 0x61, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0a, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x44, 0x75, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x1b, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, + 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x57, 0x61, 0x69, 0x74, 0x54, + 0x69, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x71, 0x75, 0x65, + 0x72, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x64, 0x65, 0x62, 0x75, 0x67, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x12, 0x1a, 0x0a, 0x09, 0x6f, 0x6e, 0x6c, 0x79, 0x5f, 0x70, 0x5f, 0x6b, + 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x6f, 0x6e, 0x6c, 0x79, 0x50, 0x4b, 0x73, + 0x12, 0x2c, 0x0a, 0x12, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x38, + 0x0a, 0x19, 0x6d, 0x61, 0x78, 0x5f, 0x65, 0x78, 0x74, 0x72, 0x61, 0x5f, 0x72, 0x6f, 0x77, 0x73, + 0x5f, 0x74, 0x6f, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x15, 0x6d, 0x61, 0x78, 0x45, 0x78, 0x74, 0x72, 0x61, 0x52, 0x6f, 0x77, 0x73, 0x54, + 0x6f, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x77, 0x61, 0x69, 0x74, + 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x77, 0x61, 0x69, 0x74, 0x12, 0x42, 0x0a, 0x14, + 0x77, 0x61, 0x69, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x76, 0x61, 0x6c, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x74, 0x74, + 0x69, 0x6d, 0x65, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x12, 0x77, 0x61, + 0x69, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, + 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x79, 0x18, 0x11, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x61, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x74, 0x72, 0x79, 0x12, + 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x07, 0x76, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x16, 0x6d, 0x61, 0x78, + 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x72, + 0x6f, 0x77, 0x73, 0x18, 0x13, 0x20, 0x01, 0x28, 0x03, 0x52, 0x13, 0x6d, 0x61, 0x78, 0x52, 0x65, + 0x70, 0x6f, 0x72, 0x74, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x6f, 0x77, 0x73, 0x12, 0x3c, + 0x0a, 0x11, 0x6d, 0x61, 0x78, 0x5f, 0x64, 0x69, 0x66, 0x66, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x74, 0x74, 0x69, + 0x6d, 0x65, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x6d, 0x61, 0x78, + 0x44, 0x69, 0x66, 0x66, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3c, 0x0a, 0x1b, + 0x72, 0x6f, 0x77, 0x5f, 0x64, 0x69, 0x66, 0x66, 0x5f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, + 0x74, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x74, 0x18, 0x15, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x17, 0x72, 0x6f, 0x77, 0x44, 0x69, 0x66, 0x66, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, + 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x41, 0x74, 0x12, 0x22, 0x0a, 0x0a, 0x61, 0x75, + 0x74, 0x6f, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x16, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, + 0x52, 0x09, 0x61, 0x75, 0x74, 0x6f, 0x53, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x42, 0x0d, + 0x0a, 0x0b, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x22, 0x29, 0x0a, + 0x13, 0x56, 0x44, 0x69, 0x66, 0x66, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x55, 0x55, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x55, 0x55, 0x49, 0x44, 0x22, 0x6b, 0x0a, 0x12, 0x56, 0x44, 0x69, 0x66, + 0x66, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, + 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x61, + 0x72, 0x67, 0x65, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x72, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x61, 0x72, 0x67, 0x22, 0x15, 0x0a, 0x13, 0x56, 0x44, 0x69, 0x66, 0x66, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x92, 0x01, 0x0a, + 0x12, 0x56, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, + 0x27, 0x0a, 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, + 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x23, 0x0a, 0x0d, + 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x18, 0x04, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x0c, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, + 0x73, 0x22, 0x15, 0x0a, 0x13, 0x56, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x69, 0x0a, 0x10, 0x56, 0x44, 0x69, 0x66, + 0x66, 0x53, 0x68, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, - 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x74, 0x61, - 0x72, 0x67, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x73, 0x22, 0x13, 0x0a, 0x11, 0x56, 0x44, - 0x69, 0x66, 0x66, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0xde, 0x01, 0x0a, 0x15, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, - 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, - 0x77, 0x12, 0x1b, 0x0a, 0x09, 0x6b, 0x65, 0x65, 0x70, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6b, 0x65, 0x65, 0x70, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2c, - 0x0a, 0x12, 0x6b, 0x65, 0x65, 0x70, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x72, - 0x75, 0x6c, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x6b, 0x65, 0x65, 0x70, - 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, - 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x73, 0x68, - 0x61, 0x72, 0x64, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x62, - 0x61, 0x74, 0x63, 0x68, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x0f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x53, 0x69, 0x7a, 0x65, - 0x22, 0xd1, 0x01, 0x0a, 0x16, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, - 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, - 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x46, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, - 0x74, 0x61, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x44, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, - 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x1a, 0x55, 0x0a, - 0x0a, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2d, 0x0a, 0x06, 0x74, - 0x61, 0x62, 0x6c, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, - 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, - 0x61, 0x73, 0x52, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x64, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x64, 0x22, 0x67, 0x0a, 0x15, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, + 0x65, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x72, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x61, 0x72, 0x67, 0x22, 0xd7, 0x01, 0x0a, 0x11, 0x56, 0x44, 0x69, 0x66, 0x66, 0x53, 0x68, 0x6f, + 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x10, 0x74, 0x61, 0x62, + 0x6c, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x56, 0x44, 0x69, 0x66, 0x66, 0x53, 0x68, 0x6f, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x1a, 0x64, 0x0a, 0x14, 0x54, 0x61, 0x62, 0x6c, 0x65, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x36, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x20, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x90, 0x01, + 0x0a, 0x10, 0x56, 0x44, 0x69, 0x66, 0x66, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x27, + 0x0a, 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4b, + 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x74, + 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x0c, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x73, + 0x22, 0x13, 0x0a, 0x11, 0x56, 0x44, 0x69, 0x66, 0x66, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xde, 0x01, 0x0a, 0x15, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, + 0x6f, 0x77, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x77, + 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, + 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x1b, 0x0a, 0x09, 0x6b, 0x65, 0x65, 0x70, 0x5f, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6b, 0x65, 0x65, 0x70, + 0x44, 0x61, 0x74, 0x61, 0x12, 0x2c, 0x0a, 0x12, 0x6b, 0x65, 0x65, 0x70, 0x5f, 0x72, 0x6f, 0x75, + 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x10, 0x6b, 0x65, 0x65, 0x70, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, + 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x18, 0x05, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x06, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x64, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x61, 0x74, + 0x63, 0x68, 0x53, 0x69, 0x7a, 0x65, 0x22, 0xd1, 0x01, 0x0a, 0x16, 0x57, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x46, 0x0a, 0x07, 0x64, + 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x76, + 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, + 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, + 0x69, 0x6c, 0x73, 0x1a, 0x55, 0x0a, 0x0a, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x49, 0x6e, 0x66, + 0x6f, 0x12, 0x2d, 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, + 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, + 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x07, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x22, 0x67, 0x0a, 0x15, 0x57, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, + 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x16, 0x0a, 0x06, 0x73, + 0x68, 0x61, 0x72, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x73, 0x68, 0x61, + 0x72, 0x64, 0x73, 0x22, 0xe6, 0x07, 0x0a, 0x16, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5f, + 0x0a, 0x10, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x70, 0x79, 0x5f, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x61, 0x62, 0x6c, + 0x65, 0x43, 0x6f, 0x70, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x0e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x70, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, + 0x58, 0x0a, 0x0d, 0x73, 0x68, 0x61, 0x72, 0x64, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x53, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x73, 0x68, 0x61, + 0x72, 0x64, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x72, 0x61, + 0x66, 0x66, 0x69, 0x63, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0c, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x53, 0x74, 0x61, 0x74, 0x65, 0x1a, 0xe8, + 0x01, 0x0a, 0x0e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x70, 0x79, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x63, 0x6f, 0x70, 0x69, 0x65, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x72, 0x6f, 0x77, 0x73, 0x43, 0x6f, 0x70, 0x69, + 0x65, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x74, 0x6f, 0x74, 0x61, 0x6c, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x72, 0x6f, 0x77, 0x73, 0x54, 0x6f, 0x74, 0x61, + 0x6c, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, + 0x74, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0e, 0x72, 0x6f, 0x77, 0x73, + 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x79, + 0x74, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x70, 0x69, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x0b, 0x62, 0x79, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x70, 0x69, 0x65, 0x64, 0x12, 0x1f, 0x0a, + 0x0b, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x0a, 0x62, 0x79, 0x74, 0x65, 0x73, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x29, + 0x0a, 0x10, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, + 0x67, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x50, + 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x1a, 0xbc, 0x01, 0x0a, 0x10, 0x53, 0x68, + 0x61, 0x72, 0x64, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2d, + 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, + 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, + 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x12, 0x21, 0x0a, + 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, + 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x1a, 0x5c, 0x0a, 0x0c, 0x53, 0x68, 0x61, 0x72, + 0x64, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x12, 0x4c, 0x0a, 0x07, 0x73, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x76, 0x74, 0x63, 0x74, + 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x68, 0x61, + 0x72, 0x64, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x07, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x1a, 0x73, 0x0a, 0x13, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x43, + 0x6f, 0x70, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x46, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, + 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x70, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x6f, 0x0a, 0x11, 0x53, + 0x68, 0x61, 0x72, 0x64, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x44, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2e, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x57, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x85, 0x04, 0x0a, + 0x1c, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x54, + 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, - 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x22, 0xe6, 0x07, - 0x0a, 0x16, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5f, 0x0a, 0x10, 0x74, 0x61, 0x62, 0x6c, - 0x65, 0x5f, 0x63, 0x6f, 0x70, 0x79, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x57, - 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x70, 0x79, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x74, 0x61, 0x62, 0x6c, 0x65, - 0x43, 0x6f, 0x70, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x58, 0x0a, 0x0d, 0x73, 0x68, 0x61, - 0x72, 0x64, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x33, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x57, 0x6f, 0x72, - 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x73, 0x68, 0x61, 0x72, 0x64, 0x53, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x5f, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x66, - 0x66, 0x69, 0x63, 0x53, 0x74, 0x61, 0x74, 0x65, 0x1a, 0xe8, 0x01, 0x0a, 0x0e, 0x54, 0x61, 0x62, - 0x6c, 0x65, 0x43, 0x6f, 0x70, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x72, - 0x6f, 0x77, 0x73, 0x5f, 0x63, 0x6f, 0x70, 0x69, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x0a, 0x72, 0x6f, 0x77, 0x73, 0x43, 0x6f, 0x70, 0x69, 0x65, 0x64, 0x12, 0x1d, 0x0a, 0x0a, - 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x09, 0x72, 0x6f, 0x77, 0x73, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x27, 0x0a, 0x0f, 0x72, - 0x6f, 0x77, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x02, 0x52, 0x0e, 0x72, 0x6f, 0x77, 0x73, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, - 0x74, 0x61, 0x67, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x63, 0x6f, - 0x70, 0x69, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x62, 0x79, 0x74, 0x65, - 0x73, 0x43, 0x6f, 0x70, 0x69, 0x65, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x79, 0x74, 0x65, 0x73, - 0x5f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x62, 0x79, - 0x74, 0x65, 0x73, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x29, 0x0a, 0x10, 0x62, 0x79, 0x74, 0x65, - 0x73, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x02, 0x52, 0x0f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, - 0x61, 0x67, 0x65, 0x1a, 0xbc, 0x01, 0x0a, 0x10, 0x53, 0x68, 0x61, 0x72, 0x64, 0x53, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2d, 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, - 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, - 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6f, - 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, - 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, - 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x69, 0x6e, - 0x66, 0x6f, 0x1a, 0x5c, 0x0a, 0x0c, 0x53, 0x68, 0x61, 0x72, 0x64, 0x53, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x73, 0x12, 0x4c, 0x0a, 0x07, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, - 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x53, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x07, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, - 0x1a, 0x73, 0x0a, 0x13, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x70, 0x79, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x46, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, - 0x64, 0x61, 0x74, 0x61, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x61, 0x62, 0x6c, - 0x65, 0x43, 0x6f, 0x70, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x6f, 0x0a, 0x11, 0x53, 0x68, 0x61, 0x72, 0x64, 0x53, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x44, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x76, 0x74, - 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, - 0x68, 0x61, 0x72, 0x64, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x85, 0x04, 0x0a, 0x1c, 0x57, 0x6f, 0x72, 0x6b, 0x66, - 0x6c, 0x6f, 0x77, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, - 0x14, 0x0a, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, - 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x12, 0x37, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x74, 0x6f, - 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, - 0x65, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x4f, - 0x0a, 0x1b, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x6c, 0x61, 0x67, 0x5f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x44, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x18, 0x6d, 0x61, 0x78, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x61, 0x67, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x12, - 0x3c, 0x0a, 0x1a, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, - 0x65, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x18, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x76, 0x65, 0x72, - 0x73, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, - 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x07, 0x74, - 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, - 0x74, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, - 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x64, 0x72, 0x79, 0x5f, 0x72, - 0x75, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x64, 0x72, 0x79, 0x52, 0x75, 0x6e, - 0x12, 0x3e, 0x0a, 0x1b, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x5f, 0x74, - 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, - 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x19, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, - 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x73, - 0x12, 0x16, 0x0a, 0x06, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x06, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, - 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x22, 0xa7, - 0x01, 0x0a, 0x1d, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x77, 0x69, 0x74, 0x63, - 0x68, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x63, - 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x12, 0x26, 0x0a, 0x0f, 0x64, 0x72, 0x79, 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x64, 0x72, 0x79, 0x52, 0x75, - 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x22, 0x90, 0x01, 0x0a, 0x15, 0x57, 0x6f, 0x72, - 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x5b, - 0x0a, 0x0e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, - 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x56, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x57, 0x6f, 0x72, - 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0d, 0x74, 0x61, - 0x62, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xd1, 0x01, 0x0a, 0x16, - 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, + 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x12, 0x37, 0x0a, 0x0c, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, + 0x0e, 0x32, 0x14, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, + 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, + 0x79, 0x70, 0x65, 0x73, 0x12, 0x4f, 0x0a, 0x1b, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65, 0x70, 0x6c, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x61, 0x67, 0x5f, 0x61, 0x6c, 0x6c, 0x6f, + 0x77, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x74, 0x74, 0x69, + 0x6d, 0x65, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x18, 0x6d, 0x61, 0x78, + 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x61, 0x67, 0x41, 0x6c, + 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x12, 0x3c, 0x0a, 0x1a, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, + 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x18, 0x65, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x2a, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x44, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x17, 0x0a, + 0x07, 0x64, 0x72, 0x79, 0x5f, 0x72, 0x75, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, + 0x64, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x12, 0x3e, 0x0a, 0x1b, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, + 0x6c, 0x69, 0x7a, 0x65, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x71, 0x75, + 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x19, 0x69, 0x6e, 0x69, + 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x53, 0x65, 0x71, + 0x75, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, + 0x18, 0x0b, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x12, 0x14, + 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, + 0x6f, 0x72, 0x63, 0x65, 0x22, 0xa7, 0x01, 0x0a, 0x1d, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, - 0x12, 0x46, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x2c, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x57, 0x6f, - 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x1a, 0x55, 0x0a, 0x0a, 0x54, 0x61, 0x62, 0x6c, - 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2d, 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, - 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x06, 0x74, - 0x61, 0x62, 0x6c, 0x65, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x22, - 0x17, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x75, 0x6c, 0x65, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x51, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x4d, - 0x69, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x37, 0x0a, 0x0c, 0x6d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x72, 0x75, 0x6c, - 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x73, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x2e, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x0b, - 0x6d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x22, 0xa9, 0x01, 0x0a, 0x1c, - 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x54, 0x72, - 0x61, 0x66, 0x66, 0x69, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, - 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x37, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x74, - 0x79, 0x70, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x74, 0x6f, 0x70, - 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, - 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x18, 0x0a, - 0x07, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x02, 0x52, 0x07, - 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x22, 0x7f, 0x0a, 0x1d, 0x57, 0x6f, 0x72, 0x6b, 0x66, - 0x6c, 0x6f, 0x77, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x6d, 0x6d, - 0x61, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, - 0x72, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x75, 0x72, 0x72, - 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2a, 0x4a, 0x0a, 0x15, 0x4d, 0x61, 0x74, 0x65, - 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x6e, - 0x74, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x55, 0x53, 0x54, 0x4f, 0x4d, 0x10, 0x00, 0x12, 0x0e, 0x0a, - 0x0a, 0x4d, 0x4f, 0x56, 0x45, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x53, 0x10, 0x01, 0x12, 0x15, 0x0a, - 0x11, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x4c, 0x4f, 0x4f, 0x4b, 0x55, 0x50, 0x49, 0x4e, 0x44, - 0x45, 0x58, 0x10, 0x02, 0x2a, 0x38, 0x0a, 0x0d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x72, 0x64, - 0x65, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, - 0x0d, 0x0a, 0x09, 0x41, 0x53, 0x43, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0e, - 0x0a, 0x0a, 0x44, 0x45, 0x53, 0x43, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x2a, 0x42, - 0x0a, 0x1c, 0x53, 0x68, 0x61, 0x72, 0x64, 0x65, 0x64, 0x41, 0x75, 0x74, 0x6f, 0x49, 0x6e, 0x63, - 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x69, 0x6e, 0x67, 0x12, 0x09, - 0x0a, 0x05, 0x4c, 0x45, 0x41, 0x56, 0x45, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x52, 0x45, 0x4d, - 0x4f, 0x56, 0x45, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x45, 0x50, 0x4c, 0x41, 0x43, 0x45, - 0x10, 0x02, 0x42, 0x28, 0x5a, 0x26, 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, 0x2e, 0x69, 0x6f, 0x2f, - 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x76, 0x74, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2f, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, + 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x64, 0x72, 0x79, 0x5f, 0x72, 0x75, + 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x0d, 0x64, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x22, 0x90, + 0x01, 0x0a, 0x15, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x12, 0x5b, 0x0a, 0x0e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x52, 0x0d, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x22, 0xd1, 0x01, 0x0a, 0x16, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, + 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, + 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x46, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, + 0x61, 0x74, 0x61, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, + 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x1a, 0x55, + 0x0a, 0x0a, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2d, 0x0a, 0x06, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, + 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, + 0x69, 0x61, 0x73, 0x52, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x63, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x64, 0x22, 0x17, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x4d, 0x69, 0x72, 0x72, + 0x6f, 0x72, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x51, + 0x0a, 0x16, 0x47, 0x65, 0x74, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x75, 0x6c, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x0c, 0x6d, 0x69, 0x72, 0x72, + 0x6f, 0x72, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, + 0x2e, 0x76, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x52, + 0x75, 0x6c, 0x65, 0x73, 0x52, 0x0b, 0x6d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x75, 0x6c, 0x65, + 0x73, 0x22, 0xa9, 0x01, 0x0a, 0x1c, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x4d, 0x69, + 0x72, 0x72, 0x6f, 0x72, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1a, + 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x37, 0x0a, 0x0c, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0e, + 0x32, 0x14, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, + 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, + 0x70, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x02, 0x52, 0x07, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x22, 0x7f, 0x0a, + 0x1d, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x54, + 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, + 0x0a, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x72, + 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2a, 0x4a, + 0x0a, 0x15, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x55, 0x53, 0x54, 0x4f, + 0x4d, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x4d, 0x4f, 0x56, 0x45, 0x54, 0x41, 0x42, 0x4c, 0x45, + 0x53, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x4c, 0x4f, 0x4f, + 0x4b, 0x55, 0x50, 0x49, 0x4e, 0x44, 0x45, 0x58, 0x10, 0x02, 0x2a, 0x38, 0x0a, 0x0d, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x08, 0x0a, 0x04, 0x4e, + 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x53, 0x43, 0x45, 0x4e, 0x44, 0x49, + 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x44, 0x45, 0x53, 0x43, 0x45, 0x4e, 0x44, 0x49, + 0x4e, 0x47, 0x10, 0x02, 0x2a, 0x42, 0x0a, 0x1c, 0x53, 0x68, 0x61, 0x72, 0x64, 0x65, 0x64, 0x41, + 0x75, 0x74, 0x6f, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x6e, 0x64, + 0x6c, 0x69, 0x6e, 0x67, 0x12, 0x09, 0x0a, 0x05, 0x4c, 0x45, 0x41, 0x56, 0x45, 0x10, 0x00, 0x12, + 0x0a, 0x0a, 0x06, 0x52, 0x45, 0x4d, 0x4f, 0x56, 0x45, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x52, + 0x45, 0x50, 0x4c, 0x41, 0x43, 0x45, 0x10, 0x02, 0x42, 0x28, 0x5a, 0x26, 0x76, 0x69, 0x74, 0x65, + 0x73, 0x73, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, 0x2f, 0x67, 0x6f, 0x2f, + 0x76, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, + 0x74, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, }) var ( diff --git a/go/vt/schema/ddl_strategy.go b/go/vt/schema/ddl_strategy.go index 4195c7da863..fd8d4e90617 100644 --- a/go/vt/schema/ddl_strategy.go +++ b/go/vt/schema/ddl_strategy.go @@ -54,7 +54,7 @@ const ( analyzeTableFlag = "analyze-table" ) -// DDLStrategy suggests how an ALTER TABLE should run (e.g. "direct", "online", "gh-ost" or "pt-osc") +// DDLStrategy suggests how an ALTER TABLE should run (e.g. "direct", "online", "mysql") type DDLStrategy string const ( @@ -64,10 +64,6 @@ const ( DDLStrategyVitess DDLStrategy = "vitess" // DDLStrategyOnline requests vreplication to run the migration DDLStrategyOnline DDLStrategy = "online" - // DDLStrategyGhost requests gh-ost to run the migration - DDLStrategyGhost DDLStrategy = "gh-ost" - // DDLStrategyPTOSC requests pt-online-schema-change to run the migration - DDLStrategyPTOSC DDLStrategy = "pt-osc" // DDLStrategyMySQL is a managed migration (queued and executed by the scheduler) but runs through a MySQL `ALTER TABLE` DDLStrategyMySQL DDLStrategy = "mysql" ) @@ -76,7 +72,7 @@ const ( // A strategy is direct if it's not explciitly one of the online DDL strategies func (s DDLStrategy) IsDirect() bool { switch s { - case DDLStrategyVitess, DDLStrategyOnline, DDLStrategyGhost, DDLStrategyPTOSC, DDLStrategyMySQL: + case DDLStrategyVitess, DDLStrategyOnline, DDLStrategyMySQL: return false } return true @@ -108,7 +104,7 @@ func ParseDDLStrategy(strategyVariable string) (*DDLStrategySetting, error) { switch strategy := DDLStrategy(strategyName); strategy { case "": // backward compatiblity and to handle unspecified values setting.Strategy = DDLStrategyDirect - case DDLStrategyVitess, DDLStrategyOnline, DDLStrategyGhost, DDLStrategyPTOSC, DDLStrategyMySQL, DDLStrategyDirect: + case DDLStrategyVitess, DDLStrategyOnline, DDLStrategyMySQL, DDLStrategyDirect: setting.Strategy = strategy default: return nil, fmt.Errorf("Unknown online DDL strategy: '%v'", strategy) diff --git a/go/vt/schema/ddl_strategy_test.go b/go/vt/schema/ddl_strategy_test.go index dd8fec45351..47221a5b8a9 100644 --- a/go/vt/schema/ddl_strategy_test.go +++ b/go/vt/schema/ddl_strategy_test.go @@ -28,13 +28,9 @@ func TestIsDirect(t *testing.T) { assert.True(t, DDLStrategyDirect.IsDirect()) assert.False(t, DDLStrategyVitess.IsDirect()) assert.False(t, DDLStrategyOnline.IsDirect()) - assert.False(t, DDLStrategyGhost.IsDirect()) - assert.False(t, DDLStrategyPTOSC.IsDirect()) assert.True(t, DDLStrategy("").IsDirect()) assert.False(t, DDLStrategy("vitess").IsDirect()) assert.False(t, DDLStrategy("online").IsDirect()) - assert.False(t, DDLStrategy("gh-ost").IsDirect()) - assert.False(t, DDLStrategy("pt-osc").IsDirect()) assert.False(t, DDLStrategy("mysql").IsDirect()) assert.True(t, DDLStrategy("something").IsDirect()) } @@ -217,14 +213,6 @@ func TestParseDDLStrategy(t *testing.T) { strategyVariable: "online", strategy: DDLStrategyOnline, }, - { - strategyVariable: "gh-ost", - strategy: DDLStrategyGhost, - }, - { - strategyVariable: "pt-osc", - strategy: DDLStrategyPTOSC, - }, { strategyVariable: "mysql", strategy: DDLStrategyMySQL, @@ -233,32 +221,19 @@ func TestParseDDLStrategy(t *testing.T) { strategy: DDLStrategyDirect, }, { - strategyVariable: "gh-ost --max-load=Threads_running=100 --allow-master", - strategy: DDLStrategyGhost, - // These are gh-ost options. Nothing we can do until that changes upstream - options: "--max-load=Threads_running=100 --allow-master", - runtimeOptions: "--max-load=Threads_running=100 --allow-master", - }, - { - strategyVariable: "gh-ost --max-load=Threads_running=100 -declarative", - strategy: DDLStrategyGhost, - options: "--max-load=Threads_running=100 -declarative", - runtimeOptions: "--max-load=Threads_running=100", - isDeclarative: true, - }, - { - strategyVariable: "gh-ost --declarative --max-load=Threads_running=100", - strategy: DDLStrategyGhost, - options: "--declarative --max-load=Threads_running=100", - runtimeOptions: "--max-load=Threads_running=100", - isDeclarative: true, + strategyVariable: "vitess -singleton", + strategy: DDLStrategyVitess, + options: "-singleton", + runtimeOptions: "", + isSingleton: true, }, { - strategyVariable: "pt-osc -singleton", - strategy: DDLStrategyPTOSC, - options: "-singleton", + strategyVariable: "vitess --singleton --declarative", + strategy: DDLStrategyVitess, + options: "--singleton --declarative", runtimeOptions: "", isSingleton: true, + isDeclarative: true, }, { strategyVariable: "vitess --singleton-context", @@ -358,7 +333,7 @@ func TestParseDDLStrategy(t *testing.T) { expectError: "time: invalid duration", }, { - strategyVariable: "gh-ost --force-cut-over-after=3m", + strategyVariable: "mysql --force-cut-over-after=3m", strategy: DDLStrategyVitess, runtimeOptions: "", expectError: "--force-cut-over-after is only valid in 'vitess' strategy", diff --git a/go/vt/schema/online_ddl_test.go b/go/vt/schema/online_ddl_test.go index dad92904854..1010afef1e5 100644 --- a/go/vt/schema/online_ddl_test.go +++ b/go/vt/schema/online_ddl_test.go @@ -404,7 +404,7 @@ func TestOnlineDDLFromCommentedStatement(t *testing.T) { `alter view v as select * from t`, `revert vitess_migration '4e5dcf80_354b_11eb_82cd_f875a4d24e90'`, } - strategySetting := NewDDLStrategySetting(DDLStrategyGhost, `-singleton -declarative --max-load="Threads_running=5"`) + strategySetting := NewDDLStrategySetting(DDLStrategyVitess, `-singleton -declarative --max-load="Threads_running=5"`) migrationContext := "354b-11eb-82cd-f875a4d24e90" parser := sqlparser.NewTestParser() for _, query := range queries { diff --git a/go/vt/schemamanager/tablet_executor_test.go b/go/vt/schemamanager/tablet_executor_test.go index a683ef4d22e..ac6ba84b0c6 100644 --- a/go/vt/schemamanager/tablet_executor_test.go +++ b/go/vt/schemamanager/tablet_executor_test.go @@ -206,12 +206,7 @@ func TestIsOnlineSchemaDDL(t *testing.T) { query: "CREATE TABLE t(id int)", isOnlineDDL: false, }, - { - query: "CREATE TABLE t(id int)", - ddlStrategy: "gh-ost", - isOnlineDDL: true, - strategy: schema.DDLStrategyGhost, - }, + { query: "ALTER TABLE t ADD COLUMN i INT", ddlStrategy: "online", @@ -231,16 +226,16 @@ func TestIsOnlineSchemaDDL(t *testing.T) { }, { query: "ALTER TABLE t ADD COLUMN i INT", - ddlStrategy: "gh-ost", + ddlStrategy: "vitess", isOnlineDDL: true, - strategy: schema.DDLStrategyGhost, + strategy: schema.DDLStrategyVitess, }, { query: "ALTER TABLE t ADD COLUMN i INT", - ddlStrategy: "gh-ost --max-load=Threads_running=100", + ddlStrategy: "vitess --declarative", isOnlineDDL: true, - strategy: schema.DDLStrategyGhost, - options: "--max-load=Threads_running=100", + strategy: schema.DDLStrategyVitess, + options: "--declarative", }, { query: "TRUNCATE TABLE t", @@ -249,12 +244,12 @@ func TestIsOnlineSchemaDDL(t *testing.T) { }, { query: "TRUNCATE TABLE t", - ddlStrategy: "gh-ost", + ddlStrategy: "vitess", isOnlineDDL: false, }, { query: "RENAME TABLE t to t2", - ddlStrategy: "gh-ost", + ddlStrategy: "vitess", isOnlineDDL: false, }, } diff --git a/go/vt/vtctl/schematools/schematools.go b/go/vt/vtctl/schematools/schematools.go index 059b7ca3db8..2b780388a2d 100644 --- a/go/vt/vtctl/schematools/schematools.go +++ b/go/vt/vtctl/schematools/schematools.go @@ -56,14 +56,6 @@ func ParseSchemaMigrationStrategy(name string) (vtctldatapb.SchemaMigration_Stra } upperName := strings.ToUpper(name) - switch upperName { - case "GH-OST", "PT-OSC": - // more compatibility since the protobuf message names don't - // have the dash. - upperName = strings.ReplaceAll(upperName, "-", "") - default: - } - strategy, ok := vtctldatapb.SchemaMigration_Strategy_value[upperName] if !ok { return 0, fmt.Errorf("unknown schema migration strategy: '%v'", name) @@ -91,12 +83,6 @@ func SchemaMigrationStrategyName(strategy vtctldatapb.SchemaMigration_Strategy) if !ok { return "unknown" } - - switch strategy { - case vtctldatapb.SchemaMigration_GHOST, vtctldatapb.SchemaMigration_PTOSC: - name = strings.Join([]string{name[:2], name[2:]}, "-") - } - return strings.ToLower(name) } diff --git a/go/vt/vtctl/schematools/schematools_test.go b/go/vt/vtctl/schematools/schematools_test.go index 94909ab52b1..a616b2096ce 100644 --- a/go/vt/vtctl/schematools/schematools_test.go +++ b/go/vt/vtctl/schematools/schematools_test.go @@ -39,14 +39,6 @@ func TestSchemaMigrationStrategyName(t *testing.T) { in: vtctldatapb.SchemaMigration_VITESS, out: "vitess", }, - { - in: vtctldatapb.SchemaMigration_GHOST, - out: "gh-ost", - }, - { - in: vtctldatapb.SchemaMigration_PTOSC, - out: "pt-osc", - }, { in: vtctldatapb.SchemaMigration_DIRECT, out: "direct", diff --git a/go/vt/vtctl/vtctl.go b/go/vt/vtctl/vtctl.go index ec29413100e..975a8c98a5e 100644 --- a/go/vt/vtctl/vtctl.go +++ b/go/vt/vtctl/vtctl.go @@ -594,7 +594,7 @@ var commands = []commandGroup{ name: "ApplySchema", method: commandApplySchema, params: "[--wait_replicas_timeout=10s] [--ddl_strategy=] [--uuid_list=] [--migration_context=] {--sql= || --sql-file=} [--batch-size=] ", - help: "Applies the schema change to the specified keyspace on every primary, running in parallel on all shards. The changes are then propagated to replicas via replication. -ddl_strategy is used to instruct migrations via vreplication, gh-ost or pt-osc with optional parameters. -migration_context allows the user to specify a custom request context for online DDL migrations.", + help: "Applies the schema change to the specified keyspace on every primary, running in parallel on all shards. The changes are then propagated to replicas via replication. -ddl_strategy is used to instruct migrations via vreplication, mysql or direct with optional parameters. -migration_context allows the user to specify a custom request context for online DDL migrations.", }, { name: "CopySchemaShard", @@ -2918,7 +2918,7 @@ func commandValidateSchemaKeyspace(ctx context.Context, wr *wrangler.Wrangler, s func commandApplySchema(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { sql := subFlags.String("sql", "", "A list of semicolon-delimited SQL commands") sqlFile := subFlags.String("sql-file", "", "Identifies the file that contains the SQL commands") - ddlStrategy := subFlags.String("ddl_strategy", string(schema.DDLStrategyDirect), "Online DDL strategy, compatible with @@ddl_strategy session variable (examples: 'gh-ost', 'pt-osc', 'gh-ost --max-load=Threads_running=100'") + ddlStrategy := subFlags.String("ddl_strategy", string(schema.DDLStrategyDirect), "Online DDL strategy, compatible with @@ddl_strategy session variable (examples: 'direct', 'mysql', 'vitess --postpone-completion'") uuidList := subFlags.String("uuid_list", "", "Optional: comma delimited explicit UUIDs for migration. If given, must match number of DDL changes") migrationContext := subFlags.String("migration_context", "", "For Online DDL, optionally supply a custom unique string used as context for the migration(s) in this command. By default a unique context is auto-generated by Vitess") requestContext := subFlags.String("request_context", "", "synonym for --migration_context") diff --git a/go/vt/vttablet/onlineddl/executor.go b/go/vt/vttablet/onlineddl/executor.go index 07119263399..ea6ea8732d2 100644 --- a/go/vt/vttablet/onlineddl/executor.go +++ b/go/vt/vttablet/onlineddl/executor.go @@ -30,7 +30,6 @@ import ( "strings" "sync" "sync/atomic" - "syscall" "time" "github.com/spf13/pflag" @@ -43,7 +42,6 @@ import ( "vitess.io/vitess/go/mysql/sqlerror" "vitess.io/vitess/go/sqlescape" "vitess.io/vitess/go/sqltypes" - "vitess.io/vitess/go/syscallutil" "vitess.io/vitess/go/textutil" "vitess.io/vitess/go/timer" "vitess.io/vitess/go/vt/binlog/binlogplayer" @@ -69,7 +67,7 @@ import ( ) var ( - // ErrExecutorNotWritableTablet is generated when executor is asked to run gh-ost on a read-only server + // ErrExecutorNotWritableTablet is generated when executor is asked to run a migration on a read-only server ErrExecutorNotWritableTablet = errors.New("cannot run migration on non-writable tablet") // ErrExecutorMigrationAlreadyRunning is generated when an attempt is made to run an operation that conflicts with a running migration ErrExecutorMigrationAlreadyRunning = errors.New("cannot run migration since a migration is already running") @@ -90,8 +88,6 @@ var acceptableDropTableIfExistsErrorCodes = []sqlerror.ErrorCode{sqlerror.ERCant var copyAlgorithm = sqlparser.AlgorithmValue(sqlparser.CopyStr) var ( - ghostBinaryPath = "gh-ost" - ptOSCBinaryPath = "/usr/bin/pt-online-schema-change" migrationCheckInterval = 1 * time.Minute retainOnlineDDLTables = 24 * time.Hour maxConcurrentOnlineDDLs = 256 @@ -112,8 +108,6 @@ func init() { } func registerOnlineDDLFlags(fs *pflag.FlagSet) { - fs.StringVar(&ghostBinaryPath, "gh-ost-path", ghostBinaryPath, "override default gh-ost binary full path") - fs.StringVar(&ptOSCBinaryPath, "pt-osc-path", ptOSCBinaryPath, "override default pt-online-schema-change binary full path") fs.DurationVar(&migrationCheckInterval, "migration_check_interval", migrationCheckInterval, "Interval between migration checks") fs.DurationVar(&retainOnlineDDLTables, "retain_online_ddl_tables", retainOnlineDDLTables, "How long should vttablet keep an old migrated table before purging it") fs.IntVar(&maxConcurrentOnlineDDLs, "max_concurrent_online_ddl", maxConcurrentOnlineDDLs, "Maximum number of online DDL changes that may run concurrently") @@ -135,22 +129,7 @@ const ( vreplicationTestSuiteWaitSeconds = 5 ) -var ( - migrationLogFileName = "migration.log" - migrationFailureFileName = "migration-failure.log" - onlineDDLUser = "vt-online-ddl-internal" - onlineDDLGrant = fmt.Sprintf("'%s'@'%s'", onlineDDLUser, "%") -) - -type mysqlVariables struct { - host string - port int - readOnly bool - version string - versionComment string -} - -// Executor wraps and manages the execution of a gh-ost migration. +// Executor is a state machine running migrations type Executor struct { env tabletenv.Env pool *connpool.Pool @@ -173,7 +152,7 @@ type Executor struct { // A UUID listed in this map stands for a migration that is executing, and that this executor can control. // Migrations found to be running which are not listed in this map will either: // - be adopted by this executor (possible for vreplication migrations), or - // - be terminated (example: pt-osc migration gone rogue, process still running even as the migration failed) + // - be terminated // The Executor auto-reviews the map and cleans up migrations thought to be running which are not running. ownedRunningMigrations sync.Map vreplicationLastError map[string]*vterrors.LastError @@ -219,7 +198,7 @@ func safeMigrationCutOverThreshold(threshold time.Duration) (time.Duration, erro } } -// NewExecutor creates a new gh-ost executor. +// NewExecutor creates a new executor. func NewExecutor(env tabletenv.Env, tabletAlias *topodatapb.TabletAlias, ts *topo.Server, lagThrottler *throttle.Throttler, tabletTypeFunc func() topodatapb.TabletType, @@ -400,7 +379,7 @@ func (e *Executor) allowConcurrentMigration(onlineDDL *schema.OnlineDDL) (action case sqlparser.RevertDDLAction: // REVERT is allowed to run concurrently. // Reminder that REVERT is supported for CREATE, DROP and for 'vitess' ALTER, but never for - // 'gh-ost' or 'pt-osc' ALTERs + // 'direct' or 'mysql' ALTERs return action, true } return action, false @@ -446,127 +425,10 @@ func (e *Executor) isAnyConflictingMigrationRunning(onlineDDL *schema.OnlineDDL) return (conflictingMigration != nil), conflictingMigration } -func (e *Executor) ghostPanicFlagFileName(uuid string) string { - return path.Join(os.TempDir(), fmt.Sprintf("ghost.%s.panic.flag", uuid)) -} - -func (e *Executor) createGhostPanicFlagFile(uuid string) error { - _, err := os.Create(e.ghostPanicFlagFileName(uuid)) - return err -} - -func (e *Executor) deleteGhostPanicFlagFile(uuid string) error { - // We use RemoveAll because if the file does not exist that's fine. Remove will return an error - // if file does not exist; RemoveAll does not. - return os.RemoveAll(e.ghostPanicFlagFileName(uuid)) -} - -func (e *Executor) ghostPostponeFlagFileName(uuid string) string { - return path.Join(os.TempDir(), fmt.Sprintf("ghost.%s.postpone.flag", uuid)) -} - -func (e *Executor) deleteGhostPostponeFlagFile(uuid string) error { - // We use RemoveAll because if the file does not exist that's fine. Remove will return an error - // if file does not exist; RemoveAll does not. - return os.RemoveAll(e.ghostPostponeFlagFileName(uuid)) -} - func (e *Executor) ptPidFileName(uuid string) string { return path.Join(os.TempDir(), fmt.Sprintf("pt-online-schema-change.%s.pid", uuid)) } -// readMySQLVariables contacts the backend MySQL server to read some of its configuration -func (e *Executor) readMySQLVariables(ctx context.Context) (variables *mysqlVariables, err error) { - conn, err := e.pool.Get(ctx, nil) - if err != nil { - return nil, err - } - defer conn.Recycle() - - tm, err := conn.Conn.Exec(ctx, `select - @@global.hostname as hostname, - @@global.port as port, - @@global.read_only as read_only, - @@global.version AS version, - @@global.version_comment AS version_comment - from dual`, 1, true) - if err != nil { - return nil, vterrors.Errorf(vtrpcpb.Code_UNKNOWN, "could not read MySQL variables: %v", err) - } - row := tm.Named().Row() - if row == nil { - return nil, vterrors.Errorf(vtrpcpb.Code_UNKNOWN, "unexpected result for MySQL variables: %+v", tm.Rows) - } - variables = &mysqlVariables{} - - if e.env.Config().DB.Host != "" { - variables.host = e.env.Config().DB.Host - } else { - variables.host = row["hostname"].ToString() - } - - if e.env.Config().DB.Port != 0 { - variables.port = e.env.Config().DB.Port - } else if port, err := row.ToInt("port"); err != nil { - return nil, vterrors.Errorf(vtrpcpb.Code_UNKNOWN, "could not parse @@global.port %v: %v", tm, err) - } else { - variables.port = port - } - if variables.readOnly, err = row.ToBool("read_only"); err != nil { - return nil, vterrors.Errorf(vtrpcpb.Code_UNKNOWN, "could not parse @@global.read_only %v: %v", tm, err) - } - - variables.version = row["version"].ToString() - variables.versionComment = row["version_comment"].ToString() - - return variables, nil -} - -// createOnlineDDLUser creates a gh-ost or pt-osc user account with all -// necessary privileges and with a random password -func (e *Executor) createOnlineDDLUser(ctx context.Context) (password string, err error) { - conn, err := dbconnpool.NewDBConnection(ctx, e.env.Config().DB.DbaConnector()) - if err != nil { - return password, err - } - defer conn.Close() - - password = RandomHash()[0:maxPasswordLength] - - for _, query := range sqlCreateOnlineDDLUser { - parsed := sqlparser.BuildParsedQuery(query, onlineDDLGrant, password) - if _, err := conn.ExecuteFetch(parsed.Query, 0, false); err != nil { - return password, err - } - } - for _, query := range sqlGrantOnlineDDLSuper { - parsed := sqlparser.BuildParsedQuery(query, onlineDDLGrant) - conn.ExecuteFetch(parsed.Query, 0, false) - // We ignore failure, since we might not be able to grant - // SUPER privs (e.g. Aurora) - } - for _, query := range sqlGrantOnlineDDLUser { - parsed := sqlparser.BuildParsedQuery(query, onlineDDLGrant) - if _, err := conn.ExecuteFetch(parsed.Query, 0, false); err != nil { - return password, err - } - } - return password, err -} - -// dropOnlineDDLUser drops the given ddl user account at the end of migration -func (e *Executor) dropOnlineDDLUser(ctx context.Context) error { - conn, err := dbconnpool.NewDBConnection(ctx, e.env.Config().DB.DbaConnector()) - if err != nil { - return err - } - defer conn.Close() - - parsed := sqlparser.BuildParsedQuery(sqlDropOnlineDDLUser, onlineDDLGrant) - _, err = conn.ExecuteFetch(parsed.Query, 0, false) - return err -} - // tableExists checks if a given table exists. func (e *Executor) tableExists(ctx context.Context, tableName string) (bool, error) { tableName = strings.ReplaceAll(tableName, `_`, `\_`) @@ -610,16 +472,6 @@ func (e *Executor) getCreateTableStatement(ctx context.Context, tableName string return createTable, nil } -func (e *Executor) parseAlterOptions(ctx context.Context, onlineDDL *schema.OnlineDDL) string { - // Temporary hack (2020-08-11) - // Because sqlparser does not do full blown ALTER TABLE parsing, - // and because we don't want gh-ost to know about WITH_GHOST and WITH_PT syntax, - // we resort to regexp-based parsing of the query. - // TODO(shlomi): generate _alter options_ via sqlparser when it full supports ALTER TABLE syntax. - _, _, alterOptions := schema.ParseAlterTableOptions(onlineDDL.SQL) - return alterOptions -} - // executeDirectly runs a DDL query directly on the backend MySQL server func (e *Executor) executeDirectly(ctx context.Context, onlineDDL *schema.OnlineDDL, acceptableMySQLErrorCodes ...sqlerror.ErrorCode) (acceptableErrorCodeFound bool, err error) { conn, err := dbconnpool.NewDBConnection(ctx, e.env.Config().DB.DbaWithDB()) @@ -1589,438 +1441,6 @@ func (e *Executor) ExecuteWithVReplication(ctx context.Context, onlineDDL *schem return nil } -// ExecuteWithGhost validates and runs a gh-ost process. -// Validation included testing the backend MySQL server and the gh-ost binary itself -// Execution runs first a dry run, then an actual migration -func (e *Executor) ExecuteWithGhost(ctx context.Context, onlineDDL *schema.OnlineDDL) error { - if e.tabletTypeFunc() != topodatapb.TabletType_PRIMARY { - return ErrExecutorNotWritableTablet - } - variables, err := e.readMySQLVariables(ctx) - if err != nil { - log.Errorf("Error before running gh-ost: %+v", err) - return err - } - if variables.readOnly { - err := fmt.Errorf("Error before running gh-ost: MySQL server is read_only") - log.Errorf(err.Error()) - return err - } - onlineDDLPassword, err := e.createOnlineDDLUser(ctx) - if err != nil { - err := fmt.Errorf("Error creating gh-ost user: %+v", err) - log.Errorf(err.Error()) - return err - } - tempDir, err := createTempDir(onlineDDL.UUID) - if err != nil { - log.Errorf("Error creating temporary directory: %+v", err) - return err - } - credentialsConfigFileContent := fmt.Sprintf(`[client] -user=%s -password=${ONLINE_DDL_PASSWORD} -`, onlineDDLUser) - credentialsConfigFileName, err := createTempScript(tempDir, "gh-ost-conf.cfg", credentialsConfigFileContent) - if err != nil { - log.Errorf("Error creating config file: %+v", err) - return err - } - wrapperScriptContent := fmt.Sprintf(`#!/bin/bash -ghost_log_path="%s" -ghost_log_file="%s" -ghost_log_failure_file="%s" - -mkdir -p "$ghost_log_path" - -export ONLINE_DDL_PASSWORD -%s "$@" > "$ghost_log_path/$ghost_log_file" 2>&1 -exit_code=$? -grep -o '\bFATAL\b.*' "$ghost_log_path/$ghost_log_file" | tail -1 > "$ghost_log_path/$ghost_log_failure_file" -exit $exit_code - `, tempDir, migrationLogFileName, migrationFailureFileName, ghostBinaryPath, - ) - wrapperScriptFileName, err := createTempScript(tempDir, "gh-ost-wrapper.sh", wrapperScriptContent) - if err != nil { - log.Errorf("Error creating wrapper script: %+v", err) - return err - } - onHookContent := func(status schema.OnlineDDLStatus, hint string) string { - return fmt.Sprintf(`#!/bin/bash - curl --max-time 10 -s 'http://localhost:%d/schema-migration/report-status?uuid=%s&status=%s&hint=%s&dryrun='"$GH_OST_DRY_RUN"'&progress='"$GH_OST_PROGRESS"'&eta='"$GH_OST_ETA_SECONDS"'&rowscopied='"$GH_OST_COPIED_ROWS" - `, servenv.Port(), onlineDDL.UUID, string(status), hint) - } - if _, err := createTempScript(tempDir, "gh-ost-on-startup", onHookContent(schema.OnlineDDLStatusRunning, emptyHint)); err != nil { - log.Errorf("Error creating script: %+v", err) - return err - } - if _, err := createTempScript(tempDir, "gh-ost-on-status", onHookContent(schema.OnlineDDLStatusRunning, emptyHint)); err != nil { - log.Errorf("Error creating script: %+v", err) - return err - } - if _, err := createTempScript(tempDir, "gh-ost-on-success", onHookContent(schema.OnlineDDLStatusComplete, emptyHint)); err != nil { - log.Errorf("Error creating script: %+v", err) - return err - } - if _, err := createTempScript(tempDir, "gh-ost-on-failure", onHookContent(schema.OnlineDDLStatusFailed, emptyHint)); err != nil { - log.Errorf("Error creating script: %+v", err) - return err - } - if _, err := createTempScript(tempDir, "gh-ost-on-begin-postponed", onHookContent(schema.OnlineDDLStatusRunning, readyToCompleteHint)); err != nil { - log.Errorf("Error creating script: %+v", err) - return err - } - serveSocketFile := path.Join(tempDir, "serve.sock") - - if err := e.deleteGhostPanicFlagFile(onlineDDL.UUID); err != nil { - log.Errorf("Error removing gh-ost panic flag file %s: %+v", e.ghostPanicFlagFileName(onlineDDL.UUID), err) - return err - } - if err := e.deleteGhostPostponeFlagFile(onlineDDL.UUID); err != nil { - log.Errorf("Error removing gh-ost postpone flag file %s before migration: %+v", e.ghostPostponeFlagFileName(onlineDDL.UUID), err) - return err - } - // Validate gh-ost binary: - _ = e.updateMigrationMessage(ctx, onlineDDL.UUID, "validating gh-ost --version") - log.Infof("Will now validate gh-ost binary") - _, err = execCmd( - "bash", - []string{ - wrapperScriptFileName, - "--version", - }, - os.Environ(), - "/tmp", - nil, - nil, - ) - if err != nil { - log.Errorf("Error testing gh-ost binary: %+v", err) - return err - } - _ = e.updateMigrationMessage(ctx, onlineDDL.UUID, "validated gh-ost --version") - log.Infof("+ OK") - - if err := e.updateMigrationLogPath(ctx, onlineDDL.UUID, variables.host, tempDir); err != nil { - return err - } - - runGhost := func(execute bool) error { - alterOptions := e.parseAlterOptions(ctx, onlineDDL) - forceTableNames := fmt.Sprintf("%s_%s", onlineDDL.UUID, schema.ReadableTimestamp()) - - if err := e.updateArtifacts(ctx, onlineDDL.UUID, - fmt.Sprintf("_%s_gho", forceTableNames), - fmt.Sprintf("_%s_ghc", forceTableNames), - fmt.Sprintf("_%s_del", forceTableNames), - ); err != nil { - return err - } - - os.Setenv("ONLINE_DDL_PASSWORD", onlineDDLPassword) - args := []string{ - wrapperScriptFileName, - fmt.Sprintf(`--host=%s`, variables.host), - fmt.Sprintf(`--port=%d`, variables.port), - fmt.Sprintf(`--conf=%s`, credentialsConfigFileName), // user & password found here - `--allow-on-master`, - `--max-load=Threads_running=900`, - `--critical-load=Threads_running=1000`, - `--critical-load-hibernate-seconds=60`, - `--approve-renamed-columns`, - `--debug`, - `--exact-rowcount`, - `--default-retries=120`, - fmt.Sprintf("--force-table-names=%s", forceTableNames), - fmt.Sprintf("--serve-socket-file=%s", serveSocketFile), - fmt.Sprintf("--hooks-path=%s", tempDir), - fmt.Sprintf(`--hooks-hint-token=%s`, onlineDDL.UUID), - fmt.Sprintf(`--throttle-http=http://localhost:%d/throttler/check?app=%s:%s:%s&p=low`, servenv.Port(), throttlerapp.OnlineDDLName, throttlerapp.GhostName, onlineDDL.UUID), - fmt.Sprintf(`--database=%s`, e.dbName), - fmt.Sprintf(`--table=%s`, onlineDDL.Table), - fmt.Sprintf(`--alter=%s`, alterOptions), - fmt.Sprintf(`--panic-flag-file=%s`, e.ghostPanicFlagFileName(onlineDDL.UUID)), - fmt.Sprintf(`--execute=%t`, execute), - } - if onlineDDL.StrategySetting().IsAllowZeroInDateFlag() { - args = append(args, "--allow-zero-in-date") - } - if execute && onlineDDL.StrategySetting().IsPostponeCompletion() { - args = append(args, "--postpone-cut-over-flag-file", e.ghostPostponeFlagFileName(onlineDDL.UUID)) - } - - args = append(args, onlineDDL.StrategySetting().RuntimeOptions()...) - _ = e.updateMigrationMessage(ctx, onlineDDL.UUID, fmt.Sprintf("executing gh-ost --execute=%v", execute)) - _, err := execCmd("bash", args, os.Environ(), "/tmp", nil, nil) - _ = e.updateMigrationMessage(ctx, onlineDDL.UUID, fmt.Sprintf("executed gh-ost --execute=%v, err=%v", execute, err)) - if err != nil { - // See if we can get more info from the failure file - if content, ferr := os.ReadFile(path.Join(tempDir, migrationFailureFileName)); ferr == nil { - failureMessage := strings.TrimSpace(string(content)) - if failureMessage != "" { - // This message was produced by gh-ost itself. It is more informative than the default "migration failed..." message. Overwrite. - return errors.New(failureMessage) - } - } - } - return err - } - - e.ownedRunningMigrations.Store(onlineDDL.UUID, onlineDDL) - - go func() error { - defer e.ownedRunningMigrations.Delete(onlineDDL.UUID) - defer e.deleteGhostPostponeFlagFile(onlineDDL.UUID) // irrespective whether the file was in fact in use or not - defer e.dropOnlineDDLUser(ctx) - defer e.gcArtifacts(ctx) - - log.Infof("Will now dry-run gh-ost on: %s:%d", variables.host, variables.port) - if err := runGhost(false); err != nil { - // perhaps gh-ost was interrupted midway and didn't have the chance to send a "failed" status - _ = e.failMigration(ctx, onlineDDL, err) - - log.Errorf("Error executing gh-ost dry run: %+v", err) - return err - } - log.Infof("+ OK") - - log.Infof("Will now run gh-ost on: %s:%d", variables.host, variables.port) - startedMigrations.Add(1) - if err := runGhost(true); err != nil { - // perhaps gh-ost was interrupted midway and didn't have the chance to send a "failes" status - _ = e.failMigration(ctx, onlineDDL, err) - failedMigrations.Add(1) - log.Errorf("Error running gh-ost: %+v", err) - return err - } - // Migration successful! - defer e.reloadSchema(ctx) - successfulMigrations.Add(1) - log.Infof("+ OK") - return nil - }() - return nil -} - -// ExecuteWithPTOSC validates and runs a pt-online-schema-change process. -// Validation included testing the backend MySQL server and the pt-online-schema-change binary itself -// Execution runs first a dry run, then an actual migration -func (e *Executor) ExecuteWithPTOSC(ctx context.Context, onlineDDL *schema.OnlineDDL) error { - if e.tabletTypeFunc() != topodatapb.TabletType_PRIMARY { - return ErrExecutorNotWritableTablet - } - variables, err := e.readMySQLVariables(ctx) - if err != nil { - log.Errorf("Error before running pt-online-schema-change: %+v", err) - return err - } - if variables.readOnly { - err := fmt.Errorf("Error before running pt-online-schema-change: MySQL server is read_only") - log.Errorf(err.Error()) - return err - } - onlineDDLPassword, err := e.createOnlineDDLUser(ctx) - if err != nil { - err := fmt.Errorf("Error creating pt-online-schema-change user: %+v", err) - log.Errorf(err.Error()) - return err - } - tempDir, err := createTempDir(onlineDDL.UUID) - if err != nil { - log.Errorf("Error creating temporary directory: %+v", err) - return err - } - - wrapperScriptContent := fmt.Sprintf(`#!/bin/bash -pt_log_path="%s" -pt_log_file="%s" - -mkdir -p "$pt_log_path" - -export MYSQL_PWD -%s "$@" > "$pt_log_path/$pt_log_file" 2>&1 - `, tempDir, migrationLogFileName, ptOSCBinaryPath, - ) - wrapperScriptFileName, err := createTempScript(tempDir, "pt-online-schema-change-wrapper.sh", wrapperScriptContent) - if err != nil { - log.Errorf("Error creating wrapper script: %+v", err) - return err - } - pluginCode := ` - package pt_online_schema_change_plugin; - - use strict; - use LWP::Simple; - - sub new { - my($class, % args) = @_; - my $self = { %args }; - return bless $self, $class; - } - - sub init { - my($self, % args) = @_; - } - - sub before_create_new_table { - my($self, % args) = @_; - get("http://localhost:{{VTTABLET_PORT}}/schema-migration/report-status?uuid={{MIGRATION_UUID}}&status={{OnlineDDLStatusRunning}}&hint=&dryrun={{DRYRUN}}"); - } - - sub before_exit { - my($self, % args) = @_; - my $exit_status = $args{exit_status}; - if ($exit_status == 0) { - get("http://localhost:{{VTTABLET_PORT}}/schema-migration/report-status?uuid={{MIGRATION_UUID}}&status={{OnlineDDLStatusComplete}}&hint=&dryrun={{DRYRUN}}"); - } else { - get("http://localhost:{{VTTABLET_PORT}}/schema-migration/report-status?uuid={{MIGRATION_UUID}}&status={{OnlineDDLStatusFailed}}&hint=&dryrun={{DRYRUN}}"); - } - } - - sub get_slave_lag { - my ($self, %args) = @_; - - return sub { - if (head("http://localhost:{{VTTABLET_PORT}}/throttler/check?app={{THROTTLER_ONLINE_DDL_APP}}:{{THROTTLER_PT_OSC_APP}}:{{MIGRATION_UUID}}&p=low")) { - # Got HTTP 200 OK, means throttler is happy - return 0; - } else { - # Throttler requests to hold back - return 2147483647; # maxint, report *very* high lag - } - }; - } - - 1; - ` - pluginCode = strings.ReplaceAll(pluginCode, "{{VTTABLET_PORT}}", fmt.Sprintf("%d", servenv.Port())) - pluginCode = strings.ReplaceAll(pluginCode, "{{MIGRATION_UUID}}", onlineDDL.UUID) - pluginCode = strings.ReplaceAll(pluginCode, "{{THROTTLER_ONLINE_DDL_APP}}", throttlerapp.OnlineDDLName.String()) - pluginCode = strings.ReplaceAll(pluginCode, "{{THROTTLER_PT_OSC_APP}}", throttlerapp.PTOSCName.String()) - - pluginCode = strings.ReplaceAll(pluginCode, "{{OnlineDDLStatusRunning}}", string(schema.OnlineDDLStatusRunning)) - pluginCode = strings.ReplaceAll(pluginCode, "{{OnlineDDLStatusComplete}}", string(schema.OnlineDDLStatusComplete)) - pluginCode = strings.ReplaceAll(pluginCode, "{{OnlineDDLStatusFailed}}", string(schema.OnlineDDLStatusFailed)) - - // Validate pt-online-schema-change binary: - log.Infof("Will now validate pt-online-schema-change binary") - _, err = execCmd( - "bash", - []string{ - wrapperScriptFileName, - "--version", - }, - os.Environ(), - "/tmp", - nil, - nil, - ) - if err != nil { - log.Errorf("Error testing pt-online-schema-change binary: %+v", err) - return err - } - log.Infof("+ OK") - - if err := e.updateMigrationLogPath(ctx, onlineDDL.UUID, variables.host, tempDir); err != nil { - return err - } - - alterOptions := e.parseAlterOptions(ctx, onlineDDL) - - // The following sleep() is temporary and artificial. Because we create a new user for this - // migration, and because we throttle by replicas, we need to wait for the replicas to be - // caught up with the new user creation. Otherwise, the OSC tools will fail connecting to the replicas... - // Once we have a built in throttling service , we will no longer need to have the OSC tools probe the - // replicas. Instead, they will consult with our throttling service. - // TODO(shlomi): replace/remove this when we have a proper throttling solution - time.Sleep(time.Second) - - runPTOSC := func(execute bool) error { - os.Setenv("MYSQL_PWD", onlineDDLPassword) - newTableName := fmt.Sprintf("_%s_%s_new", onlineDDL.UUID, schema.ReadableTimestamp()) - - if err := e.updateArtifacts(ctx, onlineDDL.UUID, - fmt.Sprintf("_%s_old", onlineDDL.Table), - fmt.Sprintf("__%s_old", onlineDDL.Table), - newTableName, - ); err != nil { - return err - } - - executeFlag := "--dry-run" - if execute { - executeFlag = "--execute" - } - finalPluginCode := strings.ReplaceAll(pluginCode, "{{DRYRUN}}", fmt.Sprintf("%t", !execute)) - pluginFile, err := createTempScript(tempDir, "pt-online-schema-change-plugin", finalPluginCode) - if err != nil { - log.Errorf("Error creating script: %+v", err) - return err - } - args := []string{ - wrapperScriptFileName, - `--pid`, - e.ptPidFileName(onlineDDL.UUID), - `--plugin`, - pluginFile, - `--new-table-name`, - newTableName, - `--alter`, - alterOptions, - `--check-slave-lag`, // We use primary's identity so that pt-online-schema-change calls our lag plugin for exactly 1 server - fmt.Sprintf(`h=%s,P=%d,D=%s,t=%s,u=%s`, variables.host, variables.port, e.dbName, onlineDDL.Table, onlineDDLUser), - executeFlag, - fmt.Sprintf(`h=%s,P=%d,D=%s,t=%s,u=%s`, variables.host, variables.port, e.dbName, onlineDDL.Table, onlineDDLUser), - } - - if execute { - args = append(args, - `--no-drop-new-table`, - `--no-drop-old-table`, - ) - } - args = append(args, onlineDDL.StrategySetting().RuntimeOptions()...) - _, err = execCmd("bash", args, os.Environ(), "/tmp", nil, nil) - return err - } - - e.ownedRunningMigrations.Store(onlineDDL.UUID, onlineDDL) - - go func() error { - defer e.ownedRunningMigrations.Delete(onlineDDL.UUID) - defer e.dropOnlineDDLUser(ctx) - defer e.gcArtifacts(ctx) - - log.Infof("Will now dry-run pt-online-schema-change on: %s:%d", variables.host, variables.port) - if err := runPTOSC(false); err != nil { - // perhaps pt-osc was interrupted midway and didn't have the chance to send a "failes" status - _ = e.failMigration(ctx, onlineDDL, err) - _ = e.updateMigrationTimestamp(ctx, "completed_timestamp", onlineDDL.UUID) - log.Errorf("Error executing pt-online-schema-change dry run: %+v", err) - return err - } - log.Infof("+ OK") - - log.Infof("Will now run pt-online-schema-change on: %s:%d", variables.host, variables.port) - startedMigrations.Add(1) - if err := runPTOSC(true); err != nil { - // perhaps pt-osc was interrupted midway and didn't have the chance to send a "failes" status - _ = e.failMigration(ctx, onlineDDL, err) - _ = e.updateMigrationTimestamp(ctx, "completed_timestamp", onlineDDL.UUID) - _ = e.dropPTOSCMigrationTriggers(ctx, onlineDDL) - failedMigrations.Add(1) - log.Errorf("Error running pt-online-schema-change: %+v", err) - return err - } - // Migration successful! - defer e.reloadSchema(ctx) - successfulMigrations.Add(1) - log.Infof("+ OK") - return nil - }() - return nil -} - func (e *Executor) readMigration(ctx context.Context, uuid string) (onlineDDL *schema.OnlineDDL, row sqltypes.RowNamedValues, err error) { query, err := sqlparser.ParseAndBind(sqlSelectMigration, @@ -2087,36 +1507,6 @@ func (e *Executor) terminateMigration(ctx context.Context, onlineDDL *schema.Onl if err := e.terminateVReplMigration(ctx, onlineDDL.UUID); err != nil { return foundRunning, fmt.Errorf("Error terminating migration, vreplication exec error: %+v", err) } - case schema.DDLStrategyPTOSC: - // see if pt-osc is running (could have been executed by this vttablet or one that crashed in the past) - if running, pid, _ := e.isPTOSCMigrationRunning(ctx, onlineDDL.UUID); running { - foundRunning = true - // Because pt-osc doesn't offer much control, we take a brute force approach to killing it, - // revoking its privileges, and cleaning up its triggers. - if err := syscallutil.Kill(pid, syscall.SIGTERM); err != nil { - return foundRunning, nil - } - if err := syscallutil.Kill(pid, syscall.SIGKILL); err != nil { - return foundRunning, nil - } - if err := e.dropOnlineDDLUser(ctx); err != nil { - return foundRunning, nil - } - if err := e.dropPTOSCMigrationTriggers(ctx, onlineDDL); err != nil { - return foundRunning, nil - } - } - case schema.DDLStrategyGhost: - // double check: is the running migration the very same one we wish to cancel? - if _, ok := e.ownedRunningMigrations.Load(onlineDDL.UUID); ok { - // assuming all goes well in next steps, we can already report that there has indeed been a migration - foundRunning = true - } - // gh-ost migrations are easy to kill: just touch their specific panic flag files. We trust - // gh-ost to terminate. No need to KILL it. And there's no trigger cleanup. - if err := e.createGhostPanicFlagFile(onlineDDL.UUID); err != nil { - return foundRunning, fmt.Errorf("Error terminating gh-ost migration, flag file error: %+v", err) - } } return foundRunning, nil } @@ -2319,7 +1709,7 @@ func (e *Executor) scheduleNextMigration(ctx context.Context) error { if !(isImmediateOperation && postponeCompletion) { // Any non-postponed migration can be scheduled - // postponed ALTER can be scheduled (because gh-ost or vreplication will postpone the cut-over) + // postponed ALTER can be scheduled (because vreplication will postpone the cut-over) // We only schedule a single migration in the execution of this function onlyScheduleOneMigration.Do(func() { err = e.updateMigrationStatus(ctx, uuid, schema.OnlineDDLStatusReady) @@ -2390,7 +1780,6 @@ func (e *Executor) reviewEmptyTableRevertMigrations(ctx context.Context, onlineD // - All VIEW operations // - An INSTANT DDL accompanied by relevant ddl strategy flags // Non immediate operations are: -// - A gh-ost migration // - A vitess (vreplication) migration func (e *Executor) reviewImmediateOperations( ctx context.Context, @@ -3184,14 +2573,6 @@ func (e *Executor) executeAlterDDLActionMigration(ctx context.Context, onlineDDL if err := e.ExecuteWithVReplication(ctx, onlineDDL, nil); err != nil { return failMigration(err) } - case schema.DDLStrategyGhost: - if err := e.ExecuteWithGhost(ctx, onlineDDL); err != nil { - return failMigration(err) - } - case schema.DDLStrategyPTOSC: - if err := e.ExecuteWithPTOSC(ctx, onlineDDL); err != nil { - return failMigration(err) - } case schema.DDLStrategyMySQL: if _, err := e.executeDirectly(ctx, onlineDDL); err != nil { return failMigration(err) @@ -3441,72 +2822,6 @@ func (e *Executor) runNextMigration(ctx context.Context) error { return nil } -// isPTOSCMigrationRunning sees if pt-online-schema-change is running a specific migration, -// by examining its PID file -func (e *Executor) isPTOSCMigrationRunning(ctx context.Context, uuid string) (isRunning bool, pid int, err error) { - // Try and read its PID file: - content, err := os.ReadFile(e.ptPidFileName(uuid)) - if err != nil { - // file probably does not exist (migration not running) - // or any other issue --> we can't confirm that the migration is actually running - return false, pid, err - } - contentString := strings.TrimSpace(string(content)) - // - pid, err = strconv.Atoi(contentString) - if err != nil { - // can't get the PID right. Can't confirm migration is running. - return false, pid, err - } - p, err := os.FindProcess(pid) - if err != nil { - // can't find the process. Can't confirm migration is running. - return false, pid, err - } - err = p.Signal(syscall.Signal(0)) - if err != nil { - // can't verify process is running. Can't confirm migration is running. - return false, pid, err - } - // AHA! We are able to confirm this pt-osc migration is actually running! - return true, pid, nil -} - -// dropOnlineDDLUser drops the given ddl user account at the end of migration -func (e *Executor) dropPTOSCMigrationTriggers(ctx context.Context, onlineDDL *schema.OnlineDDL) error { - conn, err := dbconnpool.NewDBConnection(ctx, e.env.Config().DB.DbaConnector()) - if err != nil { - return err - } - defer conn.Close() - - parsed := sqlparser.BuildParsedQuery(sqlSelectPTOSCMigrationTriggers, ":mysql_schema", ":mysql_table") - bindVars := map[string]*querypb.BindVariable{ - "mysql_schema": sqltypes.StringBindVariable(onlineDDL.Schema), - "mysql_table": sqltypes.StringBindVariable(onlineDDL.Table), - } - bound, err := parsed.GenerateQuery(bindVars, nil) - if err != nil { - return err - } - r, err := e.execQuery(ctx, bound) - if err != nil { - return err - } - for _, row := range r.Named().Rows { - // iterate pt-osc triggers and drop them - triggerSchema := row.AsString("trigger_schema", "") - triggerName := row.AsString("trigger_name", "") - - dropParsed := sqlparser.BuildParsedQuery(sqlDropTrigger, triggerSchema, triggerName) - if _, err := conn.ExecuteFetch(dropParsed.Query, 0, false); err != nil { - return err - } - } - - return err -} - // readVReplStream reads _vt.vreplication entries for given workflow func (e *Executor) readVReplStream(ctx context.Context, uuid string, okIfMissing bool) (*VReplStream, error) { query, err := sqlparser.ParseAndBind(sqlReadVReplStream, @@ -3840,37 +3155,6 @@ func (e *Executor) reviewRunningMigrations(ctx context.Context) (countRunnning i if err := reviewVReplRunningMigration(); err != nil { return countRunnning, cancellable, err } - case schema.DDLStrategyPTOSC: - { - // Since pt-osc doesn't have a "liveness" plugin entry point, we do it externally: - // if the process is alive, we update the `liveness_timestamp` for this migration. - running, _, err := e.isPTOSCMigrationRunning(ctx, uuid) - if err != nil { - return countRunnning, cancellable, err - } - if running { - _ = e.updateMigrationTimestamp(ctx, "liveness_timestamp", uuid) - } - if _, ok := e.ownedRunningMigrations.Load(uuid); !ok { - // Ummm, the migration is running but we don't own it. This means the migration - // is rogue. Maybe executed by another tablet. Anyway, if we don't own it, we can't - // complete the migration. Even if it runs, the logic around announcing it as complete - // is missing. So we may as well cancel it. - message := fmt.Sprintf("cancelling a pt-osc running migration %s which is not owned (not started, or is assumed to be terminated) by this executor", uuid) - cancellable = append(cancellable, newCancellableMigration(uuid, message)) - } - } - case schema.DDLStrategyGhost: - { - if _, ok := e.ownedRunningMigrations.Load(uuid); !ok { - // Ummm, the migration is running but we don't own it. This means the migration - // is rogue. Maybe executed by another tablet. Anyway, if we don't own it, we can't - // complete the migration. Even if it runs, the logic around announcing it as complete - // is missing. So we may as well cancel it. - message := fmt.Sprintf("cancelling a gh-ost running migration %s which is not owned by this executor. This can happen when the migration was started by a different tablet. Then, either a MySQL failure, a PRS, or ERS took place. gh-ost does not survive a MySQL restart or a shard failing over to a new PRIMARY", uuid) - cancellable = append(cancellable, newCancellableMigration(uuid, message)) - } - } } countRunnning++ } @@ -4205,21 +3489,6 @@ func (e *Executor) updateMigrationTimestamp(ctx context.Context, timestampColumn return err } -func (e *Executor) updateMigrationLogPath(ctx context.Context, uuid string, hostname, logPath string) error { - logFile := path.Join(logPath, migrationLogFileName) - hostLogPath := fmt.Sprintf("%s:%s", hostname, logPath) - query, err := sqlparser.ParseAndBind(sqlUpdateMigrationLogPath, - sqltypes.StringBindVariable(hostLogPath), - sqltypes.StringBindVariable(logFile), - sqltypes.StringBindVariable(uuid), - ) - if err != nil { - return err - } - _, err = e.execQuery(ctx, query) - return err -} - func (e *Executor) updateArtifacts(ctx context.Context, uuid string, artifacts ...string) error { bindArtifacts := strings.Join(artifacts, ",") query, err := sqlparser.ParseAndBind(sqlUpdateArtifacts, @@ -4817,11 +4086,6 @@ func (e *Executor) CompleteMigration(ctx context.Context, uuid string) (result * return nil, err } defer e.triggerNextCheckInterval() - if err := e.deleteGhostPostponeFlagFile(uuid); err != nil { - // This should work without error even if the migration is not a gh-ost migration, and even - // if the file does not exist. An error here indicates a general system error of sorts. - return nil, err - } rs, err := e.execQuery(ctx, query) if err != nil { return nil, err @@ -5247,27 +4511,6 @@ func (e *Executor) onSchemaMigrationStatus(ctx context.Context, return nil } -// OnSchemaMigrationStatus is called by TabletServer's API, which is invoked by a running gh-ost migration's hooks. -func (e *Executor) OnSchemaMigrationStatus(ctx context.Context, - uuidParam, statusParam, dryrunParam, progressParam, etaParam, rowsCopiedParam, hint string) (err error) { - status := schema.OnlineDDLStatus(statusParam) - dryRun := (dryrunParam == "true") - var progressPct float64 - if pct, err := strconv.ParseFloat(progressParam, 64); err == nil { - progressPct = pct - } - var etaSeconds int64 = etaSecondsUnknown - if eta, err := strconv.ParseInt(etaParam, 10, 64); err == nil { - etaSeconds = eta - } - var rowsCopied int64 - if rows, err := strconv.ParseInt(rowsCopiedParam, 10, 64); err == nil { - rowsCopied = rows - } - - return e.onSchemaMigrationStatus(ctx, uuidParam, status, dryRun, progressPct, etaSeconds, rowsCopied, hint) -} - // checkOnPreparedPool checks if there are any cross-shard prepared transactions on the given table func (e *Executor) checkOnPreparedPool(ctx context.Context, table string, waitTime time.Duration) error { if e.isPreparedPoolEmpty(table) { diff --git a/go/vt/vttablet/onlineddl/schema.go b/go/vt/vttablet/onlineddl/schema.go index 6c0bff1086f..4c47e46da3a 100644 --- a/go/vt/vttablet/onlineddl/schema.go +++ b/go/vt/vttablet/onlineddl/schema.go @@ -468,16 +468,6 @@ const ( migration_status='ready' ORDER BY id ` - sqlSelectPTOSCMigrationTriggers = `SELECT - TRIGGER_SCHEMA as trigger_schema, - TRIGGER_NAME as trigger_name - FROM INFORMATION_SCHEMA.TRIGGERS - WHERE - EVENT_OBJECT_SCHEMA=%a - AND EVENT_OBJECT_TABLE=%a - AND ACTION_TIMING='AFTER' - AND LEFT(TRIGGER_NAME, 7)='pt_osc_' - ` selSelectCountFKParentConstraints = ` SELECT COUNT(*) as num_fk_constraints @@ -494,7 +484,6 @@ const ( TABLE_SCHEMA=%a AND TABLE_NAME=%a AND REFERENCED_TABLE_NAME IS NOT NULL ` - sqlDropTrigger = "DROP TRIGGER IF EXISTS `%a`.`%a`" sqlShowTablesLike = "SHOW TABLES LIKE '%a'" sqlDropTable = "DROP TABLE `%a`" sqlDropTableIfExists = "DROP TABLE IF EXISTS `%a`" @@ -577,18 +566,3 @@ const ( metadata_locks.OBJECT_SCHEMA=database() AND metadata_locks.OBJECT_NAME=%a ` ) - -var ( - sqlCreateOnlineDDLUser = []string{ - `CREATE USER IF NOT EXISTS %s IDENTIFIED BY '%s'`, - `ALTER USER %s IDENTIFIED BY '%s'`, - } - sqlGrantOnlineDDLSuper = []string{ - `GRANT SUPER ON *.* TO %s`, - } - sqlGrantOnlineDDLUser = []string{ - `GRANT PROCESS, REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO %s`, - `GRANT ALTER, CREATE, CREATE VIEW, SHOW VIEW, DELETE, DROP, INDEX, INSERT, LOCK TABLES, SELECT, TRIGGER, UPDATE ON *.* TO %s`, - } - sqlDropOnlineDDLUser = `DROP USER IF EXISTS %s` -) diff --git a/go/vt/vttablet/onlineddl/util.go b/go/vt/vttablet/onlineddl/util.go deleted file mode 100644 index 3d06e6df60e..00000000000 --- a/go/vt/vttablet/onlineddl/util.go +++ /dev/null @@ -1,86 +0,0 @@ -/* -Copyright 2019 The Vitess Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package onlineddl - -import ( - "crypto/rand" - "crypto/sha256" - "encoding/hex" - "fmt" - "io" - "os" - "os/exec" - "path/filepath" - "strings" - - "vitess.io/vitess/go/vt/log" -) - -// execCmd searches the PATH for a command and runs it, logging the output. -// If input is not nil, pipe it to the command's stdin. -func execCmd(name string, args, env []string, dir string, input io.Reader, output io.Writer) (cmd *exec.Cmd, err error) { - cmdPath, err := exec.LookPath(name) - if err != nil { - return cmd, err - } - log.Infof("execCmd: %v %v %v", name, cmdPath, args) - - cmd = exec.Command(cmdPath, args...) - cmd.Env = env - cmd.Dir = dir - if input != nil { - cmd.Stdin = input - } - if output != nil { - cmd.Stdout = output - cmd.Stderr = output - } - err = cmd.Run() - if err != nil { - err = fmt.Errorf("failed running command: %v %s; error=%v", name, strings.Join(args, " "), err) - log.Errorf(err.Error()) - } - log.Infof("execCmd success: %v", name) - return cmd, err -} - -// createTempDir creates a temporary directory and returns its name -func createTempDir(hint string) (dirName string, err error) { - if hint != "" { - return os.MkdirTemp("", fmt.Sprintf("online-ddl-%s-*", hint)) - } - return os.MkdirTemp("", "online-ddl-*") -} - -// createTempScript creates an executable file in given directory and with given text as content. -func createTempScript(dirName, fileName, text string) (fullName string, err error) { - fullName = filepath.Join(dirName, fileName) - bytes := []byte(text) - err = os.WriteFile(fullName, bytes, 0755) - return fullName, err -} - -// RandomHash returns a 64 hex character random string -func RandomHash() string { - size := 64 - rb := make([]byte, size) - _, _ = rand.Read(rb) - - hasher := sha256.New() - hasher.Write(rb) - return hex.EncodeToString(hasher.Sum(nil)) -} diff --git a/go/vt/vttablet/onlineddl/util_test.go b/go/vt/vttablet/onlineddl/util_test.go deleted file mode 100644 index 4beb154c0ae..00000000000 --- a/go/vt/vttablet/onlineddl/util_test.go +++ /dev/null @@ -1,32 +0,0 @@ -/* -Copyright 2019 The Vitess Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package onlineddl - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestRandomHash(t *testing.T) { - h1 := RandomHash() - h2 := RandomHash() - - assert.Equal(t, len(h1), 64) - assert.Equal(t, len(h2), 64) - assert.NotEqual(t, h1, h2) -} diff --git a/go/vt/vttablet/onlineddl/vrepl.go b/go/vt/vttablet/onlineddl/vrepl.go index b00bcc40894..7423b05a574 100644 --- a/go/vt/vttablet/onlineddl/vrepl.go +++ b/go/vt/vttablet/onlineddl/vrepl.go @@ -1,10 +1,6 @@ /* Original copyright by GitHub as follows. Additions by the Vitess authors as follows. */ -/* - Copyright 2016 GitHub Inc. - See https://github.com/github/gh-ost/blob/master/LICENSE -*/ /* Copyright 2021 The Vitess Authors. diff --git a/go/vt/vttablet/tabletmanager/vreplication/vreplicator.go b/go/vt/vttablet/tabletmanager/vreplication/vreplicator.go index 54e76efa092..ccc37064870 100644 --- a/go/vt/vttablet/tabletmanager/vreplication/vreplicator.go +++ b/go/vt/vttablet/tabletmanager/vreplication/vreplicator.go @@ -632,8 +632,7 @@ func (vr *vreplicator) setSQLMode(ctx context.Context, dbClient *vdbClient) (fun // - "vreplication:online-ddl" for online ddl flows. // Note that with such name, it's possible to throttle // the workflow by either /throttler/throttle-app?app=vreplication and/or /throttler/throttle-app?app=online-ddl -// This is useful when we want to throttle all migrations. We throttle "online-ddl" and that applies to both vreplication -// migrations as well as gh-ost migrations. +// This is useful when we want to throttle all migrations. We throttle "online-ddl". func (vr *vreplicator) throttlerAppName() string { names := []string{vr.WorkflowName, throttlerapp.VReplicationName.String()} if vr.WorkflowType == int32(binlogdatapb.VReplicationWorkflowType_OnlineDDL) { diff --git a/go/vt/vttablet/tabletserver/tabletserver.go b/go/vt/vttablet/tabletserver/tabletserver.go index 53322384bdc..1120e09deef 100644 --- a/go/vt/vttablet/tabletserver/tabletserver.go +++ b/go/vt/vttablet/tabletserver/tabletserver.go @@ -230,7 +230,6 @@ func NewTabletServer(ctx context.Context, env *vtenv.Environment, name string, c tsv.registerTxlogzHandler() tsv.registerQueryListHandlers([]*QueryList{tsv.statelessql, tsv.statefulql, tsv.olapql}) tsv.registerTwopczHandler() - tsv.registerMigrationStatusHandler() tsv.registerThrottlerHandlers() tsv.registerDebugEnvHandler() @@ -1906,18 +1905,6 @@ func (tsv *TabletServer) registerTwopczHandler() { }) } -func (tsv *TabletServer) registerMigrationStatusHandler() { - tsv.exporter.HandleFunc("/schema-migration/report-status", func(w http.ResponseWriter, r *http.Request) { - ctx := tabletenv.LocalContext() - query := r.URL.Query() - if err := tsv.onlineDDLExecutor.OnSchemaMigrationStatus(ctx, query.Get("uuid"), query.Get("status"), query.Get("dryrun"), query.Get("progress"), query.Get("eta"), query.Get("rowscopied"), query.Get("hint")); err != nil { - http.Error(w, fmt.Sprintf("not ok: %v", err), http.StatusInternalServerError) - return - } - w.Write([]byte("ok")) - }) -} - // registerThrottlerCheckHandlers registers throttler "check" requests func (tsv *TabletServer) registerThrottlerCheckHandlers() { handle := func(path string, scope base.Scope) { diff --git a/go/vt/vttablet/tabletserver/throttle/throttlerapp/app.go b/go/vt/vttablet/tabletserver/throttle/throttlerapp/app.go index 6fef3db453a..fe9be91992c 100644 --- a/go/vt/vttablet/tabletserver/throttle/throttlerapp/app.go +++ b/go/vt/vttablet/tabletserver/throttle/throttlerapp/app.go @@ -55,8 +55,6 @@ const ( TableGCName Name = "tablegc" OnlineDDLName Name = "online-ddl" - GhostName Name = "gh-ost" - PTOSCName Name = "pt-osc" VReplicationName Name = "vreplication" VStreamerName Name = "vstreamer" diff --git a/go/vt/vttablet/tabletserver/vstreamer/vstreamer.go b/go/vt/vttablet/tabletserver/vstreamer/vstreamer.go index 237b2e78386..7384865d7eb 100644 --- a/go/vt/vttablet/tabletserver/vstreamer/vstreamer.go +++ b/go/vt/vttablet/tabletserver/vstreamer/vstreamer.go @@ -607,7 +607,7 @@ func (vs *vstreamer) parseEvent(ev mysql.BinlogEvent, bufferAndTransmit func(vev vs.plans[id] = nil return nil, nil } - if vtschema.IsInternalOperationTableName(tm.Name) { // ignore tables created by onlineddl/gh-ost/pt-osc + if vtschema.IsInternalOperationTableName(tm.Name) { // ignore tables created by onlineddl/GC vs.plans[id] = nil return nil, nil } diff --git a/proto/vtctldata.proto b/proto/vtctldata.proto index 745a3599cc9..78a76a36f82 100644 --- a/proto/vtctldata.proto +++ b/proto/vtctldata.proto @@ -181,8 +181,8 @@ message SchemaMigration { // SchemaMigration_VITESS was also formerly called "ONLINE". VITESS = 0; ONLINE = 0; - GHOST = 1; - PTOSC = 2; + reserved 1; // Was GHOST + reserved 2; // Was PTOSC // SchemaMigration_DIRECT runs the migration directly against MySQL (e.g. `ALTER TABLE ...`), // meaning it is not actually an "online" DDL migration. DIRECT = 3; diff --git a/web/vtadmin/src/proto/vtadmin.d.ts b/web/vtadmin/src/proto/vtadmin.d.ts index 0a946386995..2175e3508f4 100644 --- a/web/vtadmin/src/proto/vtadmin.d.ts +++ b/web/vtadmin/src/proto/vtadmin.d.ts @@ -51810,8 +51810,6 @@ export namespace vtctldata { enum Strategy { VITESS = 0, ONLINE = 0, - GHOST = 1, - PTOSC = 2, DIRECT = 3, MYSQL = 4 } diff --git a/web/vtadmin/src/proto/vtadmin.js b/web/vtadmin/src/proto/vtadmin.js index cc3ef73ced6..17a941acfcf 100644 --- a/web/vtadmin/src/proto/vtadmin.js +++ b/web/vtadmin/src/proto/vtadmin.js @@ -126857,8 +126857,6 @@ export const vtctldata = $root.vtctldata = (() => { return "strategy: enum value expected"; case 0: case 0: - case 1: - case 2: case 3: case 4: break; @@ -127083,14 +127081,6 @@ export const vtctldata = $root.vtctldata = (() => { case 0: message.strategy = 0; break; - case "GHOST": - case 1: - message.strategy = 1; - break; - case "PTOSC": - case 2: - message.strategy = 2; - break; case "DIRECT": case 3: message.strategy = 3; @@ -127556,8 +127546,6 @@ export const vtctldata = $root.vtctldata = (() => { * @enum {number} * @property {number} VITESS=0 VITESS value * @property {number} ONLINE=0 ONLINE value - * @property {number} GHOST=1 GHOST value - * @property {number} PTOSC=2 PTOSC value * @property {number} DIRECT=3 DIRECT value * @property {number} MYSQL=4 MYSQL value */ @@ -127565,8 +127553,6 @@ export const vtctldata = $root.vtctldata = (() => { const valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "VITESS"] = 0; values["ONLINE"] = 0; - values[valuesById[1] = "GHOST"] = 1; - values[valuesById[2] = "PTOSC"] = 2; values[valuesById[3] = "DIRECT"] = 3; values[valuesById[4] = "MYSQL"] = 4; return values; From 9bf33261ff6cef2ed0099cce77e830720694a0b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Taylor?= Date: Thu, 6 Feb 2025 08:26:05 +0100 Subject: [PATCH 4/8] Make sure no AST types are bare slices (#17674) Signed-off-by: Andres Taylor Signed-off-by: Vicent Marti Co-authored-by: Vicent Marti --- .../vtgate/queries/random/query_gen.go | 32 +- go/tools/astfmtgen/main.go | 26 +- go/tools/asthelpergen/asthelpergen.go | 11 +- go/tools/asthelpergen/asthelpergen_test.go | 19 + .../asthelpergen/integration/ast_rewrite.go | 93 +- .../integration/integration_rewriter_test.go | 79 +- .../asthelpergen/integration/test_helpers.go | 8 - go/tools/asthelpergen/rewrite_gen.go | 42 +- go/vt/sqlparser/analyzer_test.go | 6 +- go/vt/sqlparser/ast.go | 135 +- go/vt/sqlparser/ast_clone.go | 100 +- go/vt/sqlparser/ast_copy_on_rewrite.go | 242 ++- go/vt/sqlparser/ast_equals.go | 115 +- go/vt/sqlparser/ast_format.go | 42 +- go/vt/sqlparser/ast_format_fast.go | 45 +- go/vt/sqlparser/ast_format_test.go | 35 + go/vt/sqlparser/ast_funcs.go | 60 +- go/vt/sqlparser/ast_rewrite.go | 1490 +++++++++++++---- go/vt/sqlparser/ast_visit.go | 108 +- go/vt/sqlparser/cached_size.go | 70 +- go/vt/sqlparser/normalizer.go | 8 +- go/vt/sqlparser/parsed_query_test.go | 4 +- go/vt/sqlparser/parser.go | 2 +- go/vt/sqlparser/precedence_test.go | 2 +- go/vt/sqlparser/predicate_rewriting.go | 2 +- go/vt/sqlparser/random_expr.go | 10 +- go/vt/sqlparser/rewriter_api.go | 8 - go/vt/sqlparser/rewriter_test.go | 10 +- go/vt/sqlparser/sql.go | 1471 ++++++++-------- go/vt/sqlparser/sql.y | 16 +- go/vt/sqlparser/tracked_buffer.go | 78 +- go/vt/vtctl/workflow/materializer.go | 7 +- go/vt/vtctl/workflow/stream_migrator.go | 12 +- go/vt/vtctl/workflow/utils.go | 2 +- go/vt/vtexplain/vtexplain_vttablet.go | 2 +- go/vt/vtgate/engine/insert_test.go | 14 +- go/vt/vtgate/evalengine/expr_env_test.go | 2 +- .../evalengine/integration/fuzz_test.go | 4 +- go/vt/vtgate/evalengine/mysql_test.go | 2 +- go/vt/vtgate/evalengine/translate_test.go | 10 +- go/vt/vtgate/planbuilder/ddl.go | 4 +- .../planbuilder/expression_converter_test.go | 12 +- .../planbuilder/operator_transformers.go | 4 +- .../planbuilder/operators/SQL_builder.go | 20 +- .../operators/aggregation_pushing.go | 12 +- .../planbuilder/operators/aggregator.go | 12 +- .../planbuilder/operators/apply_join.go | 4 +- .../vtgate/planbuilder/operators/ast_to_op.go | 8 +- .../vtgate/planbuilder/operators/comments.go | 2 +- go/vt/vtgate/planbuilder/operators/delete.go | 15 +- .../vtgate/planbuilder/operators/distinct.go | 2 +- go/vt/vtgate/planbuilder/operators/filter.go | 2 +- .../vtgate/planbuilder/operators/hash_join.go | 2 +- go/vt/vtgate/planbuilder/operators/horizon.go | 6 +- .../operators/horizon_expanding.go | 4 +- .../operators/info_schema_planning.go | 14 +- go/vt/vtgate/planbuilder/operators/insert.go | 4 +- go/vt/vtgate/planbuilder/operators/limit.go | 2 +- go/vt/vtgate/planbuilder/operators/mirror.go | 2 +- .../vtgate/planbuilder/operators/operator.go | 2 +- .../vtgate/planbuilder/operators/ordering.go | 2 +- .../planbuilder/operators/plan_query.go | 7 +- .../planbuilder/operators/projection.go | 16 +- .../planbuilder/operators/query_planning.go | 10 +- .../planbuilder/operators/queryprojection.go | 2 +- .../planbuilder/operators/recurse_cte.go | 2 +- go/vt/vtgate/planbuilder/operators/route.go | 2 +- .../planbuilder/operators/sharded_routing.go | 3 +- .../vtgate/planbuilder/operators/subquery.go | 6 +- .../planbuilder/operators/subquery_builder.go | 8 +- .../operators/subquery_container.go | 2 +- go/vt/vtgate/planbuilder/operators/table.go | 2 +- go/vt/vtgate/planbuilder/operators/union.go | 12 +- .../planbuilder/operators/union_merging.go | 25 +- go/vt/vtgate/planbuilder/operators/update.go | 16 +- .../planbuilder/operators/utils_test.go | 3 +- go/vt/vtgate/planbuilder/operators/vindex.go | 2 +- go/vt/vtgate/planbuilder/plan_test.go | 13 +- go/vt/vtgate/planbuilder/planner_test.go | 2 +- go/vt/vtgate/planbuilder/route.go | 8 +- go/vt/vtgate/planbuilder/select.go | 19 +- go/vt/vtgate/planbuilder/system_variables.go | 2 +- go/vt/vtgate/semantics/analyzer.go | 16 +- go/vt/vtgate/semantics/analyzer_test.go | 6 +- go/vt/vtgate/semantics/binder.go | 2 +- go/vt/vtgate/semantics/check_invalid.go | 4 +- go/vt/vtgate/semantics/derived_table.go | 4 +- go/vt/vtgate/semantics/early_rewriter.go | 42 +- go/vt/vtgate/semantics/early_rewriter_test.go | 9 +- go/vt/vtgate/semantics/real_table.go | 6 +- go/vt/vtgate/semantics/scoper.go | 6 +- go/vt/vtgate/semantics/semantic_table.go | 21 +- go/vt/vtgate/semantics/semantic_table_test.go | 2 +- go/vt/vtgate/semantics/table_collector.go | 8 +- go/vt/vtgate/semantics/typer_test.go | 3 +- go/vt/vtgate/semantics/vtable.go | 4 +- .../simplifier/expression_simplifier.go | 9 +- go/vt/vtgate/simplifier/simplifier.go | 37 +- go/vt/vtgate/vindexes/foreign_keys.go | 2 +- go/vt/vtgate/vindexes/vschema.go | 4 +- go/vt/vtgate/vschema_manager.go | 2 +- go/vt/vtgate/vschema_manager_test.go | 24 +- go/vt/vttablet/tabletmanager/vdiff/report.go | 8 +- .../tabletmanager/vdiff/table_differ.go | 17 +- .../tabletmanager/vdiff/table_plan.go | 20 +- .../vreplication/table_plan_builder.go | 23 +- .../tabletserver/planbuilder/builder.go | 2 +- .../tabletserver/planbuilder/permission.go | 2 +- .../tabletserver/vstreamer/planbuilder.go | 10 +- go/vt/wrangler/materializer.go | 9 +- go/vt/wrangler/vdiff.go | 46 +- go/vt/wrangler/vdiff_test.go | 21 +- 112 files changed, 3130 insertions(+), 1960 deletions(-) create mode 100644 go/vt/sqlparser/ast_format_test.go diff --git a/go/test/endtoend/vtgate/queries/random/query_gen.go b/go/test/endtoend/vtgate/queries/random/query_gen.go index 69bf66903f3..d7791d8df08 100644 --- a/go/test/endtoend/vtgate/queries/random/query_gen.go +++ b/go/test/endtoend/vtgate/queries/random/query_gen.go @@ -292,7 +292,7 @@ func (sg *selectGenerator) randomSelect() { } // make sure we have at least one select expression - for isRandomExpr || len(sg.sel.SelectExprs) == 0 { + for isRandomExpr || len(sg.sel.SelectExprs.Exprs) == 0 { // TODO: if the random expression is an int literal, // TODO: and if the query is (potentially) an aggregate query, // TODO: then we must group by the random expression, @@ -395,7 +395,7 @@ func (sg *selectGenerator) createJoin(tables []tableT) { // returns 1-3 random expressions based on the last two elements of tables // tables should have at least two elements -func (sg *selectGenerator) createJoinPredicates(tables []tableT) sqlparser.Exprs { +func (sg *selectGenerator) createJoinPredicates(tables []tableT) []sqlparser.Expr { if len(tables) < 2 { log.Fatalf("tables has %d elements, needs at least 2", len(tables)) } @@ -427,7 +427,7 @@ func (sg *selectGenerator) createGroupBy(tables []tableT) (grouping []column) { // add to select if rand.IntN(2) < 1 { - sg.sel.SelectExprs = append(sg.sel.SelectExprs, newAliasedColumn(col, "")) + sg.sel.AddSelectExpr(newAliasedColumn(col, "")) grouping = append(grouping, col) } } @@ -437,13 +437,13 @@ func (sg *selectGenerator) createGroupBy(tables []tableT) (grouping []column) { // aliasGroupingColumns randomly aliases the grouping columns in the SelectExprs func (sg *selectGenerator) aliasGroupingColumns(grouping []column) []column { - if len(grouping) != len(sg.sel.SelectExprs) { - log.Fatalf("grouping (length: %d) and sg.sel.SelectExprs (length: %d) should have the same length at this point", len(grouping), len(sg.sel.SelectExprs)) + if len(grouping) != len(sg.sel.SelectExprs.Exprs) { + log.Fatalf("grouping (length: %d) and sg.sel.SelectExprs (length: %d) should have the same length at this point", len(grouping), len(sg.sel.SelectExprs.Exprs)) } for i := range grouping { if rand.IntN(2) < 1 { - if aliasedExpr, ok := sg.sel.SelectExprs[i].(*sqlparser.AliasedExpr); ok { + if aliasedExpr, ok := sg.sel.SelectExprs.Exprs[i].(*sqlparser.AliasedExpr); ok { alias := fmt.Sprintf("cgroup%d", i) aliasedExpr.SetAlias(alias) grouping[i].name = alias @@ -454,7 +454,7 @@ func (sg *selectGenerator) aliasGroupingColumns(grouping []column) []column { return grouping } -// returns the aggregation columns as three types: sqlparser.SelectExprs, []column +// returns the aggregation columns as three types: *sqlparser.SelectExprs, []column func (sg *selectGenerator) createAggregations(tables []tableT) (aggregates []column) { exprGenerators := slice.Map(tables, func(t tableT) sqlparser.ExprGenerator { return &t }) // add scalar subqueries @@ -485,7 +485,7 @@ func (sg *selectGenerator) createOrderBy() { } // randomly order on SelectExprs - for _, selExpr := range sg.sel.SelectExprs { + for _, selExpr := range sg.sel.SelectExprs.Exprs { if aliasedExpr, ok := selExpr.(*sqlparser.AliasedExpr); ok && rand.IntN(2) < 1 { literal, ok := aliasedExpr.Expr.(*sqlparser.Literal) isIntLiteral := ok && literal.Type == sqlparser.IntVal @@ -527,7 +527,7 @@ func (sg *selectGenerator) createHavingPredicates(grouping []column) { } // returns between minExprs and maxExprs random expressions using generators -func (sg *selectGenerator) createRandomExprs(minExprs, maxExprs int, generators ...sqlparser.ExprGenerator) (predicates sqlparser.Exprs) { +func (sg *selectGenerator) createRandomExprs(minExprs, maxExprs int, generators ...sqlparser.ExprGenerator) (predicates []sqlparser.Expr) { if minExprs > maxExprs { log.Fatalf("minExprs is greater than maxExprs; minExprs: %d, maxExprs: %d\n", minExprs, maxExprs) } else if maxExprs <= 0 { @@ -578,7 +578,7 @@ func (sg *selectGenerator) randomlyAlias(expr sqlparser.Expr, alias string) colu } else { col.name = alias } - sg.sel.SelectExprs = append(sg.sel.SelectExprs, sqlparser.NewAliasedExpr(expr, alias)) + sg.sel.AddSelectExpr(sqlparser.NewAliasedExpr(expr, alias)) return col } @@ -586,20 +586,20 @@ func (sg *selectGenerator) randomlyAlias(expr sqlparser.Expr, alias string) colu // matchNumCols makes sure sg.sel.SelectExprs and newTable both have the same number of cols: sg.genConfig.NumCols func (sg *selectGenerator) matchNumCols(tables []tableT, newTable tableT, canAggregate bool) tableT { // remove SelectExprs and newTable.cols randomly until there are sg.genConfig.NumCols amount - for len(sg.sel.SelectExprs) > sg.genConfig.NumCols && sg.genConfig.NumCols > 0 { + for len(sg.sel.SelectExprs.Exprs) > sg.genConfig.NumCols && sg.genConfig.NumCols > 0 { // select a random index and remove it from SelectExprs and newTable - idx := rand.IntN(len(sg.sel.SelectExprs)) + idx := rand.IntN(len(sg.sel.SelectExprs.Exprs)) - sg.sel.SelectExprs[idx] = sg.sel.SelectExprs[len(sg.sel.SelectExprs)-1] - sg.sel.SelectExprs = sg.sel.SelectExprs[:len(sg.sel.SelectExprs)-1] + sg.sel.SelectExprs.Exprs[idx] = sg.sel.SelectExprs.Exprs[len(sg.sel.SelectExprs.Exprs)-1] + sg.sel.SelectExprs.Exprs = sg.sel.SelectExprs.Exprs[:len(sg.sel.SelectExprs.Exprs)-1] newTable.cols[idx] = newTable.cols[len(newTable.cols)-1] newTable.cols = newTable.cols[:len(newTable.cols)-1] } // alternatively, add random expressions until there are sg.genConfig.NumCols amount - if sg.genConfig.NumCols > len(sg.sel.SelectExprs) { - diff := sg.genConfig.NumCols - len(sg.sel.SelectExprs) + if sg.genConfig.NumCols > len(sg.sel.SelectExprs.Exprs) { + diff := sg.genConfig.NumCols - len(sg.sel.SelectExprs.Exprs) exprs := sg.createRandomExprs(diff, diff, slice.Map(tables, func(t tableT) sqlparser.ExprGenerator { return &t })...) diff --git a/go/tools/astfmtgen/main.go b/go/tools/astfmtgen/main.go index 01383171a01..d1a8c6b3bb3 100644 --- a/go/tools/astfmtgen/main.go +++ b/go/tools/astfmtgen/main.go @@ -207,8 +207,6 @@ func (r *Rewriter) rewriteAstPrintf(cursor *astutil.Cursor, expr *ast.CallExpr) token := format[i] switch token { - case 'c': - cursor.InsertBefore(r.rewriteLiteral(callexpr.X, "WriteByte", expr.Args[2+fieldnum])) case 's': cursor.InsertBefore(r.rewriteLiteral(callexpr.X, "WriteString", expr.Args[2+fieldnum])) case 'l', 'r', 'v': @@ -249,6 +247,26 @@ func (r *Rewriter) rewriteAstPrintf(cursor *astutil.Cursor, expr *ast.CallExpr) Args: []ast.Expr{&ast.BasicLit{Value: `"%d"`, Kind: gotoken.STRING}, expr.Args[2+fieldnum]}, } cursor.InsertBefore(r.rewriteLiteral(callexpr.X, "WriteString", call)) + case 'n': // directive for slices of AST nodes checked at code generation time + inputExpr := expr.Args[2+fieldnum] + inputType := r.pkg.TypesInfo.Types[inputExpr].Type + sliceType, ok := inputType.(*types.Slice) + if !ok { + panic("'%n' directive requires a slice") + } + if types.Implements(sliceType.Elem(), r.astExpr) { + // Fast path: input is []Expr + call := &ast.CallExpr{ + Fun: &ast.SelectorExpr{ + X: callexpr.X, + Sel: &ast.Ident{Name: "formatExprs"}, + }, + Args: []ast.Expr{inputExpr}, + } + cursor.InsertBefore(&ast.ExprStmt{X: call}) + break + } + panic("slow path for `n` directive for slice of type other than Expr") default: panic(fmt.Sprintf("unsupported escape %q", token)) } @@ -259,3 +277,7 @@ func (r *Rewriter) rewriteAstPrintf(cursor *astutil.Cursor, expr *ast.CallExpr) cursor.Delete() return true } + +var noQualifier = func(p *types.Package) string { + return "" +} diff --git a/go/tools/asthelpergen/asthelpergen.go b/go/tools/asthelpergen/asthelpergen.go index 3f59fdb3ece..ebb015b7339 100644 --- a/go/tools/asthelpergen/asthelpergen.go +++ b/go/tools/asthelpergen/asthelpergen.go @@ -77,9 +77,6 @@ type ( } ) -// exprInterfacePath is the path of the sqlparser.Expr interface. -const exprInterfacePath = "vitess.io/vitess/go/vt/sqlparser.Expr" - func (gen *astHelperGen) iface() *types.Interface { return gen._iface } @@ -207,19 +204,13 @@ func GenerateASTHelpers(options *Options) (map[string]*jen.File, error) { return nil, err } - exprType, _ := findTypeObject(exprInterfacePath, scopes) - var exprInterface *types.Interface - if exprType != nil { - exprInterface = exprType.Type().(*types.Named).Underlying().(*types.Interface) - } - nt := tt.Type().(*types.Named) pName := nt.Obj().Pkg().Name() generator := newGenerator(loaded[0].Module, loaded[0].TypesSizes, nt, newEqualsGen(pName, &options.Equals), newCloneGen(pName, &options.Clone), newVisitGen(pName), - newRewriterGen(pName, types.TypeString(nt, noQualifier), exprInterface), + newRewriterGen(pName, types.TypeString(nt, noQualifier)), newCOWGen(pName, nt), ) diff --git a/go/tools/asthelpergen/asthelpergen_test.go b/go/tools/asthelpergen/asthelpergen_test.go index 19ac865575d..21774187abe 100644 --- a/go/tools/asthelpergen/asthelpergen_test.go +++ b/go/tools/asthelpergen/asthelpergen_test.go @@ -21,6 +21,8 @@ import ( "strings" "testing" + "vitess.io/vitess/go/tools/codegen" + "github.com/stretchr/testify/require" ) @@ -45,3 +47,20 @@ func TestFullGeneration(t *testing.T) { require.False(t, applyIdx == 0 && cloneIdx == 0, "file doesn't contain expected contents") } } + +func TestRecreateAllFiles(t *testing.T) { + // t.Skip("This test recreates all files in the integration directory. It should only be run when the ASTHelperGen code has changed.") + result, err := GenerateASTHelpers(&Options{ + Packages: []string{"./integration/..."}, + RootInterface: "vitess.io/vitess/go/tools/asthelpergen/integration.AST", + Clone: CloneOptions{ + Exclude: []string{"*NoCloneType"}, + }, + }) + require.NoError(t, err) + + for fullPath, file := range result { + err := codegen.SaveJenFile(fullPath, file) + require.NoError(t, err) + } +} diff --git a/go/tools/asthelpergen/integration/ast_rewrite.go b/go/tools/asthelpergen/integration/ast_rewrite.go index cf92b358862..74dc743a581 100644 --- a/go/tools/asthelpergen/integration/ast_rewrite.go +++ b/go/tools/asthelpergen/integration/ast_rewrite.go @@ -61,9 +61,8 @@ func (a *application) rewriteBytes(parent AST, node Bytes, replacer replacerFunc a.cur.node = node kontinue := !a.pre(&a.cur) if a.cur.revisit { - node = a.cur.node.(Bytes) a.cur.revisit = false - return a.rewriteBytes(parent, node, replacer) + return a.rewriteAST(parent, a.cur.node, replacer) } if kontinue { return true @@ -86,7 +85,12 @@ func (a *application) rewriteInterfaceContainer(parent AST, node InterfaceContai a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteAST(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -112,9 +116,8 @@ func (a *application) rewriteInterfaceSlice(parent AST, node InterfaceSlice, rep a.cur.node = node kontinue := !a.pre(&a.cur) if a.cur.revisit { - node = a.cur.node.(InterfaceSlice) a.cur.revisit = false - return a.rewriteInterfaceSlice(parent, node, replacer) + return a.rewriteAST(parent, a.cur.node, replacer) } if kontinue { return true @@ -147,7 +150,12 @@ func (a *application) rewriteRefOfLeaf(parent AST, node *Leaf, replacer replacer a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteAST(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -173,9 +181,8 @@ func (a *application) rewriteLeafSlice(parent AST, node LeafSlice, replacer repl a.cur.node = node kontinue := !a.pre(&a.cur) if a.cur.revisit { - node = a.cur.node.(LeafSlice) a.cur.revisit = false - return a.rewriteLeafSlice(parent, node, replacer) + return a.rewriteAST(parent, a.cur.node, replacer) } if kontinue { return true @@ -208,7 +215,12 @@ func (a *application) rewriteRefOfNoCloneType(parent AST, node *NoCloneType, rep a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteAST(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -232,7 +244,12 @@ func (a *application) rewriteRefOfRefContainer(parent AST, node *RefContainer, r a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteAST(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -264,7 +281,12 @@ func (a *application) rewriteRefOfRefSliceContainer(parent AST, node *RefSliceCo a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteAST(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -304,7 +326,12 @@ func (a *application) rewriteRefOfSubImpl(parent AST, node *SubImpl, replacer re a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteAST(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -328,7 +355,12 @@ func (a *application) rewriteValueContainer(parent AST, node ValueContainer, rep a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteAST(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -357,7 +389,12 @@ func (a *application) rewriteValueSliceContainer(parent AST, node ValueSliceCont a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteAST(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -402,7 +439,12 @@ func (a *application) rewriteBasicType(parent AST, node BasicType, replacer repl a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteAST(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -426,7 +468,12 @@ func (a *application) rewriteRefOfInterfaceContainer(parent AST, node *Interface a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteAST(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -450,7 +497,12 @@ func (a *application) rewriteRefOfValueContainer(parent AST, node *ValueContaine a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteAST(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -482,7 +534,12 @@ func (a *application) rewriteRefOfValueSliceContainer(parent AST, node *ValueSli a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteAST(parent, a.cur.node, replacer) + } + if kontinue { return true } } diff --git a/go/tools/asthelpergen/integration/integration_rewriter_test.go b/go/tools/asthelpergen/integration/integration_rewriter_test.go index c7822980cd4..af7483b5916 100644 --- a/go/tools/asthelpergen/integration/integration_rewriter_test.go +++ b/go/tools/asthelpergen/integration/integration_rewriter_test.go @@ -204,6 +204,46 @@ func TestRewriteAndRevisitInterfaceSlice(t *testing.T) { }) } +func TestRewriteAndRevisitRefContainer(t *testing.T) { + leaf1 := &Leaf{1} + leaf2 := &Leaf{2} + ast1 := &RefContainer{ + ASTType: leaf1, + ASTImplementationType: leaf2, + } + ast2 := &RefContainer{ + ASTType: leaf2, + ASTImplementationType: leaf1, + } + + tv := &rewriteTestVisitor{} + + a := false + _ = Rewrite(ast1, func(cursor *Cursor) bool { + tv.pre(cursor) + switch cursor.node.(type) { + case *RefContainer: + if a { + break + } + a = true + cursor.ReplaceAndRevisit(ast2) + } + return true + }, tv.post) + + tv.assertEquals(t, []step{ + Pre{ast1}, // when we visit ast, we want to replace and revisit, + // which means that we don't do a post on this node, or visit the children + Pre{ast2}, + Pre{leaf2}, + Post{leaf2}, + Pre{leaf1}, + Post{leaf1}, + Post{ast2}, + }) +} + func TestRewriteVisitRefContainerReplace(t *testing.T) { ast := &RefContainer{ ASTType: &RefContainer{NotASTType: 12}, @@ -361,29 +401,30 @@ func (tv *rewriteTestVisitor) assertEquals(t *testing.T, expected []step) { error := false expectedSize := len(expected) for i, step := range tv.walk { - if expectedSize <= i { - t.Errorf("❌️ - Expected less elements %v", tv.walk[i:]) - break - } else { - e := expected[i] - if reflect.DeepEqual(e, step) { - a := "✔️ - " + e.String() - if error { - fmt.Println(a) - } else { - lines = append(lines, a) - } + t.Run(fmt.Sprintf("step %d", i), func(t *testing.T) { + if expectedSize <= i { + t.Fatalf("❌️ - Expected less elements %v", tv.walk[i:]) } else { - if !error { - // first error we see. - error = true - for _, line := range lines { - fmt.Println(line) + e := expected[i] + if reflect.DeepEqual(e, step) { + a := "✔️ - " + e.String() + if error { + fmt.Println(a) + } else { + lines = append(lines, a) + } + } else { + if !error { + // first error we see. + error = true + for _, line := range lines { + fmt.Println(line) + } } + t.Fatalf("❌️ - Expected: %s Got: %s\n", e.String(), step.String()) } - t.Errorf("❌️ - Expected: %s Got: %s\n", e.String(), step.String()) } - } + }) } walkSize := len(tv.walk) if expectedSize > walkSize { diff --git a/go/tools/asthelpergen/integration/test_helpers.go b/go/tools/asthelpergen/integration/test_helpers.go index 67745f19687..9a0cd186c34 100644 --- a/go/tools/asthelpergen/integration/test_helpers.go +++ b/go/tools/asthelpergen/integration/test_helpers.go @@ -68,14 +68,6 @@ func (c *Cursor) Replace(newNode AST) { // When used, this will abort the visitation of the current node - no post or children visited, // and the new node visited. func (c *Cursor) ReplaceAndRevisit(newNode AST) { - switch newNode.(type) { - case InterfaceSlice: - default: - // We need to add support to the generated code for when to look at the revisit flag. At the moment it is only - // there for slices of AST implementations - panic("no support added for this type yet") - } - c.replacer(newNode, c.parent) c.node = newNode c.revisit = true diff --git a/go/tools/asthelpergen/rewrite_gen.go b/go/tools/asthelpergen/rewrite_gen.go index cc8b18a78e9..29ffcee3d5b 100644 --- a/go/tools/asthelpergen/rewrite_gen.go +++ b/go/tools/asthelpergen/rewrite_gen.go @@ -30,21 +30,18 @@ const ( type rewriteGen struct { ifaceName string file *jen.File - // exprInterface is used to store the sqlparser.Expr interface - exprInterface *types.Interface } var _ generator = (*rewriteGen)(nil) -func newRewriterGen(pkgname string, ifaceName string, exprInterface *types.Interface) *rewriteGen { +func newRewriterGen(pkgname string, ifaceName string) *rewriteGen { file := jen.NewFile(pkgname) file.HeaderComment(licenseFileHeader) file.HeaderComment("Code generated by ASTHelperGen. DO NOT EDIT.") return &rewriteGen{ - ifaceName: ifaceName, - file: file, - exprInterface: exprInterface, + ifaceName: ifaceName, + file: file, } } @@ -108,7 +105,7 @@ func (r *rewriteGen) structMethod(t types.Type, strct *types.Struct, spi generat } fields := r.rewriteAllStructFields(t, strct, spi, true) - stmts := []jen.Code{r.executePre(t)} + stmts := []jen.Code{r.executePre()} stmts = append(stmts, fields...) stmts = append(stmts, executePost(len(fields) > 0)) stmts = append(stmts, returnTrue()) @@ -133,7 +130,7 @@ func (r *rewriteGen) ptrToStructMethod(t types.Type, strct *types.Struct, spi ge return nil } */ - stmts = append(stmts, r.executePre(t)) + stmts = append(stmts, r.executePre()) fields := r.rewriteAllStructFields(t, strct, spi, false) stmts = append(stmts, fields...) stmts = append(stmts, executePost(len(fields) > 0)) @@ -182,15 +179,12 @@ func (r *rewriteGen) sliceMethod(t types.Type, slice *types.Slice, spi generator jen.If(jen.Id("node == nil").Block(returnTrue())), } - typeString := types.TypeString(t, noQualifier) - preStmts := setupCursor() preStmts = append(preStmts, jen.Id("kontinue").Op(":=").Id("!a.pre(&a.cur)"), jen.If(jen.Id("a.cur.revisit").Block( - jen.Id("node").Op("=").Id("a.cur.node.("+typeString+")"), jen.Id("a.cur.revisit").Op("=").False(), - jen.Return(jen.Id("a.rewrite"+typeString+"(parent, node, replacer)")), + jen.Return(jen.Id("a.rewrite"+r.ifaceName+"(parent, a.cur.node, replacer)")), )), jen.If(jen.Id("kontinue").Block(jen.Return(jen.True()))), ) @@ -228,19 +222,17 @@ func setupCursor() []jen.Code { jen.Id("a.cur.node = node"), } } -func (r *rewriteGen) executePre(t types.Type) jen.Code { + +func (r *rewriteGen) executePre() jen.Code { curStmts := setupCursor() - if r.exprInterface != nil && types.Implements(t, r.exprInterface) { - curStmts = append(curStmts, jen.Id("kontinue").Op(":=").Id("!a.pre(&a.cur)"), - jen.If(jen.Id("a.cur.revisit").Block( - jen.Id("a.cur.revisit").Op("=").False(), - jen.Return(jen.Id("a.rewriteExpr(parent, a.cur.node.(Expr), replacer)")), - )), - jen.If(jen.Id("kontinue").Block(jen.Return(jen.True()))), - ) - } else { - curStmts = append(curStmts, jen.If(jen.Id("!a.pre(&a.cur)")).Block(returnTrue())) - } + name := fmt.Sprintf("a.rewrite%s(parent, a.cur.node, replacer)", r.ifaceName) + curStmts = append(curStmts, jen.Id("kontinue").Op(":=").Id("!a.pre(&a.cur)"), + jen.If(jen.Id("a.cur.revisit").Block( + jen.Id("a.cur.revisit").Op("=").False(), + jen.Return(jen.Id(name)), + )), + jen.If(jen.Id("kontinue").Block(jen.Return(jen.True()))), + ) return jen.If(jen.Id("a.pre!= nil").Block(curStmts...)) } @@ -264,7 +256,7 @@ func (r *rewriteGen) basicMethod(t types.Type, _ *types.Basic, spi generatorSPI) return nil } - stmts := []jen.Code{r.executePre(t), executePost(false), returnTrue()} + stmts := []jen.Code{r.executePre(), executePost(false), returnTrue()} r.rewriteFunc(t, stmts) return nil } diff --git a/go/vt/sqlparser/analyzer_test.go b/go/vt/sqlparser/analyzer_test.go index 0a2de52ef19..e60e10d08ca 100644 --- a/go/vt/sqlparser/analyzer_test.go +++ b/go/vt/sqlparser/analyzer_test.go @@ -195,7 +195,7 @@ func TestAndExpressions(t *testing.T) { } testcases := []struct { name string - expressions Exprs + expressions []Expr expectedOutput Expr }{ { @@ -204,7 +204,7 @@ func TestAndExpressions(t *testing.T) { expectedOutput: nil, }, { name: "two equal inputs", - expressions: Exprs{ + expressions: []Expr{ greaterThanExpr, equalExpr, equalExpr, @@ -216,7 +216,7 @@ func TestAndExpressions(t *testing.T) { }, { name: "two equal inputs", - expressions: Exprs{ + expressions: []Expr{ equalExpr, equalExpr, }, diff --git a/go/vt/sqlparser/ast.go b/go/vt/sqlparser/ast.go index e673b1ebf74..806784c27e8 100644 --- a/go/vt/sqlparser/ast.go +++ b/go/vt/sqlparser/ast.go @@ -75,7 +75,7 @@ type ( ColumnResults interface { GetColumnCount() int - GetColumns() SelectExprs + GetColumns() []SelectExpr } Withable interface { @@ -295,7 +295,7 @@ type ( With *With From []TableExpr Comments *ParsedComments - SelectExprs SelectExprs + SelectExprs *SelectExprs Where *Where GroupBy *GroupBy Having *Where @@ -645,7 +645,7 @@ type ( // CallProc represents a CALL statement CallProc struct { Name TableName - Params Exprs + Params []Expr } // LockType is an enum for Lock Types @@ -2039,8 +2039,9 @@ type ParsedComments struct { _directives *CommentDirectives } -// SelectExprs represents SELECT expressions. -type SelectExprs []SelectExpr +type SelectExprs struct { + Exprs []SelectExpr +} type ( // SelectExpr represents a SELECT expression. @@ -2209,7 +2210,7 @@ type ( // More information available here: https://dev.mysql.com/doc/refman/8.0/en/window-functions-usage.html WindowSpecification struct { Name IdentifierCI - PartitionClause Exprs + PartitionClause []Expr OrderClause OrderBy FrameClause *FrameClause } @@ -2400,7 +2401,7 @@ type ( ListArg string // ValTuple represents a tuple of actual values. - ValTuple Exprs + ValTuple []Expr // BinaryExpr represents a binary value expression. BinaryExpr struct { @@ -2455,7 +2456,7 @@ type ( FuncExpr struct { Qualifier IdentifierCS Name IdentifierCI - Exprs Exprs + Exprs []Expr } // ValuesFuncExpr represents a function call. @@ -2524,7 +2525,7 @@ type ( // IntervalFuncExpr represents an INTERVAL function expression IntervalFuncExpr struct { Expr Expr - Exprs Exprs + Exprs []Expr } // LocateExpr represents a LOCATE function expression @@ -2536,7 +2537,7 @@ type ( // CharExpr represents a CHAR function expression CharExpr struct { - Exprs Exprs + Exprs []Expr Charset string } @@ -2586,7 +2587,7 @@ type ( // JSONArrayExpr represents JSON_ARRAY() // More information on https://dev.mysql.com/doc/refman/8.0/en/json-creation-functions.html#function_json-array JSONArrayExpr struct { - Params Exprs + Params []Expr } // JSONObjectExpr represents JSON_OBJECT() @@ -2776,7 +2777,7 @@ type ( JSONValueMergeExpr struct { Type JSONValueMergeType JSONDoc Expr - JSONDocList Exprs + JSONDocList []Expr } // JSONValueModifierType is an enum to get types of TrimFunc. @@ -2787,7 +2788,7 @@ type ( // For more information, postVisit https://dev.mysql.com/doc/refman/8.0/en/json-modification-functions.html#function_json-remove JSONRemoveExpr struct { JSONDoc Expr - PathList Exprs + PathList []Expr } // JSONRemoveExpr represents the JSON_UNQUOTE() @@ -2804,27 +2805,27 @@ type ( // LineString represents LineString(POINT(x,y), POINT(x,y), ..) expression LineStringExpr struct { - PointParams Exprs + PointParams []Expr } // PolygonExpr represents Polygon(LineString(POINT(x,y), POINT(x,y), ..)) expressions PolygonExpr struct { - LinestringParams Exprs + LinestringParams []Expr } // MultiPoint represents a geometry collection for points MultiPointExpr struct { - PointParams Exprs + PointParams []Expr } // MultiPoint represents a geometry collection for linestrings MultiLinestringExpr struct { - LinestringParams Exprs + LinestringParams []Expr } // MultiPolygon represents a geometry collection for polygons MultiPolygonExpr struct { - PolygonParams Exprs + PolygonParams []Expr } // GeomFromWktType is an enum to get the types of wkt functions with possible values: GeometryFromText GeometryCollectionFromText PointFromText LineStringFromText PolygonFromText MultiPointFromText MultiPolygonFromText MultiLinestringFromText @@ -2935,9 +2936,9 @@ type ( AggrFunc interface { Expr GetArg() Expr - GetArgs() Exprs + GetArgs() []Expr SetArg(expr Expr) - SetArgs(exprs Exprs) error + SetArgs(exprs []Expr) error // AggrName returns the lower case string representing this aggregation function AggrName() string } @@ -2948,7 +2949,7 @@ type ( } Count struct { - Args Exprs + Args []Expr Distinct bool OverClause *OverClause } @@ -3061,7 +3062,7 @@ type ( // GroupConcatExpr represents a call to GROUP_CONCAT GroupConcatExpr struct { Distinct bool - Exprs Exprs + Exprs []Expr OrderBy OrderBy Separator string Limit *Limit @@ -3450,34 +3451,34 @@ func (av *AnyValue) GetArg() Expr { return av.Arg } func (jaa *JSONArrayAgg) GetArg() Expr { return jaa.Expr } func (joa *JSONObjectAgg) GetArg() Expr { return joa.Key } -func (sum *Sum) GetArgs() Exprs { return Exprs{sum.Arg} } -func (min *Min) GetArgs() Exprs { return Exprs{min.Arg} } -func (max *Max) GetArgs() Exprs { return Exprs{max.Arg} } -func (avg *Avg) GetArgs() Exprs { return Exprs{avg.Arg} } -func (*CountStar) GetArgs() Exprs { return nil } -func (count *Count) GetArgs() Exprs { return count.Args } -func (grpConcat *GroupConcatExpr) GetArgs() Exprs { return grpConcat.Exprs } -func (bAnd *BitAnd) GetArgs() Exprs { return Exprs{bAnd.Arg} } -func (bOr *BitOr) GetArgs() Exprs { return Exprs{bOr.Arg} } -func (bXor *BitXor) GetArgs() Exprs { return Exprs{bXor.Arg} } -func (std *Std) GetArgs() Exprs { return Exprs{std.Arg} } -func (stdD *StdDev) GetArgs() Exprs { return Exprs{stdD.Arg} } -func (stdP *StdPop) GetArgs() Exprs { return Exprs{stdP.Arg} } -func (stdS *StdSamp) GetArgs() Exprs { return Exprs{stdS.Arg} } -func (varP *VarPop) GetArgs() Exprs { return Exprs{varP.Arg} } -func (varS *VarSamp) GetArgs() Exprs { return Exprs{varS.Arg} } -func (variance *Variance) GetArgs() Exprs { return Exprs{variance.Arg} } -func (av *AnyValue) GetArgs() Exprs { return Exprs{av.Arg} } -func (jaa *JSONArrayAgg) GetArgs() Exprs { return Exprs{jaa.Expr} } -func (joa *JSONObjectAgg) GetArgs() Exprs { return Exprs{joa.Key, joa.Value} } +func (sum *Sum) GetArgs() []Expr { return []Expr{sum.Arg} } +func (min *Min) GetArgs() []Expr { return []Expr{min.Arg} } +func (max *Max) GetArgs() []Expr { return []Expr{max.Arg} } +func (avg *Avg) GetArgs() []Expr { return []Expr{avg.Arg} } +func (*CountStar) GetArgs() []Expr { return nil } +func (count *Count) GetArgs() []Expr { return count.Args } +func (grpConcat *GroupConcatExpr) GetArgs() []Expr { return grpConcat.Exprs } +func (bAnd *BitAnd) GetArgs() []Expr { return []Expr{bAnd.Arg} } +func (bOr *BitOr) GetArgs() []Expr { return []Expr{bOr.Arg} } +func (bXor *BitXor) GetArgs() []Expr { return []Expr{bXor.Arg} } +func (std *Std) GetArgs() []Expr { return []Expr{std.Arg} } +func (stdD *StdDev) GetArgs() []Expr { return []Expr{stdD.Arg} } +func (stdP *StdPop) GetArgs() []Expr { return []Expr{stdP.Arg} } +func (stdS *StdSamp) GetArgs() []Expr { return []Expr{stdS.Arg} } +func (varP *VarPop) GetArgs() []Expr { return []Expr{varP.Arg} } +func (varS *VarSamp) GetArgs() []Expr { return []Expr{varS.Arg} } +func (variance *Variance) GetArgs() []Expr { return []Expr{variance.Arg} } +func (av *AnyValue) GetArgs() []Expr { return []Expr{av.Arg} } +func (jaa *JSONArrayAgg) GetArgs() []Expr { return []Expr{jaa.Expr} } +func (joa *JSONObjectAgg) GetArgs() []Expr { return []Expr{joa.Key, joa.Value} } func (min *Min) SetArg(expr Expr) { min.Arg = expr } func (sum *Sum) SetArg(expr Expr) { sum.Arg = expr } func (max *Max) SetArg(expr Expr) { max.Arg = expr } func (avg *Avg) SetArg(expr Expr) { avg.Arg = expr } func (*CountStar) SetArg(expr Expr) {} -func (count *Count) SetArg(expr Expr) { count.Args = Exprs{expr} } -func (grpConcat *GroupConcatExpr) SetArg(expr Expr) { grpConcat.Exprs = Exprs{expr} } +func (count *Count) SetArg(expr Expr) { count.Args = []Expr{expr} } +func (grpConcat *GroupConcatExpr) SetArg(expr Expr) { grpConcat.Exprs = []Expr{expr} } func (bAnd *BitAnd) SetArg(expr Expr) { bAnd.Arg = expr } func (bOr *BitOr) SetArg(expr Expr) { bOr.Arg = expr } func (bXor *BitXor) SetArg(expr Expr) { bXor.Arg = expr } @@ -3492,24 +3493,26 @@ func (av *AnyValue) SetArg(expr Expr) { av.Arg = expr } func (jaa *JSONArrayAgg) SetArg(expr Expr) { jaa.Expr = expr } func (joa *JSONObjectAgg) SetArg(expr Expr) { joa.Key = expr } -func (min *Min) SetArgs(exprs Exprs) error { return setFuncArgs(min, exprs, "MIN") } -func (sum *Sum) SetArgs(exprs Exprs) error { return setFuncArgs(sum, exprs, "SUM") } -func (max *Max) SetArgs(exprs Exprs) error { return setFuncArgs(max, exprs, "MAX") } -func (avg *Avg) SetArgs(exprs Exprs) error { return setFuncArgs(avg, exprs, "AVG") } -func (*CountStar) SetArgs(Exprs) error { return nil } -func (bAnd *BitAnd) SetArgs(exprs Exprs) error { return setFuncArgs(bAnd, exprs, "BIT_AND") } -func (bOr *BitOr) SetArgs(exprs Exprs) error { return setFuncArgs(bOr, exprs, "BIT_OR") } -func (bXor *BitXor) SetArgs(exprs Exprs) error { return setFuncArgs(bXor, exprs, "BIT_XOR") } -func (std *Std) SetArgs(exprs Exprs) error { return setFuncArgs(std, exprs, "STD") } -func (stdD *StdDev) SetArgs(exprs Exprs) error { return setFuncArgs(stdD, exprs, "STDDEV") } -func (stdP *StdPop) SetArgs(exprs Exprs) error { return setFuncArgs(stdP, exprs, "STDDEV_POP") } -func (stdS *StdSamp) SetArgs(exprs Exprs) error { return setFuncArgs(stdS, exprs, "STDDEV_SAMP") } -func (varP *VarPop) SetArgs(exprs Exprs) error { return setFuncArgs(varP, exprs, "VAR_POP") } -func (varS *VarSamp) SetArgs(exprs Exprs) error { return setFuncArgs(varS, exprs, "VAR_SAMP") } -func (variance *Variance) SetArgs(exprs Exprs) error { return setFuncArgs(variance, exprs, "VARIANCE") } -func (av *AnyValue) SetArgs(exprs Exprs) error { return setFuncArgs(av, exprs, "ANY_VALUE") } -func (jaa *JSONArrayAgg) SetArgs(exprs Exprs) error { return setFuncArgs(jaa, exprs, "JSON_ARRAYARG") } -func (joa *JSONObjectAgg) SetArgs(exprs Exprs) error { +func (min *Min) SetArgs(exprs []Expr) error { return setFuncArgs(min, exprs, "MIN") } +func (sum *Sum) SetArgs(exprs []Expr) error { return setFuncArgs(sum, exprs, "SUM") } +func (max *Max) SetArgs(exprs []Expr) error { return setFuncArgs(max, exprs, "MAX") } +func (avg *Avg) SetArgs(exprs []Expr) error { return setFuncArgs(avg, exprs, "AVG") } +func (*CountStar) SetArgs([]Expr) error { return nil } +func (bAnd *BitAnd) SetArgs(exprs []Expr) error { return setFuncArgs(bAnd, exprs, "BIT_AND") } +func (bOr *BitOr) SetArgs(exprs []Expr) error { return setFuncArgs(bOr, exprs, "BIT_OR") } +func (bXor *BitXor) SetArgs(exprs []Expr) error { return setFuncArgs(bXor, exprs, "BIT_XOR") } +func (std *Std) SetArgs(exprs []Expr) error { return setFuncArgs(std, exprs, "STD") } +func (stdD *StdDev) SetArgs(exprs []Expr) error { return setFuncArgs(stdD, exprs, "STDDEV") } +func (stdP *StdPop) SetArgs(exprs []Expr) error { return setFuncArgs(stdP, exprs, "STDDEV_POP") } +func (stdS *StdSamp) SetArgs(exprs []Expr) error { return setFuncArgs(stdS, exprs, "STDDEV_SAMP") } +func (varP *VarPop) SetArgs(exprs []Expr) error { return setFuncArgs(varP, exprs, "VAR_POP") } +func (varS *VarSamp) SetArgs(exprs []Expr) error { return setFuncArgs(varS, exprs, "VAR_SAMP") } +func (variance *Variance) SetArgs(exprs []Expr) error { + return setFuncArgs(variance, exprs, "VARIANCE") +} +func (av *AnyValue) SetArgs(exprs []Expr) error { return setFuncArgs(av, exprs, "ANY_VALUE") } +func (jaa *JSONArrayAgg) SetArgs(exprs []Expr) error { return setFuncArgs(jaa, exprs, "JSON_ARRAYARG") } +func (joa *JSONObjectAgg) SetArgs(exprs []Expr) error { if len(exprs) != 2 { return vterrors.VT13001("JSONObjectAgg takes in 2 expressions") } @@ -3518,11 +3521,11 @@ func (joa *JSONObjectAgg) SetArgs(exprs Exprs) error { return nil } -func (count *Count) SetArgs(exprs Exprs) error { +func (count *Count) SetArgs(exprs []Expr) error { count.Args = exprs return nil } -func (grpConcat *GroupConcatExpr) SetArgs(exprs Exprs) error { +func (grpConcat *GroupConcatExpr) SetArgs(exprs []Expr) error { grpConcat.Exprs = exprs return nil } @@ -3564,7 +3567,9 @@ func (*JSONObjectAgg) AggrName() string { return "json_objectagg" } // Exprs represents a list of value expressions. // It's not a valid expression because it's not parenthesized. -type Exprs []Expr +type Exprs struct { + Exprs []Expr +} func (ValTuple) iColTuple() {} func (*Subquery) iColTuple() {} diff --git a/go/vt/sqlparser/ast_clone.go b/go/vt/sqlparser/ast_clone.go index 3c7f4fe5e6a..997485e086c 100644 --- a/go/vt/sqlparser/ast_clone.go +++ b/go/vt/sqlparser/ast_clone.go @@ -161,8 +161,8 @@ func CloneSQLNode(in SQLNode) SQLNode { return CloneRefOfExplainStmt(in) case *ExplainTab: return CloneRefOfExplainTab(in) - case Exprs: - return CloneExprs(in) + case *Exprs: + return CloneRefOfExprs(in) case *ExtractFuncExpr: return CloneRefOfExtractFuncExpr(in) case *ExtractValueExpr: @@ -435,8 +435,8 @@ func CloneSQLNode(in SQLNode) SQLNode { return CloneRefOfSavepoint(in) case *Select: return CloneRefOfSelect(in) - case SelectExprs: - return CloneSelectExprs(in) + case *SelectExprs: + return CloneRefOfSelectExprs(in) case *SelectInto: return CloneRefOfSelectInto(in) case *Set: @@ -887,7 +887,7 @@ func CloneRefOfCallProc(n *CallProc) *CallProc { } out := *n out.Name = CloneTableName(n.Name) - out.Params = CloneExprs(n.Params) + out.Params = CloneSliceOfExpr(n.Params) return &out } @@ -932,7 +932,7 @@ func CloneRefOfCharExpr(n *CharExpr) *CharExpr { return nil } out := *n - out.Exprs = CloneExprs(n.Exprs) + out.Exprs = CloneSliceOfExpr(n.Exprs) return &out } @@ -1091,7 +1091,7 @@ func CloneRefOfCount(n *Count) *Count { return nil } out := *n - out.Args = CloneExprs(n.Args) + out.Args = CloneSliceOfExpr(n.Args) out.OverClause = CloneRefOfOverClause(n.OverClause) return &out } @@ -1307,16 +1307,14 @@ func CloneRefOfExplainTab(n *ExplainTab) *ExplainTab { return &out } -// CloneExprs creates a deep clone of the input. -func CloneExprs(n Exprs) Exprs { +// CloneRefOfExprs creates a deep clone of the input. +func CloneRefOfExprs(n *Exprs) *Exprs { if n == nil { return nil } - res := make(Exprs, len(n)) - for i, x := range n { - res[i] = CloneExpr(x) - } - return res + out := *n + out.Exprs = CloneSliceOfExpr(n.Exprs) + return &out } // CloneRefOfExtractFuncExpr creates a deep clone of the input. @@ -1422,7 +1420,7 @@ func CloneRefOfFuncExpr(n *FuncExpr) *FuncExpr { out := *n out.Qualifier = CloneIdentifierCS(n.Qualifier) out.Name = CloneIdentifierCI(n.Name) - out.Exprs = CloneExprs(n.Exprs) + out.Exprs = CloneSliceOfExpr(n.Exprs) return &out } @@ -1569,7 +1567,7 @@ func CloneRefOfGroupConcatExpr(n *GroupConcatExpr) *GroupConcatExpr { return nil } out := *n - out.Exprs = CloneExprs(n.Exprs) + out.Exprs = CloneSliceOfExpr(n.Exprs) out.OrderBy = CloneOrderBy(n.OrderBy) out.Limit = CloneRefOfLimit(n.Limit) return &out @@ -1677,7 +1675,7 @@ func CloneRefOfIntervalFuncExpr(n *IntervalFuncExpr) *IntervalFuncExpr { } out := *n out.Expr = CloneExpr(n.Expr) - out.Exprs = CloneExprs(n.Exprs) + out.Exprs = CloneSliceOfExpr(n.Exprs) return &out } @@ -1718,7 +1716,7 @@ func CloneRefOfJSONArrayExpr(n *JSONArrayExpr) *JSONArrayExpr { return nil } out := *n - out.Params = CloneExprs(n.Params) + out.Params = CloneSliceOfExpr(n.Params) return &out } @@ -1850,7 +1848,7 @@ func CloneRefOfJSONRemoveExpr(n *JSONRemoveExpr) *JSONRemoveExpr { } out := *n out.JSONDoc = CloneExpr(n.JSONDoc) - out.PathList = CloneExprs(n.PathList) + out.PathList = CloneSliceOfExpr(n.PathList) return &out } @@ -1954,7 +1952,7 @@ func CloneRefOfJSONValueMergeExpr(n *JSONValueMergeExpr) *JSONValueMergeExpr { } out := *n out.JSONDoc = CloneExpr(n.JSONDoc) - out.JSONDocList = CloneExprs(n.JSONDocList) + out.JSONDocList = CloneSliceOfExpr(n.JSONDocList) return &out } @@ -2063,7 +2061,7 @@ func CloneRefOfLineStringExpr(n *LineStringExpr) *LineStringExpr { return nil } out := *n - out.PointParams = CloneExprs(n.PointParams) + out.PointParams = CloneSliceOfExpr(n.PointParams) return &out } @@ -2199,7 +2197,7 @@ func CloneRefOfMultiLinestringExpr(n *MultiLinestringExpr) *MultiLinestringExpr return nil } out := *n - out.LinestringParams = CloneExprs(n.LinestringParams) + out.LinestringParams = CloneSliceOfExpr(n.LinestringParams) return &out } @@ -2209,7 +2207,7 @@ func CloneRefOfMultiPointExpr(n *MultiPointExpr) *MultiPointExpr { return nil } out := *n - out.PointParams = CloneExprs(n.PointParams) + out.PointParams = CloneSliceOfExpr(n.PointParams) return &out } @@ -2219,7 +2217,7 @@ func CloneRefOfMultiPolygonExpr(n *MultiPolygonExpr) *MultiPolygonExpr { return nil } out := *n - out.PolygonParams = CloneExprs(n.PolygonParams) + out.PolygonParams = CloneSliceOfExpr(n.PolygonParams) return &out } @@ -2546,7 +2544,7 @@ func CloneRefOfPolygonExpr(n *PolygonExpr) *PolygonExpr { return nil } out := *n - out.LinestringParams = CloneExprs(n.LinestringParams) + out.LinestringParams = CloneSliceOfExpr(n.LinestringParams) return &out } @@ -2766,7 +2764,7 @@ func CloneRefOfSelect(n *Select) *Select { out.With = CloneRefOfWith(n.With) out.From = CloneSliceOfTableExpr(n.From) out.Comments = CloneRefOfParsedComments(n.Comments) - out.SelectExprs = CloneSelectExprs(n.SelectExprs) + out.SelectExprs = CloneRefOfSelectExprs(n.SelectExprs) out.Where = CloneRefOfWhere(n.Where) out.GroupBy = CloneRefOfGroupBy(n.GroupBy) out.Having = CloneRefOfWhere(n.Having) @@ -2777,16 +2775,14 @@ func CloneRefOfSelect(n *Select) *Select { return &out } -// CloneSelectExprs creates a deep clone of the input. -func CloneSelectExprs(n SelectExprs) SelectExprs { +// CloneRefOfSelectExprs creates a deep clone of the input. +func CloneRefOfSelectExprs(n *SelectExprs) *SelectExprs { if n == nil { return nil } - res := make(SelectExprs, len(n)) - for i, x := range n { - res[i] = CloneSelectExpr(x) - } - return res + out := *n + out.Exprs = CloneSliceOfSelectExpr(n.Exprs) + return &out } // CloneRefOfSelectInto creates a deep clone of the input. @@ -3466,7 +3462,7 @@ func CloneRefOfWindowSpecification(n *WindowSpecification) *WindowSpecification } out := *n out.Name = CloneIdentifierCI(n.Name) - out.PartitionClause = CloneExprs(n.PartitionClause) + out.PartitionClause = CloneSliceOfExpr(n.PartitionClause) out.OrderClause = CloneOrderBy(n.OrderClause) out.FrameClause = CloneRefOfFrameClause(n.FrameClause) return &out @@ -4418,6 +4414,18 @@ func CloneSliceOfTxAccessMode(n []TxAccessMode) []TxAccessMode { return res } +// CloneSliceOfExpr creates a deep clone of the input. +func CloneSliceOfExpr(n []Expr) []Expr { + if n == nil { + return nil + } + res := make([]Expr, len(n)) + for i, x := range n { + res[i] = CloneExpr(x) + } + return res +} + // CloneSliceOfRefOfWhen creates a deep clone of the input. func CloneSliceOfRefOfWhen(n []*When) []*When { if n == nil { @@ -4497,18 +4505,6 @@ func CloneSliceOfRefOfVariable(n []*Variable) []*Variable { return res } -// CloneSliceOfExpr creates a deep clone of the input. -func CloneSliceOfExpr(n []Expr) []Expr { - if n == nil { - return nil - } - res := make([]Expr, len(n)) - for i, x := range n { - res[i] = CloneExpr(x) - } - return res -} - // CloneRefOfIdentifierCI creates a deep clone of the input. func CloneRefOfIdentifierCI(n *IdentifierCI) *IdentifierCI { if n == nil { @@ -4680,6 +4676,18 @@ func CloneRefOfRootNode(n *RootNode) *RootNode { return &out } +// CloneSliceOfSelectExpr creates a deep clone of the input. +func CloneSliceOfSelectExpr(n []SelectExpr) []SelectExpr { + if n == nil { + return nil + } + res := make([]SelectExpr, len(n)) + for i, x := range n { + res[i] = CloneSelectExpr(x) + } + return res +} + // CloneRefOfTableName creates a deep clone of the input. func CloneRefOfTableName(n *TableName) *TableName { if n == nil { diff --git a/go/vt/sqlparser/ast_copy_on_rewrite.go b/go/vt/sqlparser/ast_copy_on_rewrite.go index f725dfc6803..46ce38ee29d 100644 --- a/go/vt/sqlparser/ast_copy_on_rewrite.go +++ b/go/vt/sqlparser/ast_copy_on_rewrite.go @@ -160,8 +160,8 @@ func (c *cow) copyOnRewriteSQLNode(n SQLNode, parent SQLNode) (out SQLNode, chan return c.copyOnRewriteRefOfExplainStmt(n, parent) case *ExplainTab: return c.copyOnRewriteRefOfExplainTab(n, parent) - case Exprs: - return c.copyOnRewriteExprs(n, parent) + case *Exprs: + return c.copyOnRewriteRefOfExprs(n, parent) case *ExtractFuncExpr: return c.copyOnRewriteRefOfExtractFuncExpr(n, parent) case *ExtractValueExpr: @@ -434,8 +434,8 @@ func (c *cow) copyOnRewriteSQLNode(n SQLNode, parent SQLNode) (out SQLNode, chan return c.copyOnRewriteRefOfSavepoint(n, parent) case *Select: return c.copyOnRewriteRefOfSelect(n, parent) - case SelectExprs: - return c.copyOnRewriteSelectExprs(n, parent) + case *SelectExprs: + return c.copyOnRewriteRefOfSelectExprs(n, parent) case *SelectInto: return c.copyOnRewriteRefOfSelectInto(n, parent) case *Set: @@ -1244,11 +1244,19 @@ func (c *cow) copyOnRewriteRefOfCallProc(n *CallProc, parent SQLNode) (out SQLNo out = n if c.pre == nil || c.pre(n, parent) { _Name, changedName := c.copyOnRewriteTableName(n.Name, n) - _Params, changedParams := c.copyOnRewriteExprs(n.Params, n) + var changedParams bool + _Params := make([]Expr, len(n.Params)) + for x, el := range n.Params { + this, changed := c.copyOnRewriteExpr(el, n) + _Params[x] = this.(Expr) + if changed { + changedParams = true + } + } if changedName || changedParams { res := *n res.Name, _ = _Name.(TableName) - res.Params, _ = _Params.(Exprs) + res.Params = _Params out = &res if c.cloned != nil { c.cloned(n, out) @@ -1351,10 +1359,18 @@ func (c *cow) copyOnRewriteRefOfCharExpr(n *CharExpr, parent SQLNode) (out SQLNo } out = n if c.pre == nil || c.pre(n, parent) { - _Exprs, changedExprs := c.copyOnRewriteExprs(n.Exprs, n) + var changedExprs bool + _Exprs := make([]Expr, len(n.Exprs)) + for x, el := range n.Exprs { + this, changed := c.copyOnRewriteExpr(el, n) + _Exprs[x] = this.(Expr) + if changed { + changedExprs = true + } + } if changedExprs { res := *n - res.Exprs, _ = _Exprs.(Exprs) + res.Exprs = _Exprs out = &res if c.cloned != nil { c.cloned(n, out) @@ -1658,11 +1674,19 @@ func (c *cow) copyOnRewriteRefOfCount(n *Count, parent SQLNode) (out SQLNode, ch } out = n if c.pre == nil || c.pre(n, parent) { - _Args, changedArgs := c.copyOnRewriteExprs(n.Args, n) + var changedArgs bool + _Args := make([]Expr, len(n.Args)) + for x, el := range n.Args { + this, changed := c.copyOnRewriteExpr(el, n) + _Args[x] = this.(Expr) + if changed { + changedArgs = true + } + } _OverClause, changedOverClause := c.copyOnRewriteRefOfOverClause(n.OverClause, n) if changedArgs || changedOverClause { res := *n - res.Args, _ = _Args.(Exprs) + res.Args = _Args res.OverClause, _ = _OverClause.(*OverClause) out = &res if c.cloned != nil { @@ -2134,22 +2158,29 @@ func (c *cow) copyOnRewriteRefOfExplainTab(n *ExplainTab, parent SQLNode) (out S } return } -func (c *cow) copyOnRewriteExprs(n Exprs, parent SQLNode) (out SQLNode, changed bool) { +func (c *cow) copyOnRewriteRefOfExprs(n *Exprs, parent SQLNode) (out SQLNode, changed bool) { if n == nil || c.cursor.stop { return n, false } out = n if c.pre == nil || c.pre(n, parent) { - res := make(Exprs, len(n)) - for x, el := range n { - this, change := c.copyOnRewriteExpr(el, n) - res[x] = this.(Expr) - if change { - changed = true + var changedExprs bool + _Exprs := make([]Expr, len(n.Exprs)) + for x, el := range n.Exprs { + this, changed := c.copyOnRewriteExpr(el, n) + _Exprs[x] = this.(Expr) + if changed { + changedExprs = true } } - if changed { - out = res + if changedExprs { + res := *n + res.Exprs = _Exprs + out = &res + if c.cloned != nil { + c.cloned(n, out) + } + changed = true } } if c.post != nil { @@ -2355,12 +2386,20 @@ func (c *cow) copyOnRewriteRefOfFuncExpr(n *FuncExpr, parent SQLNode) (out SQLNo if c.pre == nil || c.pre(n, parent) { _Qualifier, changedQualifier := c.copyOnRewriteIdentifierCS(n.Qualifier, n) _Name, changedName := c.copyOnRewriteIdentifierCI(n.Name, n) - _Exprs, changedExprs := c.copyOnRewriteExprs(n.Exprs, n) + var changedExprs bool + _Exprs := make([]Expr, len(n.Exprs)) + for x, el := range n.Exprs { + this, changed := c.copyOnRewriteExpr(el, n) + _Exprs[x] = this.(Expr) + if changed { + changedExprs = true + } + } if changedQualifier || changedName || changedExprs { res := *n res.Qualifier, _ = _Qualifier.(IdentifierCS) res.Name, _ = _Name.(IdentifierCI) - res.Exprs, _ = _Exprs.(Exprs) + res.Exprs = _Exprs out = &res if c.cloned != nil { c.cloned(n, out) @@ -2685,12 +2724,20 @@ func (c *cow) copyOnRewriteRefOfGroupConcatExpr(n *GroupConcatExpr, parent SQLNo } out = n if c.pre == nil || c.pre(n, parent) { - _Exprs, changedExprs := c.copyOnRewriteExprs(n.Exprs, n) + var changedExprs bool + _Exprs := make([]Expr, len(n.Exprs)) + for x, el := range n.Exprs { + this, changed := c.copyOnRewriteExpr(el, n) + _Exprs[x] = this.(Expr) + if changed { + changedExprs = true + } + } _OrderBy, changedOrderBy := c.copyOnRewriteOrderBy(n.OrderBy, n) _Limit, changedLimit := c.copyOnRewriteRefOfLimit(n.Limit, n) if changedExprs || changedOrderBy || changedLimit { res := *n - res.Exprs, _ = _Exprs.(Exprs) + res.Exprs = _Exprs res.OrderBy, _ = _OrderBy.(OrderBy) res.Limit, _ = _Limit.(*Limit) out = &res @@ -2915,11 +2962,19 @@ func (c *cow) copyOnRewriteRefOfIntervalFuncExpr(n *IntervalFuncExpr, parent SQL out = n if c.pre == nil || c.pre(n, parent) { _Expr, changedExpr := c.copyOnRewriteExpr(n.Expr, n) - _Exprs, changedExprs := c.copyOnRewriteExprs(n.Exprs, n) + var changedExprs bool + _Exprs := make([]Expr, len(n.Exprs)) + for x, el := range n.Exprs { + this, changed := c.copyOnRewriteExpr(el, n) + _Exprs[x] = this.(Expr) + if changed { + changedExprs = true + } + } if changedExpr || changedExprs { res := *n res.Expr, _ = _Expr.(Expr) - res.Exprs, _ = _Exprs.(Exprs) + res.Exprs = _Exprs out = &res if c.cloned != nil { c.cloned(n, out) @@ -3006,10 +3061,18 @@ func (c *cow) copyOnRewriteRefOfJSONArrayExpr(n *JSONArrayExpr, parent SQLNode) } out = n if c.pre == nil || c.pre(n, parent) { - _Params, changedParams := c.copyOnRewriteExprs(n.Params, n) + var changedParams bool + _Params := make([]Expr, len(n.Params)) + for x, el := range n.Params { + this, changed := c.copyOnRewriteExpr(el, n) + _Params[x] = this.(Expr) + if changed { + changedParams = true + } + } if changedParams { res := *n - res.Params, _ = _Params.(Exprs) + res.Params = _Params out = &res if c.cloned != nil { c.cloned(n, out) @@ -3325,11 +3388,19 @@ func (c *cow) copyOnRewriteRefOfJSONRemoveExpr(n *JSONRemoveExpr, parent SQLNode out = n if c.pre == nil || c.pre(n, parent) { _JSONDoc, changedJSONDoc := c.copyOnRewriteExpr(n.JSONDoc, n) - _PathList, changedPathList := c.copyOnRewriteExprs(n.PathList, n) + var changedPathList bool + _PathList := make([]Expr, len(n.PathList)) + for x, el := range n.PathList { + this, changed := c.copyOnRewriteExpr(el, n) + _PathList[x] = this.(Expr) + if changed { + changedPathList = true + } + } if changedJSONDoc || changedPathList { res := *n res.JSONDoc, _ = _JSONDoc.(Expr) - res.PathList, _ = _PathList.(Exprs) + res.PathList = _PathList out = &res if c.cloned != nil { c.cloned(n, out) @@ -3567,11 +3638,19 @@ func (c *cow) copyOnRewriteRefOfJSONValueMergeExpr(n *JSONValueMergeExpr, parent out = n if c.pre == nil || c.pre(n, parent) { _JSONDoc, changedJSONDoc := c.copyOnRewriteExpr(n.JSONDoc, n) - _JSONDocList, changedJSONDocList := c.copyOnRewriteExprs(n.JSONDocList, n) + var changedJSONDocList bool + _JSONDocList := make([]Expr, len(n.JSONDocList)) + for x, el := range n.JSONDocList { + this, changed := c.copyOnRewriteExpr(el, n) + _JSONDocList[x] = this.(Expr) + if changed { + changedJSONDocList = true + } + } if changedJSONDoc || changedJSONDocList { res := *n res.JSONDoc, _ = _JSONDoc.(Expr) - res.JSONDocList, _ = _JSONDocList.(Exprs) + res.JSONDocList = _JSONDocList out = &res if c.cloned != nil { c.cloned(n, out) @@ -3784,10 +3863,18 @@ func (c *cow) copyOnRewriteRefOfLineStringExpr(n *LineStringExpr, parent SQLNode } out = n if c.pre == nil || c.pre(n, parent) { - _PointParams, changedPointParams := c.copyOnRewriteExprs(n.PointParams, n) + var changedPointParams bool + _PointParams := make([]Expr, len(n.PointParams)) + for x, el := range n.PointParams { + this, changed := c.copyOnRewriteExpr(el, n) + _PointParams[x] = this.(Expr) + if changed { + changedPointParams = true + } + } if changedPointParams { res := *n - res.PointParams, _ = _PointParams.(Exprs) + res.PointParams = _PointParams out = &res if c.cloned != nil { c.cloned(n, out) @@ -4056,10 +4143,18 @@ func (c *cow) copyOnRewriteRefOfMultiLinestringExpr(n *MultiLinestringExpr, pare } out = n if c.pre == nil || c.pre(n, parent) { - _LinestringParams, changedLinestringParams := c.copyOnRewriteExprs(n.LinestringParams, n) + var changedLinestringParams bool + _LinestringParams := make([]Expr, len(n.LinestringParams)) + for x, el := range n.LinestringParams { + this, changed := c.copyOnRewriteExpr(el, n) + _LinestringParams[x] = this.(Expr) + if changed { + changedLinestringParams = true + } + } if changedLinestringParams { res := *n - res.LinestringParams, _ = _LinestringParams.(Exprs) + res.LinestringParams = _LinestringParams out = &res if c.cloned != nil { c.cloned(n, out) @@ -4078,10 +4173,18 @@ func (c *cow) copyOnRewriteRefOfMultiPointExpr(n *MultiPointExpr, parent SQLNode } out = n if c.pre == nil || c.pre(n, parent) { - _PointParams, changedPointParams := c.copyOnRewriteExprs(n.PointParams, n) + var changedPointParams bool + _PointParams := make([]Expr, len(n.PointParams)) + for x, el := range n.PointParams { + this, changed := c.copyOnRewriteExpr(el, n) + _PointParams[x] = this.(Expr) + if changed { + changedPointParams = true + } + } if changedPointParams { res := *n - res.PointParams, _ = _PointParams.(Exprs) + res.PointParams = _PointParams out = &res if c.cloned != nil { c.cloned(n, out) @@ -4100,10 +4203,18 @@ func (c *cow) copyOnRewriteRefOfMultiPolygonExpr(n *MultiPolygonExpr, parent SQL } out = n if c.pre == nil || c.pre(n, parent) { - _PolygonParams, changedPolygonParams := c.copyOnRewriteExprs(n.PolygonParams, n) + var changedPolygonParams bool + _PolygonParams := make([]Expr, len(n.PolygonParams)) + for x, el := range n.PolygonParams { + this, changed := c.copyOnRewriteExpr(el, n) + _PolygonParams[x] = this.(Expr) + if changed { + changedPolygonParams = true + } + } if changedPolygonParams { res := *n - res.PolygonParams, _ = _PolygonParams.(Exprs) + res.PolygonParams = _PolygonParams out = &res if c.cloned != nil { c.cloned(n, out) @@ -4772,10 +4883,18 @@ func (c *cow) copyOnRewriteRefOfPolygonExpr(n *PolygonExpr, parent SQLNode) (out } out = n if c.pre == nil || c.pre(n, parent) { - _LinestringParams, changedLinestringParams := c.copyOnRewriteExprs(n.LinestringParams, n) + var changedLinestringParams bool + _LinestringParams := make([]Expr, len(n.LinestringParams)) + for x, el := range n.LinestringParams { + this, changed := c.copyOnRewriteExpr(el, n) + _LinestringParams[x] = this.(Expr) + if changed { + changedLinestringParams = true + } + } if changedLinestringParams { res := *n - res.LinestringParams, _ = _LinestringParams.(Exprs) + res.LinestringParams = _LinestringParams out = &res if c.cloned != nil { c.cloned(n, out) @@ -5242,7 +5361,7 @@ func (c *cow) copyOnRewriteRefOfSelect(n *Select, parent SQLNode) (out SQLNode, } } _Comments, changedComments := c.copyOnRewriteRefOfParsedComments(n.Comments, n) - _SelectExprs, changedSelectExprs := c.copyOnRewriteSelectExprs(n.SelectExprs, n) + _SelectExprs, changedSelectExprs := c.copyOnRewriteRefOfSelectExprs(n.SelectExprs, n) _Where, changedWhere := c.copyOnRewriteRefOfWhere(n.Where, n) _GroupBy, changedGroupBy := c.copyOnRewriteRefOfGroupBy(n.GroupBy, n) _Having, changedHaving := c.copyOnRewriteRefOfWhere(n.Having, n) @@ -5255,7 +5374,7 @@ func (c *cow) copyOnRewriteRefOfSelect(n *Select, parent SQLNode) (out SQLNode, res.With, _ = _With.(*With) res.From = _From res.Comments, _ = _Comments.(*ParsedComments) - res.SelectExprs, _ = _SelectExprs.(SelectExprs) + res.SelectExprs, _ = _SelectExprs.(*SelectExprs) res.Where, _ = _Where.(*Where) res.GroupBy, _ = _GroupBy.(*GroupBy) res.Having, _ = _Having.(*Where) @@ -5275,22 +5394,29 @@ func (c *cow) copyOnRewriteRefOfSelect(n *Select, parent SQLNode) (out SQLNode, } return } -func (c *cow) copyOnRewriteSelectExprs(n SelectExprs, parent SQLNode) (out SQLNode, changed bool) { +func (c *cow) copyOnRewriteRefOfSelectExprs(n *SelectExprs, parent SQLNode) (out SQLNode, changed bool) { if n == nil || c.cursor.stop { return n, false } out = n if c.pre == nil || c.pre(n, parent) { - res := make(SelectExprs, len(n)) - for x, el := range n { - this, change := c.copyOnRewriteSelectExpr(el, n) - res[x] = this.(SelectExpr) - if change { - changed = true + var changedExprs bool + _Exprs := make([]SelectExpr, len(n.Exprs)) + for x, el := range n.Exprs { + this, changed := c.copyOnRewriteSelectExpr(el, n) + _Exprs[x] = this.(SelectExpr) + if changed { + changedExprs = true } } - if changed { - out = res + if changedExprs { + res := *n + res.Exprs = _Exprs + out = &res + if c.cloned != nil { + c.cloned(n, out) + } + changed = true } } if c.post != nil { @@ -6714,13 +6840,21 @@ func (c *cow) copyOnRewriteRefOfWindowSpecification(n *WindowSpecification, pare out = n if c.pre == nil || c.pre(n, parent) { _Name, changedName := c.copyOnRewriteIdentifierCI(n.Name, n) - _PartitionClause, changedPartitionClause := c.copyOnRewriteExprs(n.PartitionClause, n) + var changedPartitionClause bool + _PartitionClause := make([]Expr, len(n.PartitionClause)) + for x, el := range n.PartitionClause { + this, changed := c.copyOnRewriteExpr(el, n) + _PartitionClause[x] = this.(Expr) + if changed { + changedPartitionClause = true + } + } _OrderClause, changedOrderClause := c.copyOnRewriteOrderBy(n.OrderClause, n) _FrameClause, changedFrameClause := c.copyOnRewriteRefOfFrameClause(n.FrameClause, n) if changedName || changedPartitionClause || changedOrderClause || changedFrameClause { res := *n res.Name, _ = _Name.(IdentifierCI) - res.PartitionClause, _ = _PartitionClause.(Exprs) + res.PartitionClause = _PartitionClause res.OrderClause, _ = _OrderClause.(OrderBy) res.FrameClause, _ = _FrameClause.(*FrameClause) out = &res diff --git a/go/vt/sqlparser/ast_equals.go b/go/vt/sqlparser/ast_equals.go index 93f10376177..2795daab2c5 100644 --- a/go/vt/sqlparser/ast_equals.go +++ b/go/vt/sqlparser/ast_equals.go @@ -440,12 +440,12 @@ func (cmp *Comparator) SQLNode(inA, inB SQLNode) bool { return false } return cmp.RefOfExplainTab(a, b) - case Exprs: - b, ok := inB.(Exprs) + case *Exprs: + b, ok := inB.(*Exprs) if !ok { return false } - return cmp.Exprs(a, b) + return cmp.RefOfExprs(a, b) case *ExtractFuncExpr: b, ok := inB.(*ExtractFuncExpr) if !ok { @@ -1262,12 +1262,12 @@ func (cmp *Comparator) SQLNode(inA, inB SQLNode) bool { return false } return cmp.RefOfSelect(a, b) - case SelectExprs: - b, ok := inB.(SelectExprs) + case *SelectExprs: + b, ok := inB.(*SelectExprs) if !ok { return false } - return cmp.SelectExprs(a, b) + return cmp.RefOfSelectExprs(a, b) case *SelectInto: b, ok := inB.(*SelectInto) if !ok { @@ -2032,7 +2032,7 @@ func (cmp *Comparator) RefOfCallProc(a, b *CallProc) bool { return false } return cmp.TableName(a.Name, b.Name) && - cmp.Exprs(a.Params, b.Params) + cmp.SliceOfExpr(a.Params, b.Params) } // RefOfCaseExpr does deep equals between the two objects. @@ -2084,7 +2084,7 @@ func (cmp *Comparator) RefOfCharExpr(a, b *CharExpr) bool { return false } return a.Charset == b.Charset && - cmp.Exprs(a.Exprs, b.Exprs) + cmp.SliceOfExpr(a.Exprs, b.Exprs) } // RefOfCheckConstraintDefinition does deep equals between the two objects. @@ -2278,7 +2278,7 @@ func (cmp *Comparator) RefOfCount(a, b *Count) bool { return false } return a.Distinct == b.Distinct && - cmp.Exprs(a.Args, b.Args) && + cmp.SliceOfExpr(a.Args, b.Args) && cmp.RefOfOverClause(a.OverClause, b.OverClause) } @@ -2534,17 +2534,15 @@ func (cmp *Comparator) RefOfExplainTab(a, b *ExplainTab) bool { cmp.TableName(a.Table, b.Table) } -// Exprs does deep equals between the two objects. -func (cmp *Comparator) Exprs(a, b Exprs) bool { - if len(a) != len(b) { - return false +// RefOfExprs does deep equals between the two objects. +func (cmp *Comparator) RefOfExprs(a, b *Exprs) bool { + if a == b { + return true } - for i := 0; i < len(a); i++ { - if !cmp.Expr(a[i], b[i]) { - return false - } + if a == nil || b == nil { + return false } - return true + return cmp.SliceOfExpr(a.Exprs, b.Exprs) } // RefOfExtractFuncExpr does deep equals between the two objects. @@ -2671,7 +2669,7 @@ func (cmp *Comparator) RefOfFuncExpr(a, b *FuncExpr) bool { } return cmp.IdentifierCS(a.Qualifier, b.Qualifier) && cmp.IdentifierCI(a.Name, b.Name) && - cmp.Exprs(a.Exprs, b.Exprs) + cmp.SliceOfExpr(a.Exprs, b.Exprs) } // RefOfGTIDFuncExpr does deep equals between the two objects. @@ -2841,7 +2839,7 @@ func (cmp *Comparator) RefOfGroupConcatExpr(a, b *GroupConcatExpr) bool { } return a.Distinct == b.Distinct && a.Separator == b.Separator && - cmp.Exprs(a.Exprs, b.Exprs) && + cmp.SliceOfExpr(a.Exprs, b.Exprs) && cmp.OrderBy(a.OrderBy, b.OrderBy) && cmp.RefOfLimit(a.Limit, b.Limit) } @@ -2965,7 +2963,7 @@ func (cmp *Comparator) RefOfIntervalFuncExpr(a, b *IntervalFuncExpr) bool { return false } return cmp.Expr(a.Expr, b.Expr) && - cmp.Exprs(a.Exprs, b.Exprs) + cmp.SliceOfExpr(a.Exprs, b.Exprs) } // RefOfIntroducerExpr does deep equals between the two objects. @@ -3012,7 +3010,7 @@ func (cmp *Comparator) RefOfJSONArrayExpr(a, b *JSONArrayExpr) bool { if a == nil || b == nil { return false } - return cmp.Exprs(a.Params, b.Params) + return cmp.SliceOfExpr(a.Params, b.Params) } // RefOfJSONAttributesExpr does deep equals between the two objects. @@ -3157,7 +3155,7 @@ func (cmp *Comparator) RefOfJSONRemoveExpr(a, b *JSONRemoveExpr) bool { return false } return cmp.Expr(a.JSONDoc, b.JSONDoc) && - cmp.Exprs(a.PathList, b.PathList) + cmp.SliceOfExpr(a.PathList, b.PathList) } // RefOfJSONSchemaValidFuncExpr does deep equals between the two objects. @@ -3271,7 +3269,7 @@ func (cmp *Comparator) RefOfJSONValueMergeExpr(a, b *JSONValueMergeExpr) bool { } return a.Type == b.Type && cmp.Expr(a.JSONDoc, b.JSONDoc) && - cmp.Exprs(a.JSONDocList, b.JSONDocList) + cmp.SliceOfExpr(a.JSONDocList, b.JSONDocList) } // RefOfJSONValueModifierExpr does deep equals between the two objects. @@ -3397,7 +3395,7 @@ func (cmp *Comparator) RefOfLineStringExpr(a, b *LineStringExpr) bool { if a == nil || b == nil { return false } - return cmp.Exprs(a.PointParams, b.PointParams) + return cmp.SliceOfExpr(a.PointParams, b.PointParams) } // RefOfLinestrPropertyFuncExpr does deep equals between the two objects. @@ -3556,7 +3554,7 @@ func (cmp *Comparator) RefOfMultiLinestringExpr(a, b *MultiLinestringExpr) bool if a == nil || b == nil { return false } - return cmp.Exprs(a.LinestringParams, b.LinestringParams) + return cmp.SliceOfExpr(a.LinestringParams, b.LinestringParams) } // RefOfMultiPointExpr does deep equals between the two objects. @@ -3567,7 +3565,7 @@ func (cmp *Comparator) RefOfMultiPointExpr(a, b *MultiPointExpr) bool { if a == nil || b == nil { return false } - return cmp.Exprs(a.PointParams, b.PointParams) + return cmp.SliceOfExpr(a.PointParams, b.PointParams) } // RefOfMultiPolygonExpr does deep equals between the two objects. @@ -3578,7 +3576,7 @@ func (cmp *Comparator) RefOfMultiPolygonExpr(a, b *MultiPolygonExpr) bool { if a == nil || b == nil { return false } - return cmp.Exprs(a.PolygonParams, b.PolygonParams) + return cmp.SliceOfExpr(a.PolygonParams, b.PolygonParams) } // RefOfNTHValueExpr does deep equals between the two objects. @@ -3954,7 +3952,7 @@ func (cmp *Comparator) RefOfPolygonExpr(a, b *PolygonExpr) bool { if a == nil || b == nil { return false } - return cmp.Exprs(a.LinestringParams, b.LinestringParams) + return cmp.SliceOfExpr(a.LinestringParams, b.LinestringParams) } // RefOfPolygonPropertyFuncExpr does deep equals between the two objects. @@ -4208,7 +4206,7 @@ func (cmp *Comparator) RefOfSelect(a, b *Select) bool { cmp.RefOfWith(a.With, b.With) && cmp.SliceOfTableExpr(a.From, b.From) && cmp.RefOfParsedComments(a.Comments, b.Comments) && - cmp.SelectExprs(a.SelectExprs, b.SelectExprs) && + cmp.RefOfSelectExprs(a.SelectExprs, b.SelectExprs) && cmp.RefOfWhere(a.Where, b.Where) && cmp.RefOfGroupBy(a.GroupBy, b.GroupBy) && cmp.RefOfWhere(a.Having, b.Having) && @@ -4219,17 +4217,15 @@ func (cmp *Comparator) RefOfSelect(a, b *Select) bool { cmp.RefOfSelectInto(a.Into, b.Into) } -// SelectExprs does deep equals between the two objects. -func (cmp *Comparator) SelectExprs(a, b SelectExprs) bool { - if len(a) != len(b) { - return false +// RefOfSelectExprs does deep equals between the two objects. +func (cmp *Comparator) RefOfSelectExprs(a, b *SelectExprs) bool { + if a == b { + return true } - for i := 0; i < len(a); i++ { - if !cmp.SelectExpr(a[i], b[i]) { - return false - } + if a == nil || b == nil { + return false } - return true + return cmp.SliceOfSelectExpr(a.Exprs, b.Exprs) } // RefOfSelectInto does deep equals between the two objects. @@ -5006,7 +5002,7 @@ func (cmp *Comparator) RefOfWindowSpecification(a, b *WindowSpecification) bool return false } return cmp.IdentifierCI(a.Name, b.Name) && - cmp.Exprs(a.PartitionClause, b.PartitionClause) && + cmp.SliceOfExpr(a.PartitionClause, b.PartitionClause) && cmp.OrderBy(a.OrderClause, b.OrderClause) && cmp.RefOfFrameClause(a.FrameClause, b.FrameClause) } @@ -7328,6 +7324,19 @@ func (cmp *Comparator) SliceOfTxAccessMode(a, b []TxAccessMode) bool { return true } +// SliceOfExpr does deep equals between the two objects. +func (cmp *Comparator) SliceOfExpr(a, b []Expr) bool { + if len(a) != len(b) { + return false + } + for i := 0; i < len(a); i++ { + if !cmp.Expr(a[i], b[i]) { + return false + } + } + return true +} + // SliceOfRefOfWhen does deep equals between the two objects. func (cmp *Comparator) SliceOfRefOfWhen(a, b []*When) bool { if len(a) != len(b) { @@ -7423,19 +7432,6 @@ func (cmp *Comparator) SliceOfRefOfVariable(a, b []*Variable) bool { return true } -// SliceOfExpr does deep equals between the two objects. -func (cmp *Comparator) SliceOfExpr(a, b []Expr) bool { - if len(a) != len(b) { - return false - } - for i := 0; i < len(a); i++ { - if !cmp.Expr(a[i], b[i]) { - return false - } - } - return true -} - // RefOfIdentifierCI does deep equals between the two objects. func (cmp *Comparator) RefOfIdentifierCI(a, b *IdentifierCI) bool { if a == b { @@ -7626,6 +7622,19 @@ func (cmp *Comparator) RefOfRootNode(a, b *RootNode) bool { return cmp.SQLNode(a.SQLNode, b.SQLNode) } +// SliceOfSelectExpr does deep equals between the two objects. +func (cmp *Comparator) SliceOfSelectExpr(a, b []SelectExpr) bool { + if len(a) != len(b) { + return false + } + for i := 0; i < len(a); i++ { + if !cmp.SelectExpr(a[i], b[i]) { + return false + } + } + return true +} + // RefOfTableName does deep equals between the two objects. func (cmp *Comparator) RefOfTableName(a, b *TableName) bool { if a == b { diff --git a/go/vt/sqlparser/ast_format.go b/go/vt/sqlparser/ast_format.go index 37539c450b2..8939af71f51 100644 --- a/go/vt/sqlparser/ast_format.go +++ b/go/vt/sqlparser/ast_format.go @@ -1127,7 +1127,7 @@ func (node *DeallocateStmt) Format(buf *TrackedBuffer) { // Format formats the node. func (node *CallProc) Format(buf *TrackedBuffer) { - buf.astPrintf(node, "call %v(%v)", node.Name, node.Params) + buf.astPrintf(node, "call %v(%n)", node.Name, node.Params) } // Format formats the node. @@ -1155,9 +1155,9 @@ func (node *ParsedComments) Format(buf *TrackedBuffer) { } // Format formats the node. -func (node SelectExprs) Format(buf *TrackedBuffer) { +func (node *SelectExprs) Format(buf *TrackedBuffer) { var prefix string - for _, n := range node { + for _, n := range node.Exprs { buf.astPrintf(node, "%s%v", prefix, n) prefix = ", " } @@ -1312,9 +1312,9 @@ func (node *Where) Format(buf *TrackedBuffer) { } // Format formats the node. -func (node Exprs) Format(buf *TrackedBuffer) { +func (node *Exprs) Format(buf *TrackedBuffer) { var prefix string - for _, n := range node { + for _, n := range node.Exprs { buf.astPrintf(node, "%s%v", prefix, n) prefix = ", " } @@ -1499,7 +1499,13 @@ func (node *ColName) Format(buf *TrackedBuffer) { // Format formats the node. func (node ValTuple) Format(buf *TrackedBuffer) { - buf.astPrintf(node, "(%v)", Exprs(node)) + var prefix string + buf.WriteString("(") + for _, n := range node { + buf.astPrintf(node, "%s%v", prefix, n) + prefix = ", " + } + buf.WriteString(")") } // Format formats the node. @@ -1688,15 +1694,15 @@ func (node *FuncExpr) Format(buf *TrackedBuffer) { } else { buf.WriteString(funcName) } - buf.astPrintf(node, "(%v)", node.Exprs) + buf.astPrintf(node, "(%n)", node.Exprs) } // Format formats the node func (node *GroupConcatExpr) Format(buf *TrackedBuffer) { if node.Distinct { - buf.astPrintf(node, "group_concat(%s%v%v", DistinctStr, node.Exprs, node.OrderBy) + buf.astPrintf(node, "group_concat(%s%n%v", DistinctStr, node.Exprs, node.OrderBy) } else { - buf.astPrintf(node, "group_concat(%v%v", node.Exprs, node.OrderBy) + buf.astPrintf(node, "group_concat(%n%v", node.Exprs, node.OrderBy) } if node.Separator != "" { buf.astPrintf(node, " %s %#s", keywordStrings[SEPARATOR], node.Separator) @@ -1744,7 +1750,7 @@ func (node *WindowSpecification) Format(buf *TrackedBuffer) { buf.astPrintf(node, " %v", node.Name) } if node.PartitionClause != nil { - buf.astPrintf(node, " partition by %v", node.PartitionClause) + buf.astPrintf(node, " partition by %n", node.PartitionClause) } if node.OrderClause != nil { buf.astPrintf(node, "%v", node.OrderClause) @@ -1898,7 +1904,7 @@ func (node *InsertExpr) Format(buf *TrackedBuffer) { // Format formats the node. func (node *IntervalFuncExpr) Format(buf *TrackedBuffer) { - buf.astPrintf(node, "interval(%v, %v)", node.Expr, node.Exprs) + buf.astPrintf(node, "interval(%v, %n)", node.Expr, node.Exprs) } // Format formats the node. @@ -1912,7 +1918,7 @@ func (node *LocateExpr) Format(buf *TrackedBuffer) { // Format formats the node. func (node *CharExpr) Format(buf *TrackedBuffer) { - buf.astPrintf(node, "char(%v", node.Exprs) + buf.astPrintf(node, "char(%n", node.Exprs) if node.Charset != "" { buf.astPrintf(node, " using %#s", node.Charset) } @@ -2861,7 +2867,7 @@ func (node *Count) Format(buf *TrackedBuffer) { if node.Distinct { buf.literal(DistinctStr) } - buf.astPrintf(node, "%v)", node.Args) + buf.astPrintf(node, "%n)", node.Args) if node.OverClause != nil { buf.astPrintf(node, " %v", node.OverClause) } @@ -3032,12 +3038,12 @@ func (node *PointExpr) Format(buf *TrackedBuffer) { // Format formats the node. func (node *LineStringExpr) Format(buf *TrackedBuffer) { - buf.astPrintf(node, "linestring(%v)", node.PointParams) + buf.astPrintf(node, "linestring(%n)", node.PointParams) } // Format formats the node. func (node *PolygonExpr) Format(buf *TrackedBuffer) { - buf.astPrintf(node, "polygon(%v)", node.LinestringParams) + buf.astPrintf(node, "polygon(%n)", node.LinestringParams) } // Format formats the node. @@ -3051,17 +3057,17 @@ func (node *PurgeBinaryLogs) Format(buf *TrackedBuffer) { } func (node *MultiPolygonExpr) Format(buf *TrackedBuffer) { - buf.astPrintf(node, "multipolygon(%v)", node.PolygonParams) + buf.astPrintf(node, "multipolygon(%n)", node.PolygonParams) } // Format formats the node. func (node *MultiPointExpr) Format(buf *TrackedBuffer) { - buf.astPrintf(node, "multipoint(%v)", node.PointParams) + buf.astPrintf(node, "multipoint(%n)", node.PointParams) } // Format formats the node. func (node *MultiLinestringExpr) Format(buf *TrackedBuffer) { - buf.astPrintf(node, "multilinestring(%v)", node.LinestringParams) + buf.astPrintf(node, "multilinestring(%n)", node.LinestringParams) } // Format formats the node diff --git a/go/vt/sqlparser/ast_format_fast.go b/go/vt/sqlparser/ast_format_fast.go index 7a818faf0c0..2a6797871eb 100644 --- a/go/vt/sqlparser/ast_format_fast.go +++ b/go/vt/sqlparser/ast_format_fast.go @@ -1487,7 +1487,7 @@ func (node *CallProc) FormatFast(buf *TrackedBuffer) { buf.WriteString("call ") node.Name.FormatFast(buf) buf.WriteByte('(') - node.Params.FormatFast(buf) + buf.formatExprs(node.Params) buf.WriteByte(')') } @@ -1518,9 +1518,9 @@ func (node *ParsedComments) FormatFast(buf *TrackedBuffer) { } // FormatFast formats the node. -func (node SelectExprs) FormatFast(buf *TrackedBuffer) { +func (node *SelectExprs) FormatFast(buf *TrackedBuffer) { var prefix string - for _, n := range node { + for _, n := range node.Exprs { buf.WriteString(prefix) n.FormatFast(buf) prefix = ", " @@ -1704,9 +1704,9 @@ func (node *Where) FormatFast(buf *TrackedBuffer) { } // FormatFast formats the node. -func (node Exprs) FormatFast(buf *TrackedBuffer) { +func (node *Exprs) FormatFast(buf *TrackedBuffer) { var prefix string - for _, n := range node { + for _, n := range node.Exprs { buf.WriteString(prefix) n.FormatFast(buf) prefix = ", " @@ -1936,9 +1936,14 @@ func (node *ColName) FormatFast(buf *TrackedBuffer) { // FormatFast formats the node. func (node ValTuple) FormatFast(buf *TrackedBuffer) { - buf.WriteByte('(') - Exprs(node).FormatFast(buf) - buf.WriteByte(')') + var prefix string + buf.WriteString("(") + for _, n := range node { + buf.WriteString(prefix) + buf.printExpr(node, n, true) + prefix = ", " + } + buf.WriteString(")") } // FormatFast formats the node. @@ -2223,7 +2228,7 @@ func (node *FuncExpr) FormatFast(buf *TrackedBuffer) { buf.WriteString(funcName) } buf.WriteByte('(') - node.Exprs.FormatFast(buf) + buf.formatExprs(node.Exprs) buf.WriteByte(')') } @@ -2232,11 +2237,11 @@ func (node *GroupConcatExpr) FormatFast(buf *TrackedBuffer) { if node.Distinct { buf.WriteString("group_concat(") buf.WriteString(DistinctStr) - node.Exprs.FormatFast(buf) + buf.formatExprs(node.Exprs) node.OrderBy.FormatFast(buf) } else { buf.WriteString("group_concat(") - node.Exprs.FormatFast(buf) + buf.formatExprs(node.Exprs) node.OrderBy.FormatFast(buf) } if node.Separator != "" { @@ -2302,7 +2307,7 @@ func (node *WindowSpecification) FormatFast(buf *TrackedBuffer) { } if node.PartitionClause != nil { buf.WriteString(" partition by ") - node.PartitionClause.FormatFast(buf) + buf.formatExprs(node.PartitionClause) } if node.OrderClause != nil { node.OrderClause.FormatFast(buf) @@ -2519,7 +2524,7 @@ func (node *IntervalFuncExpr) FormatFast(buf *TrackedBuffer) { buf.WriteString("interval(") buf.printExpr(node, node.Expr, true) buf.WriteString(", ") - node.Exprs.FormatFast(buf) + buf.formatExprs(node.Exprs) buf.WriteByte(')') } @@ -2545,7 +2550,7 @@ func (node *LocateExpr) FormatFast(buf *TrackedBuffer) { // FormatFast formats the node. func (node *CharExpr) FormatFast(buf *TrackedBuffer) { buf.WriteString("char(") - node.Exprs.FormatFast(buf) + buf.formatExprs(node.Exprs) if node.Charset != "" { buf.WriteString(" using ") buf.WriteString(node.Charset) @@ -3760,7 +3765,7 @@ func (node *Count) FormatFast(buf *TrackedBuffer) { if node.Distinct { buf.WriteString(DistinctStr) } - node.Args.FormatFast(buf) + buf.formatExprs(node.Args) buf.WriteByte(')') if node.OverClause != nil { buf.WriteByte(' ') @@ -3984,14 +3989,14 @@ func (node *PointExpr) FormatFast(buf *TrackedBuffer) { // FormatFast formats the node. func (node *LineStringExpr) FormatFast(buf *TrackedBuffer) { buf.WriteString("linestring(") - node.PointParams.FormatFast(buf) + buf.formatExprs(node.PointParams) buf.WriteByte(')') } // FormatFast formats the node. func (node *PolygonExpr) FormatFast(buf *TrackedBuffer) { buf.WriteString("polygon(") - node.LinestringParams.FormatFast(buf) + buf.formatExprs(node.LinestringParams) buf.WriteByte(')') } @@ -4011,21 +4016,21 @@ func (node *PurgeBinaryLogs) FormatFast(buf *TrackedBuffer) { func (node *MultiPolygonExpr) FormatFast(buf *TrackedBuffer) { buf.WriteString("multipolygon(") - node.PolygonParams.FormatFast(buf) + buf.formatExprs(node.PolygonParams) buf.WriteByte(')') } // FormatFast formats the node. func (node *MultiPointExpr) FormatFast(buf *TrackedBuffer) { buf.WriteString("multipoint(") - node.PointParams.FormatFast(buf) + buf.formatExprs(node.PointParams) buf.WriteByte(')') } // FormatFast formats the node. func (node *MultiLinestringExpr) FormatFast(buf *TrackedBuffer) { buf.WriteString("multilinestring(") - node.LinestringParams.FormatFast(buf) + buf.formatExprs(node.LinestringParams) buf.WriteByte(')') } diff --git a/go/vt/sqlparser/ast_format_test.go b/go/vt/sqlparser/ast_format_test.go new file mode 100644 index 00000000000..5ea4e5e3d2f --- /dev/null +++ b/go/vt/sqlparser/ast_format_test.go @@ -0,0 +1,35 @@ +/* +Copyright 2025 The Vitess Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package sqlparser + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestColNamesInSlice(t *testing.T) { + c1 := NewColName("a1") + c2 := NewColName("a2") + exprs := []Expr{ + c1, + c2, + } + + result := SliceString(exprs) + assert.Equal(t, "a1, a2", result) +} diff --git a/go/vt/sqlparser/ast_funcs.go b/go/vt/sqlparser/ast_funcs.go index 2da783af3df..ba7648778e3 100644 --- a/go/vt/sqlparser/ast_funcs.go +++ b/go/vt/sqlparser/ast_funcs.go @@ -890,7 +890,7 @@ func NewLimitWithoutOffset(rowCount int) *Limit { // NewSelect is used to create a select statement func NewSelect( comments Comments, - exprs SelectExprs, + exprs *SelectExprs, selectOptions []string, into *SelectInto, from TableExprs, @@ -1195,8 +1195,25 @@ func compliantName(in string) string { return buf.String() } -func (node *Select) AddSelectExprs(selectExprs SelectExprs) { - node.SelectExprs = append(node.SelectExprs, selectExprs...) +func (node *Select) AddSelectExprs(selectExprs *SelectExprs) { + if node.SelectExprs == nil { + node.SelectExprs = &SelectExprs{} + } + node.SelectExprs.Exprs = append(node.SelectExprs.Exprs, selectExprs.Exprs...) +} + +func (node *Select) AddSelectExpr(expr SelectExpr) { + if node.SelectExprs == nil { + node.SelectExprs = &SelectExprs{} + } + node.SelectExprs.Exprs = append(node.SelectExprs.Exprs, expr) +} + +func (node *Select) SetSelectExprs(exprs ...SelectExpr) { + if node.SelectExprs == nil { + node.SelectExprs = &SelectExprs{} + } + node.SelectExprs.Exprs = exprs } // AddOrder adds an order by element @@ -1256,12 +1273,18 @@ func (node *Select) IsDistinct() bool { // GetColumnCount return SelectExprs count. func (node *Select) GetColumnCount() int { - return len(node.SelectExprs) + if node.SelectExprs == nil { + return 0 + } + return len(node.SelectExprs.Exprs) } // GetColumns gets the columns -func (node *Select) GetColumns() SelectExprs { - return node.SelectExprs +func (node *Select) GetColumns() []SelectExpr { + if node.SelectExprs == nil { + return nil + } + return node.SelectExprs.Exprs } // SetComments implements the Commented interface @@ -1362,7 +1385,7 @@ func (node *Union) GetLimit() *Limit { } // GetColumns gets the columns -func (node *Union) GetColumns() SelectExprs { +func (node *Union) GetColumns() []SelectExpr { return node.Left.GetColumns() } @@ -2354,7 +2377,7 @@ func ContainsAggregation(e SQLNode) bool { } // setFuncArgs sets the arguments for the aggregation function, while checking that there is only one argument -func setFuncArgs(aggr AggrFunc, exprs Exprs, name string) error { +func setFuncArgs(aggr AggrFunc, exprs []Expr, name string) error { if len(exprs) != 1 { return vterrors.VT03001(name) } @@ -2410,8 +2433,8 @@ func (ae *AliasedExpr) ColumnName() string { } // AllAggregation returns true if all the expressions contain aggregation -func (s SelectExprs) AllAggregation() bool { - for _, k := range s { +func (s *SelectExprs) AllAggregation() bool { + for _, k := range s.Exprs { if !ContainsAggregation(k) { return false } @@ -3070,14 +3093,27 @@ func (node *ValuesStatement) GetColumnCount() int { panic("no columns available") // TODO: we need a better solution than a panic } -func (node *ValuesStatement) GetColumns() (result SelectExprs) { +func (node *ValuesStatement) GetColumns() []SelectExpr { + var sel []SelectExpr columnCount := node.GetColumnCount() for i := range columnCount { - result = append(result, &AliasedExpr{Expr: NewColName(fmt.Sprintf("column_%d", i))}) + sel = append(sel, &AliasedExpr{Expr: NewColName(fmt.Sprintf("column_%d", i))}) } + _ = sel panic("no columns available") // TODO: we need a better solution than a panic } func (node *ValuesStatement) SetComments(comments Comments) {} func (node *ValuesStatement) GetParsedComments() *ParsedComments { return nil } + +func NewFuncExpr(name string, exprs ...Expr) *FuncExpr { + return &FuncExpr{ + Name: NewIdentifierCI(name), + Exprs: exprs, + } +} + +func NewExprs(exprs ...Expr) *Exprs { + return &Exprs{Exprs: exprs} +} diff --git a/go/vt/sqlparser/ast_rewrite.go b/go/vt/sqlparser/ast_rewrite.go index 690b381b082..a4cfeb4f01c 100644 --- a/go/vt/sqlparser/ast_rewrite.go +++ b/go/vt/sqlparser/ast_rewrite.go @@ -160,8 +160,8 @@ func (a *application) rewriteSQLNode(parent SQLNode, node SQLNode, replacer repl return a.rewriteRefOfExplainStmt(parent, node, replacer) case *ExplainTab: return a.rewriteRefOfExplainTab(parent, node, replacer) - case Exprs: - return a.rewriteExprs(parent, node, replacer) + case *Exprs: + return a.rewriteRefOfExprs(parent, node, replacer) case *ExtractFuncExpr: return a.rewriteRefOfExtractFuncExpr(parent, node, replacer) case *ExtractValueExpr: @@ -434,8 +434,8 @@ func (a *application) rewriteSQLNode(parent SQLNode, node SQLNode, replacer repl return a.rewriteRefOfSavepoint(parent, node, replacer) case *Select: return a.rewriteRefOfSelect(parent, node, replacer) - case SelectExprs: - return a.rewriteSelectExprs(parent, node, replacer) + case *SelectExprs: + return a.rewriteRefOfSelectExprs(parent, node, replacer) case *SelectInto: return a.rewriteRefOfSelectInto(parent, node, replacer) case *Set: @@ -577,7 +577,12 @@ func (a *application) rewriteRefOfAddColumns(parent SQLNode, node *AddColumns, r a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -613,7 +618,12 @@ func (a *application) rewriteRefOfAddConstraintDefinition(parent SQLNode, node * a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -640,7 +650,12 @@ func (a *application) rewriteRefOfAddIndexDefinition(parent SQLNode, node *AddIn a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -667,7 +682,12 @@ func (a *application) rewriteRefOfAliasedExpr(parent SQLNode, node *AliasedExpr, a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -699,7 +719,12 @@ func (a *application) rewriteRefOfAliasedTableExpr(parent SQLNode, node *Aliased a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -746,7 +771,12 @@ func (a *application) rewriteRefOfAlterCharset(parent SQLNode, node *AlterCharse a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -770,7 +800,12 @@ func (a *application) rewriteRefOfAlterCheck(parent SQLNode, node *AlterCheck, r a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -797,7 +832,12 @@ func (a *application) rewriteRefOfAlterColumn(parent SQLNode, node *AlterColumn, a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -829,7 +869,12 @@ func (a *application) rewriteRefOfAlterDatabase(parent SQLNode, node *AlterDatab a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -861,7 +906,12 @@ func (a *application) rewriteRefOfAlterIndex(parent SQLNode, node *AlterIndex, r a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -888,7 +938,12 @@ func (a *application) rewriteRefOfAlterMigration(parent SQLNode, node *AlterMigr a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -915,7 +970,12 @@ func (a *application) rewriteRefOfAlterTable(parent SQLNode, node *AlterTable, r a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -966,7 +1026,12 @@ func (a *application) rewriteRefOfAlterView(parent SQLNode, node *AlterView, rep a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -1013,7 +1078,12 @@ func (a *application) rewriteRefOfAlterVschema(parent SQLNode, node *AlterVschem a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -1059,7 +1129,12 @@ func (a *application) rewriteRefOfAnalyze(parent SQLNode, node *Analyze, replace a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -1089,7 +1164,7 @@ func (a *application) rewriteRefOfAndExpr(parent SQLNode, node *AndExpr, replace kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -1126,7 +1201,7 @@ func (a *application) rewriteRefOfAnyValue(parent SQLNode, node *AnyValue, repla kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -1158,7 +1233,7 @@ func (a *application) rewriteRefOfArgument(parent SQLNode, node *Argument, repla kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -1187,7 +1262,7 @@ func (a *application) rewriteRefOfArgumentLessWindowExpr(parent SQLNode, node *A kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -1219,7 +1294,7 @@ func (a *application) rewriteRefOfAssignmentExpr(parent SQLNode, node *Assignmen kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -1253,7 +1328,12 @@ func (a *application) rewriteRefOfAutoIncSpec(parent SQLNode, node *AutoIncSpec, a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -1288,7 +1368,7 @@ func (a *application) rewriteRefOfAvg(parent SQLNode, node *Avg, replacer replac kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -1322,7 +1402,12 @@ func (a *application) rewriteRefOfBegin(parent SQLNode, node *Begin, replacer re a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -1349,7 +1434,7 @@ func (a *application) rewriteRefOfBetweenExpr(parent SQLNode, node *BetweenExpr, kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -1391,7 +1476,7 @@ func (a *application) rewriteRefOfBinaryExpr(parent SQLNode, node *BinaryExpr, r kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -1428,7 +1513,7 @@ func (a *application) rewriteRefOfBitAnd(parent SQLNode, node *BitAnd, replacer kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -1465,7 +1550,7 @@ func (a *application) rewriteRefOfBitOr(parent SQLNode, node *BitOr, replacer re kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -1502,7 +1587,7 @@ func (a *application) rewriteRefOfBitXor(parent SQLNode, node *BitXor, replacer kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -1536,7 +1621,12 @@ func (a *application) rewriteRefOfCallProc(parent SQLNode, node *CallProc, repla a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -1545,10 +1635,14 @@ func (a *application) rewriteRefOfCallProc(parent SQLNode, node *CallProc, repla }) { return false } - if !a.rewriteExprs(node, node.Params, func(newNode, parent SQLNode) { - parent.(*CallProc).Params = newNode.(Exprs) - }) { - return false + for x, el := range node.Params { + if !a.rewriteExpr(node, el, func(idx int) replacerFunc { + return func(newNode, parent SQLNode) { + parent.(*CallProc).Params[idx] = newNode.(Expr) + } + }(x)) { + return false + } } if a.post != nil { a.cur.replacer = replacer @@ -1571,7 +1665,7 @@ func (a *application) rewriteRefOfCaseExpr(parent SQLNode, node *CaseExpr, repla kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -1617,7 +1711,7 @@ func (a *application) rewriteRefOfCastExpr(parent SQLNode, node *CastExpr, repla kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -1651,7 +1745,12 @@ func (a *application) rewriteRefOfChangeColumn(parent SQLNode, node *ChangeColum a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -1691,16 +1790,20 @@ func (a *application) rewriteRefOfCharExpr(parent SQLNode, node *CharExpr, repla kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true } } - if !a.rewriteExprs(node, node.Exprs, func(newNode, parent SQLNode) { - parent.(*CharExpr).Exprs = newNode.(Exprs) - }) { - return false + for x, el := range node.Exprs { + if !a.rewriteExpr(node, el, func(idx int) replacerFunc { + return func(newNode, parent SQLNode) { + parent.(*CharExpr).Exprs[idx] = newNode.(Expr) + } + }(x)) { + return false + } } if a.post != nil { a.cur.replacer = replacer @@ -1720,7 +1823,12 @@ func (a *application) rewriteRefOfCheckConstraintDefinition(parent SQLNode, node a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -1750,7 +1858,7 @@ func (a *application) rewriteRefOfColName(parent SQLNode, node *ColName, replace kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -1787,7 +1895,7 @@ func (a *application) rewriteRefOfCollateExpr(parent SQLNode, node *CollateExpr, kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -1816,7 +1924,12 @@ func (a *application) rewriteRefOfColumnDefinition(parent SQLNode, node *ColumnD a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -1848,7 +1961,12 @@ func (a *application) rewriteRefOfColumnType(parent SQLNode, node *ColumnType, r a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -1874,9 +1992,8 @@ func (a *application) rewriteColumns(parent SQLNode, node Columns, replacer repl a.cur.node = node kontinue := !a.pre(&a.cur) if a.cur.revisit { - node = a.cur.node.(Columns) a.cur.revisit = false - return a.rewriteColumns(parent, node, replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -1909,7 +2026,12 @@ func (a *application) rewriteRefOfCommentOnly(parent SQLNode, node *CommentOnly, a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -1933,7 +2055,12 @@ func (a *application) rewriteRefOfCommit(parent SQLNode, node *Commit, replacer a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -1957,7 +2084,12 @@ func (a *application) rewriteRefOfCommonTableExpr(parent SQLNode, node *CommonTa a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -1997,7 +2129,7 @@ func (a *application) rewriteRefOfComparisonExpr(parent SQLNode, node *Compariso kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -2036,7 +2168,12 @@ func (a *application) rewriteRefOfConstraintDefinition(parent SQLNode, node *Con a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -2071,7 +2208,7 @@ func (a *application) rewriteRefOfConvertExpr(parent SQLNode, node *ConvertExpr, kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -2105,7 +2242,12 @@ func (a *application) rewriteRefOfConvertType(parent SQLNode, node *ConvertType, a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -2132,7 +2274,7 @@ func (a *application) rewriteRefOfConvertUsingExpr(parent SQLNode, node *Convert kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -2164,16 +2306,20 @@ func (a *application) rewriteRefOfCount(parent SQLNode, node *Count, replacer re kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true } } - if !a.rewriteExprs(node, node.Args, func(newNode, parent SQLNode) { - parent.(*Count).Args = newNode.(Exprs) - }) { - return false + for x, el := range node.Args { + if !a.rewriteExpr(node, el, func(idx int) replacerFunc { + return func(newNode, parent SQLNode) { + parent.(*Count).Args[idx] = newNode.(Expr) + } + }(x)) { + return false + } } if !a.rewriteRefOfOverClause(node, node.OverClause, func(newNode, parent SQLNode) { parent.(*Count).OverClause = newNode.(*OverClause) @@ -2201,7 +2347,7 @@ func (a *application) rewriteRefOfCountStar(parent SQLNode, node *CountStar, rep kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -2230,7 +2376,12 @@ func (a *application) rewriteRefOfCreateDatabase(parent SQLNode, node *CreateDat a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -2262,7 +2413,12 @@ func (a *application) rewriteRefOfCreateTable(parent SQLNode, node *CreateTable, a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -2304,7 +2460,12 @@ func (a *application) rewriteRefOfCreateView(parent SQLNode, node *CreateView, r a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -2354,7 +2515,7 @@ func (a *application) rewriteRefOfCurTimeFuncExpr(parent SQLNode, node *CurTimeF kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -2383,7 +2544,12 @@ func (a *application) rewriteRefOfDeallocateStmt(parent SQLNode, node *Deallocat a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -2418,7 +2584,7 @@ func (a *application) rewriteRefOfDefault(parent SQLNode, node *Default, replace kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -2444,7 +2610,12 @@ func (a *application) rewriteRefOfDefiner(parent SQLNode, node *Definer, replace a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -2468,7 +2639,12 @@ func (a *application) rewriteRefOfDelete(parent SQLNode, node *Delete, replacer a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -2534,7 +2710,12 @@ func (a *application) rewriteRefOfDerivedTable(parent SQLNode, node *DerivedTabl a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -2561,7 +2742,12 @@ func (a *application) rewriteRefOfDropColumn(parent SQLNode, node *DropColumn, r a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -2588,7 +2774,12 @@ func (a *application) rewriteRefOfDropDatabase(parent SQLNode, node *DropDatabas a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -2620,7 +2811,12 @@ func (a *application) rewriteRefOfDropKey(parent SQLNode, node *DropKey, replace a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -2647,7 +2843,12 @@ func (a *application) rewriteRefOfDropTable(parent SQLNode, node *DropTable, rep a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -2679,7 +2880,12 @@ func (a *application) rewriteRefOfDropView(parent SQLNode, node *DropView, repla a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -2711,7 +2917,12 @@ func (a *application) rewriteRefOfExecuteStmt(parent SQLNode, node *ExecuteStmt, a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -2755,7 +2966,7 @@ func (a *application) rewriteRefOfExistsExpr(parent SQLNode, node *ExistsExpr, r kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -2784,7 +2995,12 @@ func (a *application) rewriteRefOfExplainStmt(parent SQLNode, node *ExplainStmt, a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -2816,7 +3032,12 @@ func (a *application) rewriteRefOfExplainTab(parent SQLNode, node *ExplainTab, r a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -2835,7 +3056,7 @@ func (a *application) rewriteRefOfExplainTab(parent SQLNode, node *ExplainTab, r } return true } -func (a *application) rewriteExprs(parent SQLNode, node Exprs, replacer replacerFunc) bool { +func (a *application) rewriteRefOfExprs(parent SQLNode, node *Exprs, replacer replacerFunc) bool { if node == nil { return true } @@ -2845,18 +3066,17 @@ func (a *application) rewriteExprs(parent SQLNode, node Exprs, replacer replacer a.cur.node = node kontinue := !a.pre(&a.cur) if a.cur.revisit { - node = a.cur.node.(Exprs) a.cur.revisit = false - return a.rewriteExprs(parent, node, replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true } } - for x, el := range node { + for x, el := range node.Exprs { if !a.rewriteExpr(node, el, func(idx int) replacerFunc { return func(newNode, parent SQLNode) { - parent.(Exprs)[idx] = newNode.(Expr) + parent.(*Exprs).Exprs[idx] = newNode.(Expr) } }(x)) { return false @@ -2883,7 +3103,7 @@ func (a *application) rewriteRefOfExtractFuncExpr(parent SQLNode, node *ExtractF kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -2915,7 +3135,7 @@ func (a *application) rewriteRefOfExtractValueExpr(parent SQLNode, node *Extract kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -2952,7 +3172,7 @@ func (a *application) rewriteRefOfFirstOrLastValueExpr(parent SQLNode, node *Fir kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -2991,7 +3211,12 @@ func (a *application) rewriteRefOfFlush(parent SQLNode, node *Flush, replacer re a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -3018,7 +3243,12 @@ func (a *application) rewriteRefOfForce(parent SQLNode, node *Force, replacer re a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -3042,7 +3272,12 @@ func (a *application) rewriteRefOfForeignKeyDefinition(parent SQLNode, node *For a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -3079,7 +3314,12 @@ func (a *application) rewriteRefOfFrameClause(parent SQLNode, node *FrameClause, a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -3111,7 +3351,12 @@ func (a *application) rewriteRefOfFramePoint(parent SQLNode, node *FramePoint, r a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -3138,7 +3383,12 @@ func (a *application) rewriteRefOfFromFirstLastClause(parent SQLNode, node *From a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -3165,7 +3415,7 @@ func (a *application) rewriteRefOfFuncExpr(parent SQLNode, node *FuncExpr, repla kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -3181,10 +3431,14 @@ func (a *application) rewriteRefOfFuncExpr(parent SQLNode, node *FuncExpr, repla }) { return false } - if !a.rewriteExprs(node, node.Exprs, func(newNode, parent SQLNode) { - parent.(*FuncExpr).Exprs = newNode.(Exprs) - }) { - return false + for x, el := range node.Exprs { + if !a.rewriteExpr(node, el, func(idx int) replacerFunc { + return func(newNode, parent SQLNode) { + parent.(*FuncExpr).Exprs[idx] = newNode.(Expr) + } + }(x)) { + return false + } } if a.post != nil { a.cur.replacer = replacer @@ -3207,7 +3461,7 @@ func (a *application) rewriteRefOfGTIDFuncExpr(parent SQLNode, node *GTIDFuncExp kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -3254,7 +3508,7 @@ func (a *application) rewriteRefOfGeoHashFromLatLongExpr(parent SQLNode, node *G kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -3296,7 +3550,7 @@ func (a *application) rewriteRefOfGeoHashFromPointExpr(parent SQLNode, node *Geo kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -3333,7 +3587,7 @@ func (a *application) rewriteRefOfGeoJSONFromGeomExpr(parent SQLNode, node *GeoJ kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -3375,7 +3629,7 @@ func (a *application) rewriteRefOfGeomCollPropertyFuncExpr(parent SQLNode, node kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -3412,7 +3666,7 @@ func (a *application) rewriteRefOfGeomFormatExpr(parent SQLNode, node *GeomForma kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -3449,7 +3703,7 @@ func (a *application) rewriteRefOfGeomFromGeoHashExpr(parent SQLNode, node *Geom kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -3486,7 +3740,7 @@ func (a *application) rewriteRefOfGeomFromGeoJSONExpr(parent SQLNode, node *Geom kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -3528,7 +3782,7 @@ func (a *application) rewriteRefOfGeomFromTextExpr(parent SQLNode, node *GeomFro kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -3570,7 +3824,7 @@ func (a *application) rewriteRefOfGeomFromWKBExpr(parent SQLNode, node *GeomFrom kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -3612,7 +3866,7 @@ func (a *application) rewriteRefOfGeomPropertyFuncExpr(parent SQLNode, node *Geo kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -3641,7 +3895,12 @@ func (a *application) rewriteRefOfGroupBy(parent SQLNode, node *GroupBy, replace a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -3675,16 +3934,20 @@ func (a *application) rewriteRefOfGroupConcatExpr(parent SQLNode, node *GroupCon kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true } } - if !a.rewriteExprs(node, node.Exprs, func(newNode, parent SQLNode) { - parent.(*GroupConcatExpr).Exprs = newNode.(Exprs) - }) { - return false + for x, el := range node.Exprs { + if !a.rewriteExpr(node, el, func(idx int) replacerFunc { + return func(newNode, parent SQLNode) { + parent.(*GroupConcatExpr).Exprs[idx] = newNode.(Expr) + } + }(x)) { + return false + } } if !a.rewriteOrderBy(node, node.OrderBy, func(newNode, parent SQLNode) { parent.(*GroupConcatExpr).OrderBy = newNode.(OrderBy) @@ -3711,7 +3974,12 @@ func (a *application) rewriteIdentifierCI(parent SQLNode, node IdentifierCI, rep a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -3732,7 +4000,12 @@ func (a *application) rewriteIdentifierCS(parent SQLNode, node IdentifierCS, rep a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -3756,7 +4029,12 @@ func (a *application) rewriteRefOfIndexDefinition(parent SQLNode, node *IndexDef a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -3783,7 +4061,12 @@ func (a *application) rewriteRefOfIndexHint(parent SQLNode, node *IndexHint, rep a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -3816,9 +4099,8 @@ func (a *application) rewriteIndexHints(parent SQLNode, node IndexHints, replace a.cur.node = node kontinue := !a.pre(&a.cur) if a.cur.revisit { - node = a.cur.node.(IndexHints) a.cur.revisit = false - return a.rewriteIndexHints(parent, node, replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -3851,7 +4133,12 @@ func (a *application) rewriteRefOfIndexInfo(parent SQLNode, node *IndexInfo, rep a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -3883,7 +4170,12 @@ func (a *application) rewriteRefOfInsert(parent SQLNode, node *Insert, replacer a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -3943,7 +4235,7 @@ func (a *application) rewriteRefOfInsertExpr(parent SQLNode, node *InsertExpr, r kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -3990,7 +4282,7 @@ func (a *application) rewriteRefOfIntervalDateExpr(parent SQLNode, node *Interva kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -4027,7 +4319,7 @@ func (a *application) rewriteRefOfIntervalFuncExpr(parent SQLNode, node *Interva kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -4038,10 +4330,14 @@ func (a *application) rewriteRefOfIntervalFuncExpr(parent SQLNode, node *Interva }) { return false } - if !a.rewriteExprs(node, node.Exprs, func(newNode, parent SQLNode) { - parent.(*IntervalFuncExpr).Exprs = newNode.(Exprs) - }) { - return false + for x, el := range node.Exprs { + if !a.rewriteExpr(node, el, func(idx int) replacerFunc { + return func(newNode, parent SQLNode) { + parent.(*IntervalFuncExpr).Exprs[idx] = newNode.(Expr) + } + }(x)) { + return false + } } if a.post != nil { a.cur.replacer = replacer @@ -4064,7 +4360,7 @@ func (a *application) rewriteRefOfIntroducerExpr(parent SQLNode, node *Introduce kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -4096,7 +4392,7 @@ func (a *application) rewriteRefOfIsExpr(parent SQLNode, node *IsExpr, replacer kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -4128,7 +4424,7 @@ func (a *application) rewriteRefOfJSONArrayAgg(parent SQLNode, node *JSONArrayAg kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -4165,17 +4461,21 @@ func (a *application) rewriteRefOfJSONArrayExpr(parent SQLNode, node *JSONArrayE kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true } } - if !a.rewriteExprs(node, node.Params, func(newNode, parent SQLNode) { - parent.(*JSONArrayExpr).Params = newNode.(Exprs) - }) { - return false - } + for x, el := range node.Params { + if !a.rewriteExpr(node, el, func(idx int) replacerFunc { + return func(newNode, parent SQLNode) { + parent.(*JSONArrayExpr).Params[idx] = newNode.(Expr) + } + }(x)) { + return false + } + } if a.post != nil { a.cur.replacer = replacer a.cur.parent = parent @@ -4197,7 +4497,7 @@ func (a *application) rewriteRefOfJSONAttributesExpr(parent SQLNode, node *JSONA kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -4234,7 +4534,7 @@ func (a *application) rewriteRefOfJSONContainsExpr(parent SQLNode, node *JSONCon kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -4280,7 +4580,7 @@ func (a *application) rewriteRefOfJSONContainsPathExpr(parent SQLNode, node *JSO kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -4326,7 +4626,7 @@ func (a *application) rewriteRefOfJSONExtractExpr(parent SQLNode, node *JSONExtr kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -4367,7 +4667,7 @@ func (a *application) rewriteRefOfJSONKeysExpr(parent SQLNode, node *JSONKeysExp kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -4404,7 +4704,7 @@ func (a *application) rewriteRefOfJSONObjectAgg(parent SQLNode, node *JSONObject kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -4446,7 +4746,7 @@ func (a *application) rewriteRefOfJSONObjectExpr(parent SQLNode, node *JSONObjec kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -4479,7 +4779,12 @@ func (a *application) rewriteRefOfJSONObjectParam(parent SQLNode, node *JSONObje a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -4514,7 +4819,7 @@ func (a *application) rewriteRefOfJSONOverlapsExpr(parent SQLNode, node *JSONOve kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -4551,7 +4856,7 @@ func (a *application) rewriteRefOfJSONPrettyExpr(parent SQLNode, node *JSONPrett kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -4583,7 +4888,7 @@ func (a *application) rewriteRefOfJSONQuoteExpr(parent SQLNode, node *JSONQuoteE kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -4615,7 +4920,7 @@ func (a *application) rewriteRefOfJSONRemoveExpr(parent SQLNode, node *JSONRemov kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -4626,10 +4931,14 @@ func (a *application) rewriteRefOfJSONRemoveExpr(parent SQLNode, node *JSONRemov }) { return false } - if !a.rewriteExprs(node, node.PathList, func(newNode, parent SQLNode) { - parent.(*JSONRemoveExpr).PathList = newNode.(Exprs) - }) { - return false + for x, el := range node.PathList { + if !a.rewriteExpr(node, el, func(idx int) replacerFunc { + return func(newNode, parent SQLNode) { + parent.(*JSONRemoveExpr).PathList[idx] = newNode.(Expr) + } + }(x)) { + return false + } } if a.post != nil { a.cur.replacer = replacer @@ -4652,7 +4961,7 @@ func (a *application) rewriteRefOfJSONSchemaValidFuncExpr(parent SQLNode, node * kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -4689,7 +4998,7 @@ func (a *application) rewriteRefOfJSONSchemaValidationReportFuncExpr(parent SQLN kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -4726,7 +5035,7 @@ func (a *application) rewriteRefOfJSONSearchExpr(parent SQLNode, node *JSONSearc kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -4782,7 +5091,7 @@ func (a *application) rewriteRefOfJSONStorageFreeExpr(parent SQLNode, node *JSON kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -4814,7 +5123,7 @@ func (a *application) rewriteRefOfJSONStorageSizeExpr(parent SQLNode, node *JSON kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -4843,7 +5152,12 @@ func (a *application) rewriteRefOfJSONTableExpr(parent SQLNode, node *JSONTableE a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -4892,7 +5206,7 @@ func (a *application) rewriteRefOfJSONUnquoteExpr(parent SQLNode, node *JSONUnqu kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -4924,7 +5238,7 @@ func (a *application) rewriteRefOfJSONValueExpr(parent SQLNode, node *JSONValueE kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -4976,7 +5290,7 @@ func (a *application) rewriteRefOfJSONValueMergeExpr(parent SQLNode, node *JSONV kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -4987,10 +5301,14 @@ func (a *application) rewriteRefOfJSONValueMergeExpr(parent SQLNode, node *JSONV }) { return false } - if !a.rewriteExprs(node, node.JSONDocList, func(newNode, parent SQLNode) { - parent.(*JSONValueMergeExpr).JSONDocList = newNode.(Exprs) - }) { - return false + for x, el := range node.JSONDocList { + if !a.rewriteExpr(node, el, func(idx int) replacerFunc { + return func(newNode, parent SQLNode) { + parent.(*JSONValueMergeExpr).JSONDocList[idx] = newNode.(Expr) + } + }(x)) { + return false + } } if a.post != nil { a.cur.replacer = replacer @@ -5013,7 +5331,7 @@ func (a *application) rewriteRefOfJSONValueModifierExpr(parent SQLNode, node *JS kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -5051,7 +5369,12 @@ func (a *application) rewriteRefOfJoinCondition(parent SQLNode, node *JoinCondit a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -5083,7 +5406,12 @@ func (a *application) rewriteRefOfJoinTableExpr(parent SQLNode, node *JoinTableE a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -5120,7 +5448,12 @@ func (a *application) rewriteRefOfJtColumnDefinition(parent SQLNode, node *JtCol a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -5144,7 +5477,12 @@ func (a *application) rewriteRefOfJtOnResponse(parent SQLNode, node *JtOnRespons a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -5171,7 +5509,12 @@ func (a *application) rewriteRefOfKeyState(parent SQLNode, node *KeyState, repla a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -5195,7 +5538,12 @@ func (a *application) rewriteRefOfKill(parent SQLNode, node *Kill, replacer repl a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -5222,7 +5570,7 @@ func (a *application) rewriteRefOfLagLeadExpr(parent SQLNode, node *LagLeadExpr, kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -5271,7 +5619,12 @@ func (a *application) rewriteRefOfLimit(parent SQLNode, node *Limit, replacer re a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -5306,16 +5659,20 @@ func (a *application) rewriteRefOfLineStringExpr(parent SQLNode, node *LineStrin kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true } } - if !a.rewriteExprs(node, node.PointParams, func(newNode, parent SQLNode) { - parent.(*LineStringExpr).PointParams = newNode.(Exprs) - }) { - return false + for x, el := range node.PointParams { + if !a.rewriteExpr(node, el, func(idx int) replacerFunc { + return func(newNode, parent SQLNode) { + parent.(*LineStringExpr).PointParams[idx] = newNode.(Expr) + } + }(x)) { + return false + } } if a.post != nil { a.cur.replacer = replacer @@ -5338,7 +5695,7 @@ func (a *application) rewriteRefOfLinestrPropertyFuncExpr(parent SQLNode, node * kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -5375,7 +5732,7 @@ func (a *application) rewriteRefOfLiteral(parent SQLNode, node *Literal, replace kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -5401,7 +5758,12 @@ func (a *application) rewriteRefOfLoad(parent SQLNode, node *Load, replacer repl a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -5428,7 +5790,7 @@ func (a *application) rewriteRefOfLocateExpr(parent SQLNode, node *LocateExpr, r kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -5467,7 +5829,12 @@ func (a *application) rewriteRefOfLockOption(parent SQLNode, node *LockOption, r a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -5491,7 +5858,12 @@ func (a *application) rewriteRefOfLockTables(parent SQLNode, node *LockTables, r a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -5518,7 +5890,7 @@ func (a *application) rewriteRefOfLockingFunc(parent SQLNode, node *LockingFunc, kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -5555,7 +5927,7 @@ func (a *application) rewriteRefOfMatchExpr(parent SQLNode, node *MatchExpr, rep kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -5596,7 +5968,7 @@ func (a *application) rewriteRefOfMax(parent SQLNode, node *Max, replacer replac kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -5633,7 +6005,7 @@ func (a *application) rewriteRefOfMemberOfExpr(parent SQLNode, node *MemberOfExp kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -5670,7 +6042,7 @@ func (a *application) rewriteRefOfMin(parent SQLNode, node *Min, replacer replac kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -5704,7 +6076,12 @@ func (a *application) rewriteRefOfModifyColumn(parent SQLNode, node *ModifyColum a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -5739,16 +6116,20 @@ func (a *application) rewriteRefOfMultiLinestringExpr(parent SQLNode, node *Mult kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true } } - if !a.rewriteExprs(node, node.LinestringParams, func(newNode, parent SQLNode) { - parent.(*MultiLinestringExpr).LinestringParams = newNode.(Exprs) - }) { - return false + for x, el := range node.LinestringParams { + if !a.rewriteExpr(node, el, func(idx int) replacerFunc { + return func(newNode, parent SQLNode) { + parent.(*MultiLinestringExpr).LinestringParams[idx] = newNode.(Expr) + } + }(x)) { + return false + } } if a.post != nil { a.cur.replacer = replacer @@ -5771,16 +6152,20 @@ func (a *application) rewriteRefOfMultiPointExpr(parent SQLNode, node *MultiPoin kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true } } - if !a.rewriteExprs(node, node.PointParams, func(newNode, parent SQLNode) { - parent.(*MultiPointExpr).PointParams = newNode.(Exprs) - }) { - return false + for x, el := range node.PointParams { + if !a.rewriteExpr(node, el, func(idx int) replacerFunc { + return func(newNode, parent SQLNode) { + parent.(*MultiPointExpr).PointParams[idx] = newNode.(Expr) + } + }(x)) { + return false + } } if a.post != nil { a.cur.replacer = replacer @@ -5803,16 +6188,20 @@ func (a *application) rewriteRefOfMultiPolygonExpr(parent SQLNode, node *MultiPo kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true } } - if !a.rewriteExprs(node, node.PolygonParams, func(newNode, parent SQLNode) { - parent.(*MultiPolygonExpr).PolygonParams = newNode.(Exprs) - }) { - return false + for x, el := range node.PolygonParams { + if !a.rewriteExpr(node, el, func(idx int) replacerFunc { + return func(newNode, parent SQLNode) { + parent.(*MultiPolygonExpr).PolygonParams[idx] = newNode.(Expr) + } + }(x)) { + return false + } } if a.post != nil { a.cur.replacer = replacer @@ -5835,7 +6224,7 @@ func (a *application) rewriteRefOfNTHValueExpr(parent SQLNode, node *NTHValueExp kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -5887,7 +6276,7 @@ func (a *application) rewriteRefOfNamedWindow(parent SQLNode, node *NamedWindow, kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -5918,9 +6307,8 @@ func (a *application) rewriteNamedWindows(parent SQLNode, node NamedWindows, rep a.cur.node = node kontinue := !a.pre(&a.cur) if a.cur.revisit { - node = a.cur.node.(NamedWindows) a.cur.revisit = false - return a.rewriteNamedWindows(parent, node, replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -5953,7 +6341,12 @@ func (a *application) rewriteRefOfNextval(parent SQLNode, node *Nextval, replace a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -5983,7 +6376,7 @@ func (a *application) rewriteRefOfNotExpr(parent SQLNode, node *NotExpr, replace kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -6015,7 +6408,7 @@ func (a *application) rewriteRefOfNtileExpr(parent SQLNode, node *NtileExpr, rep kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -6049,7 +6442,12 @@ func (a *application) rewriteRefOfNullTreatmentClause(parent SQLNode, node *Null a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -6076,7 +6474,7 @@ func (a *application) rewriteRefOfNullVal(parent SQLNode, node *NullVal, replace kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -6105,7 +6503,7 @@ func (a *application) rewriteRefOfOffset(parent SQLNode, node *Offset, replacer kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -6136,9 +6534,8 @@ func (a *application) rewriteOnDup(parent SQLNode, node OnDup, replacer replacer a.cur.node = node kontinue := !a.pre(&a.cur) if a.cur.revisit { - node = a.cur.node.(OnDup) a.cur.revisit = false - return a.rewriteOnDup(parent, node, replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -6171,7 +6568,12 @@ func (a *application) rewriteRefOfOptLike(parent SQLNode, node *OptLike, replace a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -6201,7 +6603,7 @@ func (a *application) rewriteRefOfOrExpr(parent SQLNode, node *OrExpr, replacer kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -6235,7 +6637,12 @@ func (a *application) rewriteRefOfOrder(parent SQLNode, node *Order, replacer re a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -6264,9 +6671,8 @@ func (a *application) rewriteOrderBy(parent SQLNode, node OrderBy, replacer repl a.cur.node = node kontinue := !a.pre(&a.cur) if a.cur.revisit { - node = a.cur.node.(OrderBy) a.cur.revisit = false - return a.rewriteOrderBy(parent, node, replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -6299,7 +6705,12 @@ func (a *application) rewriteRefOfOrderByOption(parent SQLNode, node *OrderByOpt a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -6326,7 +6737,12 @@ func (a *application) rewriteRefOfOtherAdmin(parent SQLNode, node *OtherAdmin, r a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -6350,7 +6766,12 @@ func (a *application) rewriteRefOfOverClause(parent SQLNode, node *OverClause, r a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -6382,7 +6803,12 @@ func (a *application) rewriteRefOfParenTableExpr(parent SQLNode, node *ParenTabl a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -6409,7 +6835,12 @@ func (a *application) rewriteRefOfParsedComments(parent SQLNode, node *ParsedCom a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -6433,7 +6864,12 @@ func (a *application) rewriteRefOfPartitionDefinition(parent SQLNode, node *Part a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -6465,7 +6901,12 @@ func (a *application) rewriteRefOfPartitionDefinitionOptions(parent SQLNode, nod a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -6517,7 +6958,12 @@ func (a *application) rewriteRefOfPartitionEngine(parent SQLNode, node *Partitio a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -6541,7 +6987,12 @@ func (a *application) rewriteRefOfPartitionOption(parent SQLNode, node *Partitio a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -6587,7 +7038,12 @@ func (a *application) rewriteRefOfPartitionSpec(parent SQLNode, node *PartitionS a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -6633,7 +7089,12 @@ func (a *application) rewriteRefOfPartitionValueRange(parent SQLNode, node *Part a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -6662,9 +7123,8 @@ func (a *application) rewritePartitions(parent SQLNode, node Partitions, replace a.cur.node = node kontinue := !a.pre(&a.cur) if a.cur.revisit { - node = a.cur.node.(Partitions) a.cur.revisit = false - return a.rewritePartitions(parent, node, replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -6700,7 +7160,7 @@ func (a *application) rewriteRefOfPerformanceSchemaFuncExpr(parent SQLNode, node kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -6732,7 +7192,7 @@ func (a *application) rewriteRefOfPointExpr(parent SQLNode, node *PointExpr, rep kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -6769,7 +7229,7 @@ func (a *application) rewriteRefOfPointPropertyFuncExpr(parent SQLNode, node *Po kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -6806,16 +7266,20 @@ func (a *application) rewriteRefOfPolygonExpr(parent SQLNode, node *PolygonExpr, kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true } } - if !a.rewriteExprs(node, node.LinestringParams, func(newNode, parent SQLNode) { - parent.(*PolygonExpr).LinestringParams = newNode.(Exprs) - }) { - return false + for x, el := range node.LinestringParams { + if !a.rewriteExpr(node, el, func(idx int) replacerFunc { + return func(newNode, parent SQLNode) { + parent.(*PolygonExpr).LinestringParams[idx] = newNode.(Expr) + } + }(x)) { + return false + } } if a.post != nil { a.cur.replacer = replacer @@ -6838,7 +7302,7 @@ func (a *application) rewriteRefOfPolygonPropertyFuncExpr(parent SQLNode, node * kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -6872,7 +7336,12 @@ func (a *application) rewriteRefOfPrepareStmt(parent SQLNode, node *PrepareStmt, a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -6909,7 +7378,12 @@ func (a *application) rewriteRefOfPurgeBinaryLogs(parent SQLNode, node *PurgeBin a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -6933,7 +7407,12 @@ func (a *application) rewriteRefOfReferenceDefinition(parent SQLNode, node *Refe a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -6983,7 +7462,7 @@ func (a *application) rewriteRefOfRegexpInstrExpr(parent SQLNode, node *RegexpIn kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -7040,7 +7519,7 @@ func (a *application) rewriteRefOfRegexpLikeExpr(parent SQLNode, node *RegexpLik kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -7082,7 +7561,7 @@ func (a *application) rewriteRefOfRegexpReplaceExpr(parent SQLNode, node *Regexp kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -7139,7 +7618,7 @@ func (a *application) rewriteRefOfRegexpSubstrExpr(parent SQLNode, node *RegexpS kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -7188,7 +7667,12 @@ func (a *application) rewriteRefOfRelease(parent SQLNode, node *Release, replace a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -7215,7 +7699,12 @@ func (a *application) rewriteRefOfRenameColumn(parent SQLNode, node *RenameColum a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -7247,7 +7736,12 @@ func (a *application) rewriteRefOfRenameIndex(parent SQLNode, node *RenameIndex, a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -7279,7 +7773,12 @@ func (a *application) rewriteRefOfRenameTable(parent SQLNode, node *RenameTable, a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -7303,7 +7802,12 @@ func (a *application) rewriteRefOfRenameTableName(parent SQLNode, node *RenameTa a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -7330,7 +7834,12 @@ func (a *application) rewriteRefOfRevertMigration(parent SQLNode, node *RevertMi a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -7357,7 +7866,12 @@ func (a *application) rewriteRefOfRollback(parent SQLNode, node *Rollback, repla a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -7378,7 +7892,12 @@ func (a *application) rewriteRootNode(parent SQLNode, node RootNode, replacer re a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -7405,7 +7924,12 @@ func (a *application) rewriteRefOfRowAlias(parent SQLNode, node *RowAlias, repla a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -7437,7 +7961,12 @@ func (a *application) rewriteRefOfSRollback(parent SQLNode, node *SRollback, rep a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -7464,7 +7993,12 @@ func (a *application) rewriteRefOfSavepoint(parent SQLNode, node *Savepoint, rep a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -7491,7 +8025,12 @@ func (a *application) rewriteRefOfSelect(parent SQLNode, node *Select, replacer a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -7514,8 +8053,8 @@ func (a *application) rewriteRefOfSelect(parent SQLNode, node *Select, replacer }) { return false } - if !a.rewriteSelectExprs(node, node.SelectExprs, func(newNode, parent SQLNode) { - parent.(*Select).SelectExprs = newNode.(SelectExprs) + if !a.rewriteRefOfSelectExprs(node, node.SelectExprs, func(newNode, parent SQLNode) { + parent.(*Select).SelectExprs = newNode.(*SelectExprs) }) { return false } @@ -7564,7 +8103,7 @@ func (a *application) rewriteRefOfSelect(parent SQLNode, node *Select, replacer } return true } -func (a *application) rewriteSelectExprs(parent SQLNode, node SelectExprs, replacer replacerFunc) bool { +func (a *application) rewriteRefOfSelectExprs(parent SQLNode, node *SelectExprs, replacer replacerFunc) bool { if node == nil { return true } @@ -7574,18 +8113,17 @@ func (a *application) rewriteSelectExprs(parent SQLNode, node SelectExprs, repla a.cur.node = node kontinue := !a.pre(&a.cur) if a.cur.revisit { - node = a.cur.node.(SelectExprs) a.cur.revisit = false - return a.rewriteSelectExprs(parent, node, replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true } } - for x, el := range node { + for x, el := range node.Exprs { if !a.rewriteSelectExpr(node, el, func(idx int) replacerFunc { return func(newNode, parent SQLNode) { - parent.(SelectExprs)[idx] = newNode.(SelectExpr) + parent.(*SelectExprs).Exprs[idx] = newNode.(SelectExpr) } }(x)) { return false @@ -7609,7 +8147,12 @@ func (a *application) rewriteRefOfSelectInto(parent SQLNode, node *SelectInto, r a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -7633,7 +8176,12 @@ func (a *application) rewriteRefOfSet(parent SQLNode, node *Set, replacer replac a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -7665,7 +8213,12 @@ func (a *application) rewriteRefOfSetExpr(parent SQLNode, node *SetExpr, replace a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -7699,9 +8252,8 @@ func (a *application) rewriteSetExprs(parent SQLNode, node SetExprs, replacer re a.cur.node = node kontinue := !a.pre(&a.cur) if a.cur.revisit { - node = a.cur.node.(SetExprs) a.cur.revisit = false - return a.rewriteSetExprs(parent, node, replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -7734,7 +8286,12 @@ func (a *application) rewriteRefOfShow(parent SQLNode, node *Show, replacer repl a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -7761,7 +8318,12 @@ func (a *application) rewriteRefOfShowBasic(parent SQLNode, node *ShowBasic, rep a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -7798,7 +8360,12 @@ func (a *application) rewriteRefOfShowCreate(parent SQLNode, node *ShowCreate, r a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -7825,7 +8392,12 @@ func (a *application) rewriteRefOfShowFilter(parent SQLNode, node *ShowFilter, r a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -7852,7 +8424,12 @@ func (a *application) rewriteRefOfShowMigrationLogs(parent SQLNode, node *ShowMi a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -7879,7 +8456,12 @@ func (a *application) rewriteRefOfShowOther(parent SQLNode, node *ShowOther, rep a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -7903,7 +8485,12 @@ func (a *application) rewriteRefOfShowThrottledApps(parent SQLNode, node *ShowTh a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -7927,7 +8514,12 @@ func (a *application) rewriteRefOfShowThrottlerStatus(parent SQLNode, node *Show a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -7951,7 +8543,12 @@ func (a *application) rewriteRefOfShowTransactionStatus(parent SQLNode, node *Sh a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -7975,7 +8572,12 @@ func (a *application) rewriteRefOfStarExpr(parent SQLNode, node *StarExpr, repla a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -8005,7 +8607,7 @@ func (a *application) rewriteRefOfStd(parent SQLNode, node *Std, replacer replac kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -8042,7 +8644,7 @@ func (a *application) rewriteRefOfStdDev(parent SQLNode, node *StdDev, replacer kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -8079,7 +8681,7 @@ func (a *application) rewriteRefOfStdPop(parent SQLNode, node *StdPop, replacer kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -8116,7 +8718,7 @@ func (a *application) rewriteRefOfStdSamp(parent SQLNode, node *StdSamp, replace kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -8150,7 +8752,12 @@ func (a *application) rewriteRefOfStream(parent SQLNode, node *Stream, replacer a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -8187,7 +8794,12 @@ func (a *application) rewriteRefOfSubPartition(parent SQLNode, node *SubPartitio a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -8219,7 +8831,12 @@ func (a *application) rewriteRefOfSubPartitionDefinition(parent SQLNode, node *S a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -8251,7 +8868,12 @@ func (a *application) rewriteRefOfSubPartitionDefinitionOptions(parent SQLNode, a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -8295,9 +8917,8 @@ func (a *application) rewriteSubPartitionDefinitions(parent SQLNode, node SubPar a.cur.node = node kontinue := !a.pre(&a.cur) if a.cur.revisit { - node = a.cur.node.(SubPartitionDefinitions) a.cur.revisit = false - return a.rewriteSubPartitionDefinitions(parent, node, replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -8333,7 +8954,7 @@ func (a *application) rewriteRefOfSubquery(parent SQLNode, node *Subquery, repla kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -8365,7 +8986,7 @@ func (a *application) rewriteRefOfSubstrExpr(parent SQLNode, node *SubstrExpr, r kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -8407,7 +9028,7 @@ func (a *application) rewriteRefOfSum(parent SQLNode, node *Sum, replacer replac kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -8443,9 +9064,8 @@ func (a *application) rewriteTableExprs(parent SQLNode, node TableExprs, replace a.cur.node = node kontinue := !a.pre(&a.cur) if a.cur.revisit { - node = a.cur.node.(TableExprs) a.cur.revisit = false - return a.rewriteTableExprs(parent, node, replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -8475,7 +9095,12 @@ func (a *application) rewriteTableName(parent SQLNode, node TableName, replacer a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -8509,9 +9134,8 @@ func (a *application) rewriteTableNames(parent SQLNode, node TableNames, replace a.cur.node = node kontinue := !a.pre(&a.cur) if a.cur.revisit { - node = a.cur.node.(TableNames) a.cur.revisit = false - return a.rewriteTableNames(parent, node, replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -8546,9 +9170,8 @@ func (a *application) rewriteTableOptions(parent SQLNode, node TableOptions, rep a.cur.node = node kontinue := !a.pre(&a.cur) if a.cur.revisit { - node = a.cur.node.(TableOptions) a.cur.revisit = false - return a.rewriteTableOptions(parent, node, replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -8574,7 +9197,12 @@ func (a *application) rewriteRefOfTableSpec(parent SQLNode, node *TableSpec, rep a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -8633,7 +9261,12 @@ func (a *application) rewriteRefOfTablespaceOperation(parent SQLNode, node *Tabl a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -8660,7 +9293,7 @@ func (a *application) rewriteRefOfTimestampDiffExpr(parent SQLNode, node *Timest kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -8697,7 +9330,7 @@ func (a *application) rewriteRefOfTrimFuncExpr(parent SQLNode, node *TrimFuncExp kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -8731,7 +9364,12 @@ func (a *application) rewriteRefOfTruncateTable(parent SQLNode, node *TruncateTa a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -8761,7 +9399,7 @@ func (a *application) rewriteRefOfUnaryExpr(parent SQLNode, node *UnaryExpr, rep kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -8790,7 +9428,12 @@ func (a *application) rewriteRefOfUnion(parent SQLNode, node *Union, replacer re a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -8842,7 +9485,12 @@ func (a *application) rewriteRefOfUnlockTables(parent SQLNode, node *UnlockTable a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -8866,7 +9514,12 @@ func (a *application) rewriteRefOfUpdate(parent SQLNode, node *Update, replacer a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -8927,7 +9580,12 @@ func (a *application) rewriteRefOfUpdateExpr(parent SQLNode, node *UpdateExpr, r a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -8961,9 +9619,8 @@ func (a *application) rewriteUpdateExprs(parent SQLNode, node UpdateExprs, repla a.cur.node = node kontinue := !a.pre(&a.cur) if a.cur.revisit { - node = a.cur.node.(UpdateExprs) a.cur.revisit = false - return a.rewriteUpdateExprs(parent, node, replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -8999,7 +9656,7 @@ func (a *application) rewriteRefOfUpdateXMLExpr(parent SQLNode, node *UpdateXMLE kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -9038,7 +9695,12 @@ func (a *application) rewriteRefOfUse(parent SQLNode, node *Use, replacer replac a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -9065,7 +9727,12 @@ func (a *application) rewriteRefOfVExplainStmt(parent SQLNode, node *VExplainStm a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -9097,7 +9764,12 @@ func (a *application) rewriteRefOfVStream(parent SQLNode, node *VStream, replace a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -9146,9 +9818,8 @@ func (a *application) rewriteValTuple(parent SQLNode, node ValTuple, replacer re a.cur.node = node kontinue := !a.pre(&a.cur) if a.cur.revisit { - node = a.cur.node.(ValTuple) a.cur.revisit = false - return a.rewriteValTuple(parent, node, replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -9181,7 +9852,12 @@ func (a *application) rewriteRefOfValidation(parent SQLNode, node *Validation, r a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -9207,9 +9883,8 @@ func (a *application) rewriteValues(parent SQLNode, node Values, replacer replac a.cur.node = node kontinue := !a.pre(&a.cur) if a.cur.revisit { - node = a.cur.node.(Values) a.cur.revisit = false - return a.rewriteValues(parent, node, replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -9245,7 +9920,7 @@ func (a *application) rewriteRefOfValuesFuncExpr(parent SQLNode, node *ValuesFun kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -9274,7 +9949,12 @@ func (a *application) rewriteRefOfValuesStatement(parent SQLNode, node *ValuesSt a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -9329,7 +10009,7 @@ func (a *application) rewriteRefOfVarPop(parent SQLNode, node *VarPop, replacer kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -9366,7 +10046,7 @@ func (a *application) rewriteRefOfVarSamp(parent SQLNode, node *VarSamp, replace kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -9403,7 +10083,7 @@ func (a *application) rewriteRefOfVariable(parent SQLNode, node *Variable, repla kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -9435,7 +10115,7 @@ func (a *application) rewriteRefOfVariance(parent SQLNode, node *Variance, repla kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -9466,7 +10146,12 @@ func (a *application) rewriteVindexParam(parent SQLNode, node VindexParam, repla a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -9493,7 +10178,12 @@ func (a *application) rewriteRefOfVindexSpec(parent SQLNode, node *VindexSpec, r a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -9537,7 +10227,7 @@ func (a *application) rewriteRefOfWeightStringFuncExpr(parent SQLNode, node *Wei kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -9571,7 +10261,12 @@ func (a *application) rewriteRefOfWhen(parent SQLNode, node *When, replacer repl a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -9603,7 +10298,12 @@ func (a *application) rewriteRefOfWhere(parent SQLNode, node *Where, replacer re a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -9630,7 +10330,12 @@ func (a *application) rewriteRefOfWindowDefinition(parent SQLNode, node *WindowD a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -9664,9 +10369,8 @@ func (a *application) rewriteWindowDefinitions(parent SQLNode, node WindowDefini a.cur.node = node kontinue := !a.pre(&a.cur) if a.cur.revisit { - node = a.cur.node.(WindowDefinitions) a.cur.revisit = false - return a.rewriteWindowDefinitions(parent, node, replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -9699,7 +10403,12 @@ func (a *application) rewriteRefOfWindowSpecification(parent SQLNode, node *Wind a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -9708,10 +10417,14 @@ func (a *application) rewriteRefOfWindowSpecification(parent SQLNode, node *Wind }) { return false } - if !a.rewriteExprs(node, node.PartitionClause, func(newNode, parent SQLNode) { - parent.(*WindowSpecification).PartitionClause = newNode.(Exprs) - }) { - return false + for x, el := range node.PartitionClause { + if !a.rewriteExpr(node, el, func(idx int) replacerFunc { + return func(newNode, parent SQLNode) { + parent.(*WindowSpecification).PartitionClause[idx] = newNode.(Expr) + } + }(x)) { + return false + } } if !a.rewriteOrderBy(node, node.OrderClause, func(newNode, parent SQLNode) { parent.(*WindowSpecification).OrderClause = newNode.(OrderBy) @@ -9741,7 +10454,12 @@ func (a *application) rewriteRefOfWith(parent SQLNode, node *With, replacer repl a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -9775,7 +10493,7 @@ func (a *application) rewriteRefOfXorExpr(parent SQLNode, node *XorExpr, replace kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -10630,7 +11348,12 @@ func (a *application) rewriteAlgorithmValue(parent SQLNode, node AlgorithmValue, a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -10654,7 +11377,7 @@ func (a *application) rewriteBoolVal(parent SQLNode, node BoolVal, replacer repl kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -10680,7 +11403,7 @@ func (a *application) rewriteListArg(parent SQLNode, node ListArg, replacer repl kontinue := !a.pre(&a.cur) if a.cur.revisit { a.cur.revisit = false - return a.rewriteExpr(parent, a.cur.node.(Expr), replacer) + return a.rewriteSQLNode(parent, a.cur.node, replacer) } if kontinue { return true @@ -10703,7 +11426,12 @@ func (a *application) rewriteMatchAction(parent SQLNode, node MatchAction, repla a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -10724,7 +11452,12 @@ func (a *application) rewriteReferenceAction(parent SQLNode, node ReferenceActio a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -10748,7 +11481,12 @@ func (a *application) rewriteRefOfIdentifierCI(parent SQLNode, node *IdentifierC a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -10772,7 +11510,12 @@ func (a *application) rewriteRefOfIdentifierCS(parent SQLNode, node *IdentifierC a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -10796,7 +11539,12 @@ func (a *application) rewriteRefOfRootNode(parent SQLNode, node *RootNode, repla a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -10823,7 +11571,12 @@ func (a *application) rewriteRefOfTableName(parent SQLNode, node *TableName, rep a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } @@ -10855,7 +11608,12 @@ func (a *application) rewriteRefOfVindexParam(parent SQLNode, node *VindexParam, a.cur.replacer = replacer a.cur.parent = parent a.cur.node = node - if !a.pre(&a.cur) { + kontinue := !a.pre(&a.cur) + if a.cur.revisit { + a.cur.revisit = false + return a.rewriteSQLNode(parent, a.cur.node, replacer) + } + if kontinue { return true } } diff --git a/go/vt/sqlparser/ast_visit.go b/go/vt/sqlparser/ast_visit.go index a7fbbe02118..b8ece9e3ae3 100644 --- a/go/vt/sqlparser/ast_visit.go +++ b/go/vt/sqlparser/ast_visit.go @@ -160,8 +160,8 @@ func VisitSQLNode(in SQLNode, f Visit) error { return VisitRefOfExplainStmt(in, f) case *ExplainTab: return VisitRefOfExplainTab(in, f) - case Exprs: - return VisitExprs(in, f) + case *Exprs: + return VisitRefOfExprs(in, f) case *ExtractFuncExpr: return VisitRefOfExtractFuncExpr(in, f) case *ExtractValueExpr: @@ -434,8 +434,8 @@ func VisitSQLNode(in SQLNode, f Visit) error { return VisitRefOfSavepoint(in, f) case *Select: return VisitRefOfSelect(in, f) - case SelectExprs: - return VisitSelectExprs(in, f) + case *SelectExprs: + return VisitRefOfSelectExprs(in, f) case *SelectInto: return VisitRefOfSelectInto(in, f) case *Set: @@ -999,8 +999,10 @@ func VisitRefOfCallProc(in *CallProc, f Visit) error { if err := VisitTableName(in.Name, f); err != nil { return err } - if err := VisitExprs(in.Params, f); err != nil { - return err + for _, el := range in.Params { + if err := VisitExpr(el, f); err != nil { + return err + } } return nil } @@ -1064,8 +1066,10 @@ func VisitRefOfCharExpr(in *CharExpr, f Visit) error { if cont, err := f(in); err != nil || !cont { return err } - if err := VisitExprs(in.Exprs, f); err != nil { - return err + for _, el := range in.Exprs { + if err := VisitExpr(el, f); err != nil { + return err + } } return nil } @@ -1258,8 +1262,10 @@ func VisitRefOfCount(in *Count, f Visit) error { if cont, err := f(in); err != nil || !cont { return err } - if err := VisitExprs(in.Args, f); err != nil { - return err + for _, el := range in.Args { + if err := VisitExpr(el, f); err != nil { + return err + } } if err := VisitRefOfOverClause(in.OverClause, f); err != nil { return err @@ -1558,14 +1564,14 @@ func VisitRefOfExplainTab(in *ExplainTab, f Visit) error { } return nil } -func VisitExprs(in Exprs, f Visit) error { +func VisitRefOfExprs(in *Exprs, f Visit) error { if in == nil { return nil } if cont, err := f(in); err != nil || !cont { return err } - for _, el := range in { + for _, el := range in.Exprs { if err := VisitExpr(el, f); err != nil { return err } @@ -1705,8 +1711,10 @@ func VisitRefOfFuncExpr(in *FuncExpr, f Visit) error { if err := VisitIdentifierCI(in.Name, f); err != nil { return err } - if err := VisitExprs(in.Exprs, f); err != nil { - return err + for _, el := range in.Exprs { + if err := VisitExpr(el, f); err != nil { + return err + } } return nil } @@ -1914,8 +1922,10 @@ func VisitRefOfGroupConcatExpr(in *GroupConcatExpr, f Visit) error { if cont, err := f(in); err != nil || !cont { return err } - if err := VisitExprs(in.Exprs, f); err != nil { - return err + for _, el := range in.Exprs { + if err := VisitExpr(el, f); err != nil { + return err + } } if err := VisitOrderBy(in.OrderBy, f); err != nil { return err @@ -2068,8 +2078,10 @@ func VisitRefOfIntervalFuncExpr(in *IntervalFuncExpr, f Visit) error { if err := VisitExpr(in.Expr, f); err != nil { return err } - if err := VisitExprs(in.Exprs, f); err != nil { - return err + for _, el := range in.Exprs { + if err := VisitExpr(el, f); err != nil { + return err + } } return nil } @@ -2119,8 +2131,10 @@ func VisitRefOfJSONArrayExpr(in *JSONArrayExpr, f Visit) error { if cont, err := f(in); err != nil || !cont { return err } - if err := VisitExprs(in.Params, f); err != nil { - return err + for _, el := range in.Params { + if err := VisitExpr(el, f); err != nil { + return err + } } return nil } @@ -2307,8 +2321,10 @@ func VisitRefOfJSONRemoveExpr(in *JSONRemoveExpr, f Visit) error { if err := VisitExpr(in.JSONDoc, f); err != nil { return err } - if err := VisitExprs(in.PathList, f); err != nil { - return err + for _, el := range in.PathList { + if err := VisitExpr(el, f); err != nil { + return err + } } return nil } @@ -2461,8 +2477,10 @@ func VisitRefOfJSONValueMergeExpr(in *JSONValueMergeExpr, f Visit) error { if err := VisitExpr(in.JSONDoc, f); err != nil { return err } - if err := VisitExprs(in.JSONDocList, f); err != nil { - return err + for _, el := range in.JSONDocList { + if err := VisitExpr(el, f); err != nil { + return err + } } return nil } @@ -2601,8 +2619,10 @@ func VisitRefOfLineStringExpr(in *LineStringExpr, f Visit) error { if cont, err := f(in); err != nil || !cont { return err } - if err := VisitExprs(in.PointParams, f); err != nil { - return err + for _, el := range in.PointParams { + if err := VisitExpr(el, f); err != nil { + return err + } } return nil } @@ -2774,8 +2794,10 @@ func VisitRefOfMultiLinestringExpr(in *MultiLinestringExpr, f Visit) error { if cont, err := f(in); err != nil || !cont { return err } - if err := VisitExprs(in.LinestringParams, f); err != nil { - return err + for _, el := range in.LinestringParams { + if err := VisitExpr(el, f); err != nil { + return err + } } return nil } @@ -2786,8 +2808,10 @@ func VisitRefOfMultiPointExpr(in *MultiPointExpr, f Visit) error { if cont, err := f(in); err != nil || !cont { return err } - if err := VisitExprs(in.PointParams, f); err != nil { - return err + for _, el := range in.PointParams { + if err := VisitExpr(el, f); err != nil { + return err + } } return nil } @@ -2798,8 +2822,10 @@ func VisitRefOfMultiPolygonExpr(in *MultiPolygonExpr, f Visit) error { if cont, err := f(in); err != nil || !cont { return err } - if err := VisitExprs(in.PolygonParams, f); err != nil { - return err + for _, el := range in.PolygonParams { + if err := VisitExpr(el, f); err != nil { + return err + } } return nil } @@ -3218,8 +3244,10 @@ func VisitRefOfPolygonExpr(in *PolygonExpr, f Visit) error { if cont, err := f(in); err != nil || !cont { return err } - if err := VisitExprs(in.LinestringParams, f); err != nil { - return err + for _, el := range in.LinestringParams { + if err := VisitExpr(el, f); err != nil { + return err + } } return nil } @@ -3535,7 +3563,7 @@ func VisitRefOfSelect(in *Select, f Visit) error { if err := VisitRefOfParsedComments(in.Comments, f); err != nil { return err } - if err := VisitSelectExprs(in.SelectExprs, f); err != nil { + if err := VisitRefOfSelectExprs(in.SelectExprs, f); err != nil { return err } if err := VisitRefOfWhere(in.Where, f); err != nil { @@ -3561,14 +3589,14 @@ func VisitRefOfSelect(in *Select, f Visit) error { } return nil } -func VisitSelectExprs(in SelectExprs, f Visit) error { +func VisitRefOfSelectExprs(in *SelectExprs, f Visit) error { if in == nil { return nil } if cont, err := f(in); err != nil || !cont { return err } - for _, el := range in { + for _, el := range in.Exprs { if err := VisitSelectExpr(el, f); err != nil { return err } @@ -4476,8 +4504,10 @@ func VisitRefOfWindowSpecification(in *WindowSpecification, f Visit) error { if err := VisitIdentifierCI(in.Name, f); err != nil { return err } - if err := VisitExprs(in.PartitionClause, f); err != nil { - return err + for _, el := range in.PartitionClause { + if err := VisitExpr(el, f); err != nil { + return err + } } if err := VisitOrderBy(in.OrderClause, f); err != nil { return err diff --git a/go/vt/sqlparser/cached_size.go b/go/vt/sqlparser/cached_size.go index 7183ff18e28..4f17041bdbe 100644 --- a/go/vt/sqlparser/cached_size.go +++ b/go/vt/sqlparser/cached_size.go @@ -564,7 +564,7 @@ func (cached *CallProc) CachedSize(alloc bool) int64 { } // field Name vitess.io/vitess/go/vt/sqlparser.TableName size += cached.Name.CachedSize(false) - // field Params vitess.io/vitess/go/vt/sqlparser.Exprs + // field Params []vitess.io/vitess/go/vt/sqlparser.Expr { size += hack.RuntimeAllocSize(int64(cap(cached.Params)) * int64(16)) for _, elem := range cached.Params { @@ -640,7 +640,7 @@ func (cached *CharExpr) CachedSize(alloc bool) int64 { if alloc { size += int64(48) } - // field Exprs vitess.io/vitess/go/vt/sqlparser.Exprs + // field Exprs []vitess.io/vitess/go/vt/sqlparser.Expr { size += hack.RuntimeAllocSize(int64(cap(cached.Exprs)) * int64(16)) for _, elem := range cached.Exprs { @@ -979,7 +979,7 @@ func (cached *Count) CachedSize(alloc bool) int64 { if alloc { size += int64(48) } - // field Args vitess.io/vitess/go/vt/sqlparser.Exprs + // field Args []vitess.io/vitess/go/vt/sqlparser.Expr { size += hack.RuntimeAllocSize(int64(cap(cached.Args)) * int64(16)) for _, elem := range cached.Args { @@ -1341,22 +1341,6 @@ func (cached *ExplainTab) CachedSize(alloc bool) int64 { size += hack.RuntimeAllocSize(int64(len(cached.Wild))) return size } -func (cached *Exprs) CachedSize(alloc bool) int64 { - if cached == nil { - return int64(0) - } - size := int64(0) - if alloc { - size += int64(24) - } - size += hack.RuntimeAllocSize(int64(cap(*cached)) * int64(16)) - for _, elem := range *cached { - if cc, ok := elem.(cachedObject); ok { - size += cc.CachedSize(true) - } - } - return size -} func (cached *ExtractFuncExpr) CachedSize(alloc bool) int64 { if cached == nil { return int64(0) @@ -1494,7 +1478,7 @@ func (cached *FuncExpr) CachedSize(alloc bool) int64 { size += cached.Qualifier.CachedSize(false) // field Name vitess.io/vitess/go/vt/sqlparser.IdentifierCI size += cached.Name.CachedSize(false) - // field Exprs vitess.io/vitess/go/vt/sqlparser.Exprs + // field Exprs []vitess.io/vitess/go/vt/sqlparser.Expr { size += hack.RuntimeAllocSize(int64(cap(cached.Exprs)) * int64(16)) for _, elem := range cached.Exprs { @@ -1754,7 +1738,7 @@ func (cached *GroupConcatExpr) CachedSize(alloc bool) int64 { if alloc { size += int64(80) } - // field Exprs vitess.io/vitess/go/vt/sqlparser.Exprs + // field Exprs []vitess.io/vitess/go/vt/sqlparser.Expr { size += hack.RuntimeAllocSize(int64(cap(cached.Exprs)) * int64(16)) for _, elem := range cached.Exprs { @@ -2004,7 +1988,7 @@ func (cached *IntervalFuncExpr) CachedSize(alloc bool) int64 { if cc, ok := cached.Expr.(cachedObject); ok { size += cc.CachedSize(true) } - // field Exprs vitess.io/vitess/go/vt/sqlparser.Exprs + // field Exprs []vitess.io/vitess/go/vt/sqlparser.Expr { size += hack.RuntimeAllocSize(int64(cap(cached.Exprs)) * int64(16)) for _, elem := range cached.Exprs { @@ -2069,7 +2053,7 @@ func (cached *JSONArrayExpr) CachedSize(alloc bool) int64 { if alloc { size += int64(24) } - // field Params vitess.io/vitess/go/vt/sqlparser.Exprs + // field Params []vitess.io/vitess/go/vt/sqlparser.Expr { size += hack.RuntimeAllocSize(int64(cap(cached.Params)) * int64(16)) for _, elem := range cached.Params { @@ -2306,7 +2290,7 @@ func (cached *JSONRemoveExpr) CachedSize(alloc bool) int64 { if cc, ok := cached.JSONDoc.(cachedObject); ok { size += cc.CachedSize(true) } - // field PathList vitess.io/vitess/go/vt/sqlparser.Exprs + // field PathList []vitess.io/vitess/go/vt/sqlparser.Expr { size += hack.RuntimeAllocSize(int64(cap(cached.PathList)) * int64(16)) for _, elem := range cached.PathList { @@ -2493,7 +2477,7 @@ func (cached *JSONValueMergeExpr) CachedSize(alloc bool) int64 { if cc, ok := cached.JSONDoc.(cachedObject); ok { size += cc.CachedSize(true) } - // field JSONDocList vitess.io/vitess/go/vt/sqlparser.Exprs + // field JSONDocList []vitess.io/vitess/go/vt/sqlparser.Expr { size += hack.RuntimeAllocSize(int64(cap(cached.JSONDocList)) * int64(16)) for _, elem := range cached.JSONDocList { @@ -2725,7 +2709,7 @@ func (cached *LineStringExpr) CachedSize(alloc bool) int64 { if alloc { size += int64(24) } - // field PointParams vitess.io/vitess/go/vt/sqlparser.Exprs + // field PointParams []vitess.io/vitess/go/vt/sqlparser.Expr { size += hack.RuntimeAllocSize(int64(cap(cached.PointParams)) * int64(16)) for _, elem := range cached.PointParams { @@ -2937,7 +2921,7 @@ func (cached *MultiLinestringExpr) CachedSize(alloc bool) int64 { if alloc { size += int64(24) } - // field LinestringParams vitess.io/vitess/go/vt/sqlparser.Exprs + // field LinestringParams []vitess.io/vitess/go/vt/sqlparser.Expr { size += hack.RuntimeAllocSize(int64(cap(cached.LinestringParams)) * int64(16)) for _, elem := range cached.LinestringParams { @@ -2956,7 +2940,7 @@ func (cached *MultiPointExpr) CachedSize(alloc bool) int64 { if alloc { size += int64(24) } - // field PointParams vitess.io/vitess/go/vt/sqlparser.Exprs + // field PointParams []vitess.io/vitess/go/vt/sqlparser.Expr { size += hack.RuntimeAllocSize(int64(cap(cached.PointParams)) * int64(16)) for _, elem := range cached.PointParams { @@ -2975,7 +2959,7 @@ func (cached *MultiPolygonExpr) CachedSize(alloc bool) int64 { if alloc { size += int64(24) } - // field PolygonParams vitess.io/vitess/go/vt/sqlparser.Exprs + // field PolygonParams []vitess.io/vitess/go/vt/sqlparser.Expr { size += hack.RuntimeAllocSize(int64(cap(cached.PolygonParams)) * int64(16)) for _, elem := range cached.PolygonParams { @@ -3480,7 +3464,7 @@ func (cached *PolygonExpr) CachedSize(alloc bool) int64 { if alloc { size += int64(24) } - // field LinestringParams vitess.io/vitess/go/vt/sqlparser.Exprs + // field LinestringParams []vitess.io/vitess/go/vt/sqlparser.Expr { size += hack.RuntimeAllocSize(int64(cap(cached.LinestringParams)) * int64(16)) for _, elem := range cached.LinestringParams { @@ -3826,7 +3810,7 @@ func (cached *Select) CachedSize(alloc bool) int64 { } size := int64(0) if alloc { - size += int64(176) + size += int64(160) } // field Cache *bool size += hack.RuntimeAllocSize(int64(1)) @@ -3843,15 +3827,8 @@ func (cached *Select) CachedSize(alloc bool) int64 { } // field Comments *vitess.io/vitess/go/vt/sqlparser.ParsedComments size += cached.Comments.CachedSize(true) - // field SelectExprs vitess.io/vitess/go/vt/sqlparser.SelectExprs - { - size += hack.RuntimeAllocSize(int64(cap(cached.SelectExprs)) * int64(16)) - for _, elem := range cached.SelectExprs { - if cc, ok := elem.(cachedObject); ok { - size += cc.CachedSize(true) - } - } - } + // field SelectExprs *vitess.io/vitess/go/vt/sqlparser.SelectExprs + size += cached.SelectExprs.CachedSize(true) // field Where *vitess.io/vitess/go/vt/sqlparser.Where size += cached.Where.CachedSize(true) // field GroupBy *vitess.io/vitess/go/vt/sqlparser.GroupBy @@ -3886,10 +3863,13 @@ func (cached *SelectExprs) CachedSize(alloc bool) int64 { if alloc { size += int64(24) } - size += hack.RuntimeAllocSize(int64(cap(*cached)) * int64(16)) - for _, elem := range *cached { - if cc, ok := elem.(cachedObject); ok { - size += cc.CachedSize(true) + // field Exprs []vitess.io/vitess/go/vt/sqlparser.SelectExpr + { + size += hack.RuntimeAllocSize(int64(cap(cached.Exprs)) * int64(16)) + for _, elem := range cached.Exprs { + if cc, ok := elem.(cachedObject); ok { + size += cc.CachedSize(true) + } } } return size @@ -4990,7 +4970,7 @@ func (cached *WindowSpecification) CachedSize(alloc bool) int64 { } // field Name vitess.io/vitess/go/vt/sqlparser.IdentifierCI size += cached.Name.CachedSize(false) - // field PartitionClause vitess.io/vitess/go/vt/sqlparser.Exprs + // field PartitionClause []vitess.io/vitess/go/vt/sqlparser.Expr { size += hack.RuntimeAllocSize(int64(cap(cached.PartitionClause)) * int64(16)) for _, elem := range cached.PartitionClause { diff --git a/go/vt/sqlparser/normalizer.go b/go/vt/sqlparser/normalizer.go index fb3813b7019..dffb90d52b8 100644 --- a/go/vt/sqlparser/normalizer.go +++ b/go/vt/sqlparser/normalizer.go @@ -748,7 +748,7 @@ func (nz *normalizer) unnestSubQueries(cursor *Cursor, subquery *Subquery) { return } - if len(sel.SelectExprs) != 1 || + if len(sel.SelectExprs.Exprs) != 1 || len(sel.OrderBy) != 0 || sel.GroupBy != nil || len(sel.From) != 1 || @@ -766,7 +766,7 @@ func (nz *normalizer) unnestSubQueries(cursor *Cursor, subquery *Subquery) { if !ok || table.Name.String() != "dual" { return } - expr, ok := sel.SelectExprs[0].(*AliasedExpr) + expr, ok := sel.SelectExprs.Exprs[0].(*AliasedExpr) if !ok { return } @@ -810,8 +810,8 @@ func (nz *normalizer) existsRewrite(cursor *Cursor, node *ExistsExpr) { // Simplify the subquery by selecting a constant. // WHERE EXISTS(SELECT 1 FROM ...) - sel.SelectExprs = SelectExprs{ - &AliasedExpr{Expr: NewIntLiteral("1")}, + sel.SelectExprs = &SelectExprs{ + Exprs: []SelectExpr{&AliasedExpr{Expr: NewIntLiteral("1")}}, } sel.GroupBy = nil } diff --git a/go/vt/sqlparser/parsed_query_test.go b/go/vt/sqlparser/parsed_query_test.go index 26b9855b0f0..07ff0165982 100644 --- a/go/vt/sqlparser/parsed_query_test.go +++ b/go/vt/sqlparser/parsed_query_test.go @@ -296,8 +296,8 @@ func TestCastBindVars(t *testing.T) { } s := &Select{ - SelectExprs: SelectExprs{ - NewAliasedExpr(argument, ""), + SelectExprs: &SelectExprs{ + Exprs: []SelectExpr{NewAliasedExpr(argument, "")}, }, } diff --git a/go/vt/sqlparser/parser.go b/go/vt/sqlparser/parser.go index 8af0018db2a..c8850559cdc 100644 --- a/go/vt/sqlparser/parser.go +++ b/go/vt/sqlparser/parser.go @@ -144,7 +144,7 @@ func (p *Parser) ParseExpr(sql string) (Expr, error) { if err != nil { return nil, err } - aliasedExpr := stmt.(*Select).SelectExprs[0].(*AliasedExpr) + aliasedExpr := stmt.(*Select).SelectExprs.Exprs[0].(*AliasedExpr) return aliasedExpr.Expr, err } diff --git a/go/vt/sqlparser/precedence_test.go b/go/vt/sqlparser/precedence_test.go index 690e6df8647..8ea3fbe1446 100644 --- a/go/vt/sqlparser/precedence_test.go +++ b/go/vt/sqlparser/precedence_test.go @@ -84,7 +84,7 @@ func TestPlusStarPrecedence(t *testing.T) { t.Error(err) continue } - expr := readable(tree.(*Select).SelectExprs[0].(*AliasedExpr).Expr) + expr := readable(tree.(*Select).SelectExprs.Exprs[0].(*AliasedExpr).Expr) if expr != tcase.output { t.Errorf("Parse: \n%s, want: \n%s", expr, tcase.output) } diff --git a/go/vt/sqlparser/predicate_rewriting.go b/go/vt/sqlparser/predicate_rewriting.go index 234a2f4acd5..4dd4c09556d 100644 --- a/go/vt/sqlparser/predicate_rewriting.go +++ b/go/vt/sqlparser/predicate_rewriting.go @@ -213,7 +213,7 @@ func simplifyAnd(expr *AndExpr) (Expr, bool) { // And rewrite that to WHERE (a, b) IN ((1,11), (2,12), (3,13)) func ExtractINFromOR(expr *OrExpr) []Expr { var varNames []*ColName - var values []Exprs + var values [][]Expr orSlice := orToSlice(expr) for _, expr := range orSlice { andSlice := andToSlice(expr) diff --git a/go/vt/sqlparser/random_expr.go b/go/vt/sqlparser/random_expr.go index f5b394b36fe..b6038119663 100644 --- a/go/vt/sqlparser/random_expr.go +++ b/go/vt/sqlparser/random_expr.go @@ -246,7 +246,9 @@ func (g *Generator) randomAggregate(genConfig ExprGeneratorConfig) Expr { options := []exprF{ func() Expr { return &CountStar{} }, - func() Expr { return &Count{Args: Exprs{g.Expression(genConfig.anyTypeConfig())}, Distinct: isDistinct} }, + func() Expr { + return &Count{Args: []Expr{g.Expression(genConfig.anyTypeConfig())}, Distinct: isDistinct} + }, func() Expr { return &Sum{Arg: g.Expression(genConfig), Distinct: isDistinct} }, func() Expr { return &Min{Arg: g.Expression(genConfig), Distinct: isDistinct} }, func() Expr { return &Max{Arg: g.Expression(genConfig), Distinct: isDistinct} }, @@ -269,7 +271,7 @@ func (g *Generator) booleanExpr(genConfig ExprGeneratorConfig) Expr { func() Expr { return g.orExpr(genConfig) }, func() Expr { return g.comparison(genConfig.intTypeConfig()) }, func() Expr { return g.comparison(genConfig.stringTypeConfig()) }, - //func() Expr { return g.comparison(genConfig) }, // this is not accepted by the parser + // func() Expr { return g.comparison(genConfig) }, // this is not accepted by the parser func() Expr { return g.inExpr(genConfig) }, func() Expr { return g.existsExpr(genConfig) }, func() Expr { return g.between(genConfig.intTypeConfig()) }, @@ -374,7 +376,7 @@ func (g *Generator) randomBool(prob float32) bool { } func (g *Generator) intLiteral() Expr { - t := fmt.Sprintf("%d", rand.IntN(100)-rand.IntN(100)) //nolint SA4000 + t := fmt.Sprintf("%d", rand.IntN(100)-rand.IntN(100)) // nolint SA4000 return NewIntLiteral(t) } @@ -566,7 +568,7 @@ func (g *Generator) existsExpr(genConfig ExprGeneratorConfig) Expr { } else { // if g.subqueryExpr doesn't return a valid subquery, replace with // select 1 - selectExprs := SelectExprs{NewAliasedExpr(NewIntLiteral("1"), "")} + selectExprs := &SelectExprs{Exprs: []SelectExpr{NewAliasedExpr(NewIntLiteral("1"), "")}} from := TableExprs{NewAliasedTableExpr(NewTableName("dual"), "")} expr = NewExistsExpr(NewSubquery(NewSelect(nil, selectExprs, nil, nil, from, nil, nil, nil, nil))) } diff --git a/go/vt/sqlparser/rewriter_api.go b/go/vt/sqlparser/rewriter_api.go index cfcf75fa0f9..5dc4b30cc59 100644 --- a/go/vt/sqlparser/rewriter_api.go +++ b/go/vt/sqlparser/rewriter_api.go @@ -125,14 +125,6 @@ func (c *Cursor) ReplacerF() func(newNode SQLNode) { // When used, this will abort the visitation of the current node - no post or children visited, // and the new node visited. func (c *Cursor) ReplaceAndRevisit(newNode SQLNode) { - switch newNode.(type) { - case SelectExprs, Expr: - default: - // We need to add support to the generated code for when to look at the revisit flag. At the moment it is only - // there for slices of SQLNode implementations - panic("no support added for this type yet") - } - c.replacer(newNode, c.parent) c.node = newNode c.revisit = true diff --git a/go/vt/sqlparser/rewriter_test.go b/go/vt/sqlparser/rewriter_test.go index 628d6fbd0a4..b7d24406677 100644 --- a/go/vt/sqlparser/rewriter_test.go +++ b/go/vt/sqlparser/rewriter_test.go @@ -49,10 +49,10 @@ func TestReplaceWorksInLaterCalls(t *testing.T) { Rewrite(stmt, func(cursor *Cursor) bool { switch node := cursor.Node().(type) { case *Select: - node.SelectExprs[0] = &AliasedExpr{ + node.SelectExprs.Exprs[0] = &AliasedExpr{ Expr: NewStrLiteral("apa"), } - node.SelectExprs = append(node.SelectExprs, &AliasedExpr{ + node.SelectExprs.Exprs = append(node.SelectExprs.Exprs, &AliasedExpr{ Expr: NewStrLiteral("foobar"), }) case *StarExpr: @@ -73,8 +73,8 @@ func TestReplaceAndRevisitWorksInLaterCalls(t *testing.T) { count := 0 Rewrite(stmt, func(cursor *Cursor) bool { switch node := cursor.Node().(type) { - case SelectExprs: - if len(node) != 1 { + case *SelectExprs: + if len(node.Exprs) != 1 { return true } expr1 := &AliasedExpr{ @@ -83,7 +83,7 @@ func TestReplaceAndRevisitWorksInLaterCalls(t *testing.T) { expr2 := &AliasedExpr{ Expr: NewStrLiteral("foobar"), } - cursor.ReplaceAndRevisit(SelectExprs{expr1, expr2}) + cursor.ReplaceAndRevisit(&SelectExprs{Exprs: []SelectExpr{expr1, expr2}}) case *StarExpr: t.Errorf("should not have seen the star") case *Literal: diff --git a/go/vt/sqlparser/sql.go b/go/vt/sqlparser/sql.go index ff9bc5cb71f..ef2036265e6 100644 --- a/go/vt/sqlparser/sql.go +++ b/go/vt/sqlparser/sql.go @@ -7806,7 +7806,7 @@ var yyPgo = [...]int{ 139, 2744, 2725, 2716, 0, 1034, 125, 2688, 202, } -//line sql.y:8820 +//line sql.y:8822 type yySymType struct { union any empty struct{} @@ -7990,8 +7990,8 @@ func (st *yySymType) exprUnion() Expr { return v } -func (st *yySymType) exprsUnion() Exprs { - v, _ := st.union.(Exprs) +func (st *yySymType) exprsUnion() []Expr { + v, _ := st.union.([]Expr) return v } @@ -8320,8 +8320,8 @@ func (st *yySymType) selectExprUnion() SelectExpr { return v } -func (st *yySymType) selectExprsUnion() SelectExprs { - v, _ := st.union.(SelectExprs) +func (st *yySymType) selectExprsUnion() *SelectExprs { + v, _ := st.union.(*SelectExprs) return v } @@ -10564,7 +10564,7 @@ yydefault: var yyLOCAL TableStatement //line sql.y:837 { - yyLOCAL = NewSelect(Comments(yyDollar[2].strs), SelectExprs{&Nextval{Expr: yyDollar[5].exprUnion()}}, []string{yyDollar[3].str} /*options*/, nil, TableExprs{&AliasedTableExpr{Expr: yyDollar[7].tableName}}, nil /*where*/, nil /*groupBy*/, nil /*having*/, nil) + yyLOCAL = NewSelect(Comments(yyDollar[2].strs), &SelectExprs{Exprs: []SelectExpr{&Nextval{Expr: yyDollar[5].exprUnion()}}}, []string{yyDollar[3].str} /*options*/, nil, TableExprs{&AliasedTableExpr{Expr: yyDollar[7].tableName}}, nil /*where*/, nil /*groupBy*/, nil /*having*/, nil) } yyVAL.union = yyLOCAL case 65: @@ -17100,23 +17100,26 @@ yydefault: } case 929: yyDollar = yyS[yypt-1 : yypt+1] - var yyLOCAL SelectExprs + var yyLOCAL *SelectExprs //line sql.y:4937 { - yyLOCAL = SelectExprs{yyDollar[1].selectExprUnion()} + yyLOCAL = &SelectExprs{Exprs: []SelectExpr{yyDollar[1].selectExprUnion()}} } yyVAL.union = yyLOCAL case 930: yyDollar = yyS[yypt-3 : yypt+1] + var yyLOCAL *SelectExprs //line sql.y:4941 { - yySLICE := (*SelectExprs)(yyIaddr(yyVAL.union)) - *yySLICE = append(*yySLICE, yyDollar[3].selectExprUnion()) + res := yyDollar[1].selectExprsUnion() + res.Exprs = append(res.Exprs, yyDollar[3].selectExprUnion()) + yyLOCAL = res } + yyVAL.union = yyLOCAL case 931: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL SelectExpr -//line sql.y:4947 +//line sql.y:4949 { yyLOCAL = &StarExpr{} } @@ -17124,7 +17127,7 @@ yydefault: case 932: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL SelectExpr -//line sql.y:4951 +//line sql.y:4953 { yyLOCAL = &AliasedExpr{Expr: yyDollar[1].exprUnion(), As: yyDollar[2].identifierCI} } @@ -17132,7 +17135,7 @@ yydefault: case 933: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL SelectExpr -//line sql.y:4955 +//line sql.y:4957 { yyLOCAL = &StarExpr{TableName: TableName{Name: yyDollar[1].identifierCS}} } @@ -17140,39 +17143,39 @@ yydefault: case 934: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL SelectExpr -//line sql.y:4959 +//line sql.y:4961 { yyLOCAL = &StarExpr{TableName: TableName{Qualifier: yyDollar[1].identifierCS, Name: yyDollar[3].identifierCS}} } yyVAL.union = yyLOCAL case 935: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:4964 +//line sql.y:4966 { yyVAL.identifierCI = IdentifierCI{} } case 936: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:4968 +//line sql.y:4970 { yyVAL.identifierCI = yyDollar[1].identifierCI } case 937: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:4972 +//line sql.y:4974 { yyVAL.identifierCI = yyDollar[2].identifierCI } case 939: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:4979 +//line sql.y:4981 { yyVAL.identifierCI = NewIdentifierCI(string(yyDollar[1].str)) } case 940: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL TableExprs -//line sql.y:4984 +//line sql.y:4986 { yyLOCAL = TableExprs{&AliasedTableExpr{Expr: TableName{Name: NewIdentifierCS("dual")}}} } @@ -17180,7 +17183,7 @@ yydefault: case 941: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL TableExprs -//line sql.y:4988 +//line sql.y:4990 { yyLOCAL = yyDollar[1].tableExprsUnion() } @@ -17188,7 +17191,7 @@ yydefault: case 942: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL TableExprs -//line sql.y:4994 +//line sql.y:4996 { yyLOCAL = yyDollar[2].tableExprsUnion() } @@ -17196,14 +17199,14 @@ yydefault: case 943: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL TableExprs -//line sql.y:5000 +//line sql.y:5002 { yyLOCAL = TableExprs{yyDollar[1].tableExprUnion()} } yyVAL.union = yyLOCAL case 944: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:5004 +//line sql.y:5006 { yySLICE := (*TableExprs)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, yyDollar[3].tableExprUnion()) @@ -17211,7 +17214,7 @@ yydefault: case 947: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL TableExpr -//line sql.y:5014 +//line sql.y:5016 { yyLOCAL = yyDollar[1].aliasedTableNameUnion() } @@ -17219,7 +17222,7 @@ yydefault: case 948: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL TableExpr -//line sql.y:5018 +//line sql.y:5020 { yyLOCAL = &AliasedTableExpr{Expr: yyDollar[1].derivedTableUnion(), As: yyDollar[3].identifierCS, Columns: yyDollar[4].columnsUnion()} } @@ -17227,7 +17230,7 @@ yydefault: case 949: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL TableExpr -//line sql.y:5022 +//line sql.y:5024 { yyLOCAL = &ParenTableExpr{Exprs: yyDollar[2].tableExprsUnion()} } @@ -17235,7 +17238,7 @@ yydefault: case 950: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL TableExpr -//line sql.y:5026 +//line sql.y:5028 { yyLOCAL = yyDollar[1].tableExprUnion() } @@ -17243,7 +17246,7 @@ yydefault: case 951: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL *DerivedTable -//line sql.y:5032 +//line sql.y:5034 { yyLOCAL = &DerivedTable{Lateral: false, Select: yyDollar[1].tableStmtUnion()} } @@ -17251,7 +17254,7 @@ yydefault: case 952: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *DerivedTable -//line sql.y:5036 +//line sql.y:5038 { yyLOCAL = &DerivedTable{Lateral: true, Select: yyDollar[2].tableStmtUnion()} } @@ -17259,7 +17262,7 @@ yydefault: case 953: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *AliasedTableExpr -//line sql.y:5042 +//line sql.y:5044 { yyLOCAL = &AliasedTableExpr{Expr: yyDollar[1].tableName, As: yyDollar[2].identifierCS, Hints: yyDollar[3].indexHintsUnion()} } @@ -17267,7 +17270,7 @@ yydefault: case 954: yyDollar = yyS[yypt-7 : yypt+1] var yyLOCAL *AliasedTableExpr -//line sql.y:5046 +//line sql.y:5048 { yyLOCAL = &AliasedTableExpr{Expr: yyDollar[1].tableName, Partitions: yyDollar[4].partitionsUnion(), As: yyDollar[6].identifierCS, Hints: yyDollar[7].indexHintsUnion()} } @@ -17275,7 +17278,7 @@ yydefault: case 955: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL Columns -//line sql.y:5051 +//line sql.y:5053 { yyLOCAL = nil } @@ -17283,7 +17286,7 @@ yydefault: case 956: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Columns -//line sql.y:5055 +//line sql.y:5057 { yyLOCAL = yyDollar[2].columnsUnion() } @@ -17291,7 +17294,7 @@ yydefault: case 957: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL Columns -//line sql.y:5060 +//line sql.y:5062 { yyLOCAL = nil } @@ -17299,7 +17302,7 @@ yydefault: case 958: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Columns -//line sql.y:5064 +//line sql.y:5066 { yyLOCAL = yyDollar[1].columnsUnion() } @@ -17307,14 +17310,14 @@ yydefault: case 959: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Columns -//line sql.y:5070 +//line sql.y:5072 { yyLOCAL = Columns{yyDollar[1].identifierCI} } yyVAL.union = yyLOCAL case 960: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:5074 +//line sql.y:5076 { yySLICE := (*Columns)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, yyDollar[3].identifierCI) @@ -17322,14 +17325,14 @@ yydefault: case 961: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL []*Variable -//line sql.y:5080 +//line sql.y:5082 { yyLOCAL = []*Variable{yyDollar[1].variableUnion()} } yyVAL.union = yyLOCAL case 962: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:5084 +//line sql.y:5086 { yySLICE := (*[]*Variable)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, yyDollar[3].variableUnion()) @@ -17337,7 +17340,7 @@ yydefault: case 963: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Columns -//line sql.y:5090 +//line sql.y:5092 { yyLOCAL = Columns{yyDollar[1].identifierCI} } @@ -17345,21 +17348,21 @@ yydefault: case 964: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Columns -//line sql.y:5094 +//line sql.y:5096 { yyLOCAL = Columns{NewIdentifierCI(string(yyDollar[1].str))} } yyVAL.union = yyLOCAL case 965: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:5098 +//line sql.y:5100 { yySLICE := (*Columns)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, yyDollar[3].identifierCI) } case 966: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:5102 +//line sql.y:5104 { yySLICE := (*Columns)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, NewIdentifierCI(string(yyDollar[3].str))) @@ -17367,14 +17370,14 @@ yydefault: case 967: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Partitions -//line sql.y:5108 +//line sql.y:5110 { yyLOCAL = Partitions{yyDollar[1].identifierCI} } yyVAL.union = yyLOCAL case 968: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:5112 +//line sql.y:5114 { yySLICE := (*Partitions)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, yyDollar[3].identifierCI) @@ -17382,7 +17385,7 @@ yydefault: case 969: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL TableExpr -//line sql.y:5125 +//line sql.y:5127 { yyLOCAL = &JoinTableExpr{LeftExpr: yyDollar[1].tableExprUnion(), Join: yyDollar[2].joinTypeUnion(), RightExpr: yyDollar[3].tableExprUnion(), Condition: yyDollar[4].joinCondition} } @@ -17390,7 +17393,7 @@ yydefault: case 970: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL TableExpr -//line sql.y:5129 +//line sql.y:5131 { yyLOCAL = &JoinTableExpr{LeftExpr: yyDollar[1].tableExprUnion(), Join: yyDollar[2].joinTypeUnion(), RightExpr: yyDollar[3].tableExprUnion(), Condition: yyDollar[4].joinCondition} } @@ -17398,7 +17401,7 @@ yydefault: case 971: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL TableExpr -//line sql.y:5133 +//line sql.y:5135 { yyLOCAL = &JoinTableExpr{LeftExpr: yyDollar[1].tableExprUnion(), Join: yyDollar[2].joinTypeUnion(), RightExpr: yyDollar[3].tableExprUnion(), Condition: yyDollar[4].joinCondition} } @@ -17406,87 +17409,87 @@ yydefault: case 972: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL TableExpr -//line sql.y:5137 +//line sql.y:5139 { yyLOCAL = &JoinTableExpr{LeftExpr: yyDollar[1].tableExprUnion(), Join: yyDollar[2].joinTypeUnion(), RightExpr: yyDollar[3].tableExprUnion()} } yyVAL.union = yyLOCAL case 973: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:5143 +//line sql.y:5145 { yyVAL.joinCondition = &JoinCondition{On: yyDollar[2].exprUnion()} } case 974: yyDollar = yyS[yypt-4 : yypt+1] -//line sql.y:5145 +//line sql.y:5147 { yyVAL.joinCondition = &JoinCondition{Using: yyDollar[3].columnsUnion()} } case 975: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:5149 +//line sql.y:5151 { yyVAL.joinCondition = &JoinCondition{} } case 976: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:5151 +//line sql.y:5153 { yyVAL.joinCondition = yyDollar[1].joinCondition } case 977: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:5155 +//line sql.y:5157 { yyVAL.joinCondition = &JoinCondition{} } case 978: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:5157 +//line sql.y:5159 { yyVAL.joinCondition = &JoinCondition{On: yyDollar[2].exprUnion()} } case 979: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:5160 +//line sql.y:5162 { yyVAL.empty = struct{}{} } case 980: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:5162 +//line sql.y:5164 { yyVAL.empty = struct{}{} } case 981: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:5165 +//line sql.y:5167 { yyVAL.identifierCS = NewIdentifierCS("") } case 982: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:5169 +//line sql.y:5171 { yyVAL.identifierCS = yyDollar[1].identifierCS } case 983: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:5173 +//line sql.y:5175 { yyVAL.identifierCS = yyDollar[2].identifierCS } case 985: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:5180 +//line sql.y:5182 { yyVAL.identifierCS = NewIdentifierCS(string(yyDollar[1].str)) } case 986: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL JoinType -//line sql.y:5186 +//line sql.y:5188 { yyLOCAL = NormalJoinType } @@ -17494,7 +17497,7 @@ yydefault: case 987: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL JoinType -//line sql.y:5190 +//line sql.y:5192 { yyLOCAL = NormalJoinType } @@ -17502,7 +17505,7 @@ yydefault: case 988: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL JoinType -//line sql.y:5194 +//line sql.y:5196 { yyLOCAL = NormalJoinType } @@ -17510,7 +17513,7 @@ yydefault: case 989: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL JoinType -//line sql.y:5200 +//line sql.y:5202 { yyLOCAL = StraightJoinType } @@ -17518,7 +17521,7 @@ yydefault: case 990: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL JoinType -//line sql.y:5206 +//line sql.y:5208 { yyLOCAL = LeftJoinType } @@ -17526,7 +17529,7 @@ yydefault: case 991: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL JoinType -//line sql.y:5210 +//line sql.y:5212 { yyLOCAL = LeftJoinType } @@ -17534,7 +17537,7 @@ yydefault: case 992: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL JoinType -//line sql.y:5214 +//line sql.y:5216 { yyLOCAL = RightJoinType } @@ -17542,7 +17545,7 @@ yydefault: case 993: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL JoinType -//line sql.y:5218 +//line sql.y:5220 { yyLOCAL = RightJoinType } @@ -17550,7 +17553,7 @@ yydefault: case 994: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL JoinType -//line sql.y:5224 +//line sql.y:5226 { yyLOCAL = NaturalJoinType } @@ -17558,7 +17561,7 @@ yydefault: case 995: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL JoinType -//line sql.y:5228 +//line sql.y:5230 { if yyDollar[2].joinTypeUnion() == LeftJoinType { yyLOCAL = NaturalLeftJoinType @@ -17569,38 +17572,38 @@ yydefault: yyVAL.union = yyLOCAL case 996: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:5238 +//line sql.y:5240 { yyVAL.tableName = yyDollar[2].tableName } case 997: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:5242 +//line sql.y:5244 { yyVAL.tableName = yyDollar[1].tableName } case 998: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:5248 +//line sql.y:5250 { yyVAL.tableName = TableName{Name: yyDollar[1].identifierCS} } case 999: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:5252 +//line sql.y:5254 { yyVAL.tableName = TableName{Qualifier: yyDollar[1].identifierCS, Name: yyDollar[3].identifierCS} } case 1000: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:5258 +//line sql.y:5260 { yyVAL.tableName = TableName{Name: yyDollar[1].identifierCS} } case 1001: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL IndexHints -//line sql.y:5263 +//line sql.y:5265 { yyLOCAL = nil } @@ -17608,7 +17611,7 @@ yydefault: case 1002: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IndexHints -//line sql.y:5267 +//line sql.y:5269 { yyLOCAL = yyDollar[1].indexHintsUnion() } @@ -17616,14 +17619,14 @@ yydefault: case 1003: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IndexHints -//line sql.y:5273 +//line sql.y:5275 { yyLOCAL = IndexHints{yyDollar[1].indexHintUnion()} } yyVAL.union = yyLOCAL case 1004: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:5277 +//line sql.y:5279 { yySLICE := (*IndexHints)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, yyDollar[2].indexHintUnion()) @@ -17631,7 +17634,7 @@ yydefault: case 1005: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL *IndexHint -//line sql.y:5283 +//line sql.y:5285 { yyLOCAL = &IndexHint{Type: UseOp, ForType: yyDollar[3].indexHintForTypeUnion(), Indexes: yyDollar[5].columnsUnion()} } @@ -17639,7 +17642,7 @@ yydefault: case 1006: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL *IndexHint -//line sql.y:5287 +//line sql.y:5289 { yyLOCAL = &IndexHint{Type: UseOp, ForType: yyDollar[3].indexHintForTypeUnion()} } @@ -17647,7 +17650,7 @@ yydefault: case 1007: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL *IndexHint -//line sql.y:5291 +//line sql.y:5293 { yyLOCAL = &IndexHint{Type: IgnoreOp, ForType: yyDollar[3].indexHintForTypeUnion(), Indexes: yyDollar[5].columnsUnion()} } @@ -17655,7 +17658,7 @@ yydefault: case 1008: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL *IndexHint -//line sql.y:5295 +//line sql.y:5297 { yyLOCAL = &IndexHint{Type: ForceOp, ForType: yyDollar[3].indexHintForTypeUnion(), Indexes: yyDollar[5].columnsUnion()} } @@ -17663,7 +17666,7 @@ yydefault: case 1009: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL *IndexHint -//line sql.y:5299 +//line sql.y:5301 { yyLOCAL = &IndexHint{Type: UseVindexOp, Indexes: yyDollar[4].columnsUnion()} } @@ -17671,7 +17674,7 @@ yydefault: case 1010: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL *IndexHint -//line sql.y:5303 +//line sql.y:5305 { yyLOCAL = &IndexHint{Type: IgnoreVindexOp, Indexes: yyDollar[4].columnsUnion()} } @@ -17679,7 +17682,7 @@ yydefault: case 1011: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL IndexHintForType -//line sql.y:5308 +//line sql.y:5310 { yyLOCAL = NoForType } @@ -17687,7 +17690,7 @@ yydefault: case 1012: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL IndexHintForType -//line sql.y:5312 +//line sql.y:5314 { yyLOCAL = JoinForType } @@ -17695,7 +17698,7 @@ yydefault: case 1013: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL IndexHintForType -//line sql.y:5316 +//line sql.y:5318 { yyLOCAL = OrderByForType } @@ -17703,7 +17706,7 @@ yydefault: case 1014: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL IndexHintForType -//line sql.y:5320 +//line sql.y:5322 { yyLOCAL = GroupByForType } @@ -17711,7 +17714,7 @@ yydefault: case 1015: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL Expr -//line sql.y:5326 +//line sql.y:5328 { yyLOCAL = nil } @@ -17719,7 +17722,7 @@ yydefault: case 1016: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Expr -//line sql.y:5330 +//line sql.y:5332 { yyLOCAL = yyDollar[2].exprUnion() } @@ -17727,7 +17730,7 @@ yydefault: case 1017: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Expr -//line sql.y:5337 +//line sql.y:5339 { yyLOCAL = &OrExpr{Left: yyDollar[1].exprUnion(), Right: yyDollar[3].exprUnion()} } @@ -17735,7 +17738,7 @@ yydefault: case 1018: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Expr -//line sql.y:5341 +//line sql.y:5343 { yyLOCAL = &XorExpr{Left: yyDollar[1].exprUnion(), Right: yyDollar[3].exprUnion()} } @@ -17743,7 +17746,7 @@ yydefault: case 1019: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Expr -//line sql.y:5345 +//line sql.y:5347 { yyLOCAL = &AndExpr{Left: yyDollar[1].exprUnion(), Right: yyDollar[3].exprUnion()} } @@ -17751,7 +17754,7 @@ yydefault: case 1020: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Expr -//line sql.y:5349 +//line sql.y:5351 { yyLOCAL = &NotExpr{Expr: yyDollar[2].exprUnion()} } @@ -17759,7 +17762,7 @@ yydefault: case 1021: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Expr -//line sql.y:5353 +//line sql.y:5355 { yyLOCAL = &IsExpr{Left: yyDollar[1].exprUnion(), Right: yyDollar[3].isExprOperatorUnion()} } @@ -17767,7 +17770,7 @@ yydefault: case 1022: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:5357 +//line sql.y:5359 { yyLOCAL = yyDollar[1].exprUnion() } @@ -17775,7 +17778,7 @@ yydefault: case 1023: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Expr -//line sql.y:5361 +//line sql.y:5363 { yyLOCAL = &AssignmentExpr{Left: yyDollar[1].variableUnion(), Right: yyDollar[3].exprUnion()} } @@ -17783,25 +17786,25 @@ yydefault: case 1024: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:5365 +//line sql.y:5367 { yyLOCAL = &MemberOfExpr{Value: yyDollar[1].exprUnion(), JSONArr: yyDollar[5].exprUnion()} } yyVAL.union = yyLOCAL case 1025: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:5371 +//line sql.y:5373 { } case 1026: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:5374 +//line sql.y:5376 { } case 1027: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Expr -//line sql.y:5379 +//line sql.y:5381 { yyLOCAL = &IsExpr{Left: yyDollar[1].exprUnion(), Right: IsNullOp} } @@ -17809,7 +17812,7 @@ yydefault: case 1028: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:5383 +//line sql.y:5385 { yyLOCAL = &IsExpr{Left: yyDollar[1].exprUnion(), Right: IsNotNullOp} } @@ -17817,7 +17820,7 @@ yydefault: case 1029: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Expr -//line sql.y:5387 +//line sql.y:5389 { yyLOCAL = &ComparisonExpr{Left: yyDollar[1].exprUnion(), Operator: yyDollar[2].comparisonExprOperatorUnion(), Right: yyDollar[3].exprUnion()} } @@ -17825,7 +17828,7 @@ yydefault: case 1030: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:5391 +//line sql.y:5393 { yyLOCAL = &ComparisonExpr{Left: yyDollar[1].exprUnion(), Operator: yyDollar[2].comparisonExprOperatorUnion(), Modifier: Any, Right: yyDollar[4].subqueryUnion()} } @@ -17833,7 +17836,7 @@ yydefault: case 1031: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:5395 +//line sql.y:5397 { yyLOCAL = &ComparisonExpr{Left: yyDollar[1].exprUnion(), Operator: yyDollar[2].comparisonExprOperatorUnion(), Modifier: Any, Right: yyDollar[4].subqueryUnion()} } @@ -17841,7 +17844,7 @@ yydefault: case 1032: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:5399 +//line sql.y:5401 { yyLOCAL = &ComparisonExpr{Left: yyDollar[1].exprUnion(), Operator: yyDollar[2].comparisonExprOperatorUnion(), Modifier: All, Right: yyDollar[4].subqueryUnion()} } @@ -17849,7 +17852,7 @@ yydefault: case 1033: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:5403 +//line sql.y:5405 { yyLOCAL = yyDollar[1].exprUnion() } @@ -17857,7 +17860,7 @@ yydefault: case 1034: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Expr -//line sql.y:5409 +//line sql.y:5411 { yyLOCAL = &ComparisonExpr{Left: yyDollar[1].exprUnion(), Operator: InOp, Right: yyDollar[3].colTupleUnion()} } @@ -17865,7 +17868,7 @@ yydefault: case 1035: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:5413 +//line sql.y:5415 { yyLOCAL = &ComparisonExpr{Left: yyDollar[1].exprUnion(), Operator: NotInOp, Right: yyDollar[4].colTupleUnion()} } @@ -17873,7 +17876,7 @@ yydefault: case 1036: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL Expr -//line sql.y:5417 +//line sql.y:5419 { yyLOCAL = &BetweenExpr{Left: yyDollar[1].exprUnion(), IsBetween: true, From: yyDollar[3].exprUnion(), To: yyDollar[5].exprUnion()} } @@ -17881,7 +17884,7 @@ yydefault: case 1037: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:5421 +//line sql.y:5423 { yyLOCAL = &BetweenExpr{Left: yyDollar[1].exprUnion(), IsBetween: false, From: yyDollar[4].exprUnion(), To: yyDollar[6].exprUnion()} } @@ -17889,7 +17892,7 @@ yydefault: case 1038: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Expr -//line sql.y:5425 +//line sql.y:5427 { yyLOCAL = &ComparisonExpr{Left: yyDollar[1].exprUnion(), Operator: LikeOp, Right: yyDollar[3].exprUnion()} } @@ -17897,7 +17900,7 @@ yydefault: case 1039: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:5429 +//line sql.y:5431 { yyLOCAL = &ComparisonExpr{Left: yyDollar[1].exprUnion(), Operator: NotLikeOp, Right: yyDollar[4].exprUnion()} } @@ -17905,7 +17908,7 @@ yydefault: case 1040: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL Expr -//line sql.y:5433 +//line sql.y:5435 { yyLOCAL = &ComparisonExpr{Left: yyDollar[1].exprUnion(), Operator: LikeOp, Right: yyDollar[3].exprUnion(), Escape: yyDollar[5].exprUnion()} } @@ -17913,7 +17916,7 @@ yydefault: case 1041: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:5437 +//line sql.y:5439 { yyLOCAL = &ComparisonExpr{Left: yyDollar[1].exprUnion(), Operator: NotLikeOp, Right: yyDollar[4].exprUnion(), Escape: yyDollar[6].exprUnion()} } @@ -17921,7 +17924,7 @@ yydefault: case 1042: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Expr -//line sql.y:5441 +//line sql.y:5443 { yyLOCAL = &ComparisonExpr{Left: yyDollar[1].exprUnion(), Operator: RegexpOp, Right: yyDollar[3].exprUnion()} } @@ -17929,7 +17932,7 @@ yydefault: case 1043: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:5445 +//line sql.y:5447 { yyLOCAL = &ComparisonExpr{Left: yyDollar[1].exprUnion(), Operator: NotRegexpOp, Right: yyDollar[4].exprUnion()} } @@ -17937,25 +17940,25 @@ yydefault: case 1044: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:5449 +//line sql.y:5451 { yyLOCAL = yyDollar[1].exprUnion() } yyVAL.union = yyLOCAL case 1045: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:5455 +//line sql.y:5457 { } case 1046: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:5458 +//line sql.y:5460 { } case 1047: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Expr -//line sql.y:5464 +//line sql.y:5466 { yyLOCAL = &BinaryExpr{Left: yyDollar[1].exprUnion(), Operator: BitOrOp, Right: yyDollar[3].exprUnion()} } @@ -17963,7 +17966,7 @@ yydefault: case 1048: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Expr -//line sql.y:5468 +//line sql.y:5470 { yyLOCAL = &BinaryExpr{Left: yyDollar[1].exprUnion(), Operator: BitAndOp, Right: yyDollar[3].exprUnion()} } @@ -17971,7 +17974,7 @@ yydefault: case 1049: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Expr -//line sql.y:5472 +//line sql.y:5474 { yyLOCAL = &BinaryExpr{Left: yyDollar[1].exprUnion(), Operator: ShiftLeftOp, Right: yyDollar[3].exprUnion()} } @@ -17979,7 +17982,7 @@ yydefault: case 1050: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Expr -//line sql.y:5476 +//line sql.y:5478 { yyLOCAL = &BinaryExpr{Left: yyDollar[1].exprUnion(), Operator: ShiftRightOp, Right: yyDollar[3].exprUnion()} } @@ -17987,7 +17990,7 @@ yydefault: case 1051: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Expr -//line sql.y:5480 +//line sql.y:5482 { yyLOCAL = &BinaryExpr{Left: yyDollar[1].exprUnion(), Operator: PlusOp, Right: yyDollar[3].exprUnion()} } @@ -17995,7 +17998,7 @@ yydefault: case 1052: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Expr -//line sql.y:5484 +//line sql.y:5486 { yyLOCAL = &BinaryExpr{Left: yyDollar[1].exprUnion(), Operator: MinusOp, Right: yyDollar[3].exprUnion()} } @@ -18003,7 +18006,7 @@ yydefault: case 1053: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL Expr -//line sql.y:5488 +//line sql.y:5490 { yyLOCAL = &IntervalDateExpr{Syntax: IntervalDateExprBinaryAdd, Date: yyDollar[1].exprUnion(), Unit: yyDollar[5].intervalTypeUnion(), Interval: yyDollar[4].exprUnion()} } @@ -18011,7 +18014,7 @@ yydefault: case 1054: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL Expr -//line sql.y:5492 +//line sql.y:5494 { yyLOCAL = &IntervalDateExpr{Syntax: IntervalDateExprBinarySub, Date: yyDollar[1].exprUnion(), Unit: yyDollar[5].intervalTypeUnion(), Interval: yyDollar[4].exprUnion()} } @@ -18019,7 +18022,7 @@ yydefault: case 1055: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Expr -//line sql.y:5496 +//line sql.y:5498 { yyLOCAL = &BinaryExpr{Left: yyDollar[1].exprUnion(), Operator: MultOp, Right: yyDollar[3].exprUnion()} } @@ -18027,7 +18030,7 @@ yydefault: case 1056: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Expr -//line sql.y:5500 +//line sql.y:5502 { yyLOCAL = &BinaryExpr{Left: yyDollar[1].exprUnion(), Operator: DivOp, Right: yyDollar[3].exprUnion()} } @@ -18035,7 +18038,7 @@ yydefault: case 1057: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Expr -//line sql.y:5504 +//line sql.y:5506 { yyLOCAL = &BinaryExpr{Left: yyDollar[1].exprUnion(), Operator: ModOp, Right: yyDollar[3].exprUnion()} } @@ -18043,7 +18046,7 @@ yydefault: case 1058: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Expr -//line sql.y:5508 +//line sql.y:5510 { yyLOCAL = &BinaryExpr{Left: yyDollar[1].exprUnion(), Operator: IntDivOp, Right: yyDollar[3].exprUnion()} } @@ -18051,7 +18054,7 @@ yydefault: case 1059: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Expr -//line sql.y:5512 +//line sql.y:5514 { yyLOCAL = &BinaryExpr{Left: yyDollar[1].exprUnion(), Operator: ModOp, Right: yyDollar[3].exprUnion()} } @@ -18059,7 +18062,7 @@ yydefault: case 1060: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Expr -//line sql.y:5516 +//line sql.y:5518 { yyLOCAL = &BinaryExpr{Left: yyDollar[1].exprUnion(), Operator: BitXorOp, Right: yyDollar[3].exprUnion()} } @@ -18067,7 +18070,7 @@ yydefault: case 1061: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:5520 +//line sql.y:5522 { yyLOCAL = yyDollar[1].exprUnion() } @@ -18075,7 +18078,7 @@ yydefault: case 1062: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:5526 +//line sql.y:5528 { yyLOCAL = yyDollar[1].exprUnion() } @@ -18083,7 +18086,7 @@ yydefault: case 1063: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:5530 +//line sql.y:5532 { yyLOCAL = yyDollar[1].exprUnion() } @@ -18091,7 +18094,7 @@ yydefault: case 1064: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:5534 +//line sql.y:5536 { yyLOCAL = yyDollar[1].exprUnion() } @@ -18099,7 +18102,7 @@ yydefault: case 1065: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:5538 +//line sql.y:5540 { yyLOCAL = yyDollar[1].exprUnion() } @@ -18107,7 +18110,7 @@ yydefault: case 1066: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Expr -//line sql.y:5542 +//line sql.y:5544 { yyLOCAL = &CollateExpr{Expr: yyDollar[1].exprUnion(), Collation: yyDollar[3].str} } @@ -18115,7 +18118,7 @@ yydefault: case 1067: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:5546 +//line sql.y:5548 { yyLOCAL = yyDollar[1].exprUnion() } @@ -18123,7 +18126,7 @@ yydefault: case 1068: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:5550 +//line sql.y:5552 { yyLOCAL = yyDollar[1].exprUnion() } @@ -18131,7 +18134,7 @@ yydefault: case 1069: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:5554 +//line sql.y:5556 { yyLOCAL = yyDollar[1].variableUnion() } @@ -18139,7 +18142,7 @@ yydefault: case 1070: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Expr -//line sql.y:5558 +//line sql.y:5560 { yyLOCAL = yyDollar[2].exprUnion() // TODO: do we really want to ignore unary '+' before any kind of literals? } @@ -18147,7 +18150,7 @@ yydefault: case 1071: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Expr -//line sql.y:5562 +//line sql.y:5564 { yyLOCAL = &UnaryExpr{Operator: UMinusOp, Expr: yyDollar[2].exprUnion()} } @@ -18155,7 +18158,7 @@ yydefault: case 1072: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Expr -//line sql.y:5566 +//line sql.y:5568 { yyLOCAL = &UnaryExpr{Operator: TildaOp, Expr: yyDollar[2].exprUnion()} } @@ -18163,7 +18166,7 @@ yydefault: case 1073: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Expr -//line sql.y:5570 +//line sql.y:5572 { yyLOCAL = &UnaryExpr{Operator: BangOp, Expr: yyDollar[2].exprUnion()} } @@ -18171,7 +18174,7 @@ yydefault: case 1074: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:5574 +//line sql.y:5576 { yyLOCAL = yyDollar[1].subqueryUnion() } @@ -18179,7 +18182,7 @@ yydefault: case 1075: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:5578 +//line sql.y:5580 { yyLOCAL = yyDollar[1].exprUnion() } @@ -18187,7 +18190,7 @@ yydefault: case 1076: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Expr -//line sql.y:5582 +//line sql.y:5584 { yyLOCAL = &ExistsExpr{Subquery: yyDollar[2].subqueryUnion()} } @@ -18195,7 +18198,7 @@ yydefault: case 1077: yyDollar = yyS[yypt-7 : yypt+1] var yyLOCAL Expr -//line sql.y:5586 +//line sql.y:5588 { yyLOCAL = &MatchExpr{Columns: yyDollar[2].colNamesUnion(), Expr: yyDollar[5].exprUnion(), Option: yyDollar[6].matchExprOptionUnion()} } @@ -18203,7 +18206,7 @@ yydefault: case 1078: yyDollar = yyS[yypt-7 : yypt+1] var yyLOCAL Expr -//line sql.y:5590 +//line sql.y:5592 { yyLOCAL = &CastExpr{Expr: yyDollar[3].exprUnion(), Type: yyDollar[5].convertTypeUnion(), Array: yyDollar[6].booleanUnion()} } @@ -18211,7 +18214,7 @@ yydefault: case 1079: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:5594 +//line sql.y:5596 { yyLOCAL = &ConvertExpr{Expr: yyDollar[3].exprUnion(), Type: yyDollar[5].convertTypeUnion()} } @@ -18219,7 +18222,7 @@ yydefault: case 1080: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:5598 +//line sql.y:5600 { yyLOCAL = &ConvertUsingExpr{Expr: yyDollar[3].exprUnion(), Type: yyDollar[5].str} } @@ -18227,7 +18230,7 @@ yydefault: case 1081: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Expr -//line sql.y:5602 +//line sql.y:5604 { // From: https://dev.mysql.com/doc/refman/8.0/en/cast-functions.html#operator_binary // To convert a string expression to a binary string, these constructs are equivalent: @@ -18239,7 +18242,7 @@ yydefault: case 1082: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Expr -//line sql.y:5610 +//line sql.y:5612 { yyLOCAL = &Default{ColName: yyDollar[2].str} } @@ -18247,7 +18250,7 @@ yydefault: case 1083: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL Expr -//line sql.y:5614 +//line sql.y:5616 { yyLOCAL = &IntervalDateExpr{Syntax: IntervalDateExprBinaryAddLeft, Date: yyDollar[5].exprUnion(), Unit: yyDollar[3].intervalTypeUnion(), Interval: yyDollar[2].exprUnion()} } @@ -18255,7 +18258,7 @@ yydefault: case 1084: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:5618 +//line sql.y:5620 { yyLOCAL = &IntervalFuncExpr{Expr: yyDollar[3].exprUnion(), Exprs: yyDollar[5].exprsUnion()} } @@ -18263,7 +18266,7 @@ yydefault: case 1085: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Expr -//line sql.y:5622 +//line sql.y:5624 { yyLOCAL = &JSONExtractExpr{JSONDoc: yyDollar[1].exprUnion(), PathList: []Expr{yyDollar[3].exprUnion()}} } @@ -18271,7 +18274,7 @@ yydefault: case 1086: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Expr -//line sql.y:5626 +//line sql.y:5628 { yyLOCAL = &JSONUnquoteExpr{JSONValue: &JSONExtractExpr{JSONDoc: yyDollar[1].exprUnion(), PathList: []Expr{yyDollar[3].exprUnion()}}} } @@ -18279,7 +18282,7 @@ yydefault: case 1087: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL []*ColName -//line sql.y:5632 +//line sql.y:5634 { yyLOCAL = yyDollar[1].colNamesUnion() } @@ -18287,7 +18290,7 @@ yydefault: case 1088: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL []*ColName -//line sql.y:5636 +//line sql.y:5638 { yyLOCAL = yyDollar[2].colNamesUnion() } @@ -18295,14 +18298,14 @@ yydefault: case 1089: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL []*ColName -//line sql.y:5642 +//line sql.y:5644 { yyLOCAL = []*ColName{yyDollar[1].colNameUnion()} } yyVAL.union = yyLOCAL case 1090: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:5646 +//line sql.y:5648 { yySLICE := (*[]*ColName)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, yyDollar[3].colNameUnion()) @@ -18310,7 +18313,7 @@ yydefault: case 1091: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL TrimType -//line sql.y:5652 +//line sql.y:5654 { yyLOCAL = BothTrimType } @@ -18318,7 +18321,7 @@ yydefault: case 1092: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL TrimType -//line sql.y:5656 +//line sql.y:5658 { yyLOCAL = LeadingTrimType } @@ -18326,7 +18329,7 @@ yydefault: case 1093: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL TrimType -//line sql.y:5660 +//line sql.y:5662 { yyLOCAL = TrailingTrimType } @@ -18334,7 +18337,7 @@ yydefault: case 1094: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL FrameUnitType -//line sql.y:5666 +//line sql.y:5668 { yyLOCAL = FrameRowsType } @@ -18342,7 +18345,7 @@ yydefault: case 1095: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL FrameUnitType -//line sql.y:5670 +//line sql.y:5672 { yyLOCAL = FrameRangeType } @@ -18350,7 +18353,7 @@ yydefault: case 1096: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL ArgumentLessWindowExprType -//line sql.y:5677 +//line sql.y:5679 { yyLOCAL = CumeDistExprType } @@ -18358,7 +18361,7 @@ yydefault: case 1097: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL ArgumentLessWindowExprType -//line sql.y:5681 +//line sql.y:5683 { yyLOCAL = DenseRankExprType } @@ -18366,7 +18369,7 @@ yydefault: case 1098: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL ArgumentLessWindowExprType -//line sql.y:5685 +//line sql.y:5687 { yyLOCAL = PercentRankExprType } @@ -18374,7 +18377,7 @@ yydefault: case 1099: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL ArgumentLessWindowExprType -//line sql.y:5689 +//line sql.y:5691 { yyLOCAL = RankExprType } @@ -18382,7 +18385,7 @@ yydefault: case 1100: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL ArgumentLessWindowExprType -//line sql.y:5693 +//line sql.y:5695 { yyLOCAL = RowNumberExprType } @@ -18390,7 +18393,7 @@ yydefault: case 1101: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *FramePoint -//line sql.y:5699 +//line sql.y:5701 { yyLOCAL = &FramePoint{Type: CurrentRowType} } @@ -18398,7 +18401,7 @@ yydefault: case 1102: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *FramePoint -//line sql.y:5703 +//line sql.y:5705 { yyLOCAL = &FramePoint{Type: UnboundedPrecedingType} } @@ -18406,7 +18409,7 @@ yydefault: case 1103: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *FramePoint -//line sql.y:5707 +//line sql.y:5709 { yyLOCAL = &FramePoint{Type: UnboundedFollowingType} } @@ -18414,7 +18417,7 @@ yydefault: case 1104: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *FramePoint -//line sql.y:5711 +//line sql.y:5713 { yyLOCAL = &FramePoint{Type: ExprPrecedingType, Expr: yyDollar[1].exprUnion()} } @@ -18422,7 +18425,7 @@ yydefault: case 1105: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL *FramePoint -//line sql.y:5715 +//line sql.y:5717 { yyLOCAL = &FramePoint{Type: ExprPrecedingType, Expr: yyDollar[2].exprUnion(), Unit: yyDollar[3].intervalTypeUnion()} } @@ -18430,7 +18433,7 @@ yydefault: case 1106: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *FramePoint -//line sql.y:5719 +//line sql.y:5721 { yyLOCAL = &FramePoint{Type: ExprFollowingType, Expr: yyDollar[1].exprUnion()} } @@ -18438,7 +18441,7 @@ yydefault: case 1107: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL *FramePoint -//line sql.y:5723 +//line sql.y:5725 { yyLOCAL = &FramePoint{Type: ExprFollowingType, Expr: yyDollar[2].exprUnion(), Unit: yyDollar[3].intervalTypeUnion()} } @@ -18446,7 +18449,7 @@ yydefault: case 1108: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL *FrameClause -//line sql.y:5728 +//line sql.y:5730 { yyLOCAL = nil } @@ -18454,7 +18457,7 @@ yydefault: case 1109: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL *FrameClause -//line sql.y:5732 +//line sql.y:5734 { yyLOCAL = yyDollar[1].frameClauseUnion() } @@ -18462,7 +18465,7 @@ yydefault: case 1110: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *FrameClause -//line sql.y:5738 +//line sql.y:5740 { yyLOCAL = &FrameClause{Unit: yyDollar[1].frameUnitTypeUnion(), Start: yyDollar[2].framePointUnion()} } @@ -18470,43 +18473,43 @@ yydefault: case 1111: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL *FrameClause -//line sql.y:5742 +//line sql.y:5744 { yyLOCAL = &FrameClause{Unit: yyDollar[1].frameUnitTypeUnion(), Start: yyDollar[3].framePointUnion(), End: yyDollar[5].framePointUnion()} } yyVAL.union = yyLOCAL case 1112: yyDollar = yyS[yypt-0 : yypt+1] - var yyLOCAL Exprs -//line sql.y:5747 + var yyLOCAL []Expr +//line sql.y:5749 { yyLOCAL = nil } yyVAL.union = yyLOCAL case 1113: yyDollar = yyS[yypt-3 : yypt+1] - var yyLOCAL Exprs -//line sql.y:5751 + var yyLOCAL []Expr +//line sql.y:5753 { yyLOCAL = yyDollar[3].exprsUnion() } yyVAL.union = yyLOCAL case 1114: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:5756 +//line sql.y:5758 { yyVAL.identifierCI = IdentifierCI{} } case 1115: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:5760 +//line sql.y:5762 { yyVAL.identifierCI = yyDollar[1].identifierCI } case 1116: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL *WindowSpecification -//line sql.y:5766 +//line sql.y:5768 { yyLOCAL = &WindowSpecification{Name: yyDollar[1].identifierCI, PartitionClause: yyDollar[2].exprsUnion(), OrderClause: yyDollar[3].orderByUnion(), FrameClause: yyDollar[4].frameClauseUnion()} } @@ -18514,7 +18517,7 @@ yydefault: case 1117: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL *OverClause -//line sql.y:5772 +//line sql.y:5774 { yyLOCAL = &OverClause{WindowSpec: yyDollar[3].windowSpecificationUnion()} } @@ -18522,7 +18525,7 @@ yydefault: case 1118: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *OverClause -//line sql.y:5776 +//line sql.y:5778 { yyLOCAL = &OverClause{WindowName: yyDollar[2].identifierCI} } @@ -18530,7 +18533,7 @@ yydefault: case 1119: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL *OverClause -//line sql.y:5782 +//line sql.y:5784 { yyLOCAL = yyDollar[1].overClauseUnion() } @@ -18538,7 +18541,7 @@ yydefault: case 1120: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL *OverClause -//line sql.y:5786 +//line sql.y:5788 { yyLOCAL = nil } @@ -18546,7 +18549,7 @@ yydefault: case 1121: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL *NullTreatmentClause -//line sql.y:5791 +//line sql.y:5793 { yyLOCAL = nil } @@ -18554,7 +18557,7 @@ yydefault: case 1123: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL *NullTreatmentClause -//line sql.y:5798 +//line sql.y:5800 { yyLOCAL = &NullTreatmentClause{yyDollar[1].nullTreatmentTypeUnion()} } @@ -18562,7 +18565,7 @@ yydefault: case 1124: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL NullTreatmentType -//line sql.y:5804 +//line sql.y:5806 { yyLOCAL = RespectNullsType } @@ -18570,7 +18573,7 @@ yydefault: case 1125: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL NullTreatmentType -//line sql.y:5808 +//line sql.y:5810 { yyLOCAL = IgnoreNullsType } @@ -18578,7 +18581,7 @@ yydefault: case 1126: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL FirstOrLastValueExprType -//line sql.y:5814 +//line sql.y:5816 { yyLOCAL = FirstValueExprType } @@ -18586,7 +18589,7 @@ yydefault: case 1127: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL FirstOrLastValueExprType -//line sql.y:5818 +//line sql.y:5820 { yyLOCAL = LastValueExprType } @@ -18594,7 +18597,7 @@ yydefault: case 1128: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL FromFirstLastType -//line sql.y:5824 +//line sql.y:5826 { yyLOCAL = FromFirstType } @@ -18602,7 +18605,7 @@ yydefault: case 1129: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL FromFirstLastType -//line sql.y:5828 +//line sql.y:5830 { yyLOCAL = FromLastType } @@ -18610,7 +18613,7 @@ yydefault: case 1130: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL *FromFirstLastClause -//line sql.y:5833 +//line sql.y:5835 { yyLOCAL = nil } @@ -18618,7 +18621,7 @@ yydefault: case 1132: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL *FromFirstLastClause -//line sql.y:5840 +//line sql.y:5842 { yyLOCAL = &FromFirstLastClause{yyDollar[1].fromFirstLastTypeUnion()} } @@ -18626,7 +18629,7 @@ yydefault: case 1133: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL LagLeadExprType -//line sql.y:5846 +//line sql.y:5848 { yyLOCAL = LagExprType } @@ -18634,7 +18637,7 @@ yydefault: case 1134: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL LagLeadExprType -//line sql.y:5850 +//line sql.y:5852 { yyLOCAL = LeadExprType } @@ -18642,7 +18645,7 @@ yydefault: case 1135: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL *WindowDefinition -//line sql.y:5856 +//line sql.y:5858 { yyLOCAL = &WindowDefinition{Name: yyDollar[1].identifierCI, WindowSpec: yyDollar[4].windowSpecificationUnion()} } @@ -18650,34 +18653,34 @@ yydefault: case 1136: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL WindowDefinitions -//line sql.y:5862 +//line sql.y:5864 { yyLOCAL = WindowDefinitions{yyDollar[1].windowDefinitionUnion()} } yyVAL.union = yyLOCAL case 1137: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:5866 +//line sql.y:5868 { yySLICE := (*WindowDefinitions)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, yyDollar[3].windowDefinitionUnion()) } case 1138: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:5872 +//line sql.y:5874 { yyVAL.str = "" } case 1139: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:5876 +//line sql.y:5878 { yyVAL.str = string(yyDollar[2].identifierCI.String()) } case 1140: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL BoolVal -//line sql.y:5882 +//line sql.y:5884 { yyLOCAL = BoolVal(true) } @@ -18685,7 +18688,7 @@ yydefault: case 1141: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL BoolVal -//line sql.y:5886 +//line sql.y:5888 { yyLOCAL = BoolVal(false) } @@ -18693,7 +18696,7 @@ yydefault: case 1142: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IsExprOperator -//line sql.y:5893 +//line sql.y:5895 { yyLOCAL = IsTrueOp } @@ -18701,7 +18704,7 @@ yydefault: case 1143: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL IsExprOperator -//line sql.y:5897 +//line sql.y:5899 { yyLOCAL = IsNotTrueOp } @@ -18709,7 +18712,7 @@ yydefault: case 1144: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IsExprOperator -//line sql.y:5901 +//line sql.y:5903 { yyLOCAL = IsFalseOp } @@ -18717,7 +18720,7 @@ yydefault: case 1145: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL IsExprOperator -//line sql.y:5905 +//line sql.y:5907 { yyLOCAL = IsNotFalseOp } @@ -18725,7 +18728,7 @@ yydefault: case 1146: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL ComparisonExprOperator -//line sql.y:5911 +//line sql.y:5913 { yyLOCAL = yyDollar[1].comparisonExprOperatorUnion() } @@ -18733,7 +18736,7 @@ yydefault: case 1147: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL ComparisonExprOperator -//line sql.y:5915 +//line sql.y:5917 { yyLOCAL = NullSafeEqualOp } @@ -18741,7 +18744,7 @@ yydefault: case 1148: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL ComparisonExprOperator -//line sql.y:5921 +//line sql.y:5923 { yyLOCAL = EqualOp } @@ -18749,7 +18752,7 @@ yydefault: case 1149: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL ComparisonExprOperator -//line sql.y:5925 +//line sql.y:5927 { yyLOCAL = LessThanOp } @@ -18757,7 +18760,7 @@ yydefault: case 1150: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL ComparisonExprOperator -//line sql.y:5929 +//line sql.y:5931 { yyLOCAL = GreaterThanOp } @@ -18765,7 +18768,7 @@ yydefault: case 1151: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL ComparisonExprOperator -//line sql.y:5933 +//line sql.y:5935 { yyLOCAL = LessEqualOp } @@ -18773,7 +18776,7 @@ yydefault: case 1152: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL ComparisonExprOperator -//line sql.y:5937 +//line sql.y:5939 { yyLOCAL = GreaterEqualOp } @@ -18781,7 +18784,7 @@ yydefault: case 1153: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL ComparisonExprOperator -//line sql.y:5941 +//line sql.y:5943 { yyLOCAL = NotEqualOp } @@ -18789,7 +18792,7 @@ yydefault: case 1154: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL ColTuple -//line sql.y:5947 +//line sql.y:5949 { yyLOCAL = yyDollar[1].valTupleUnion() } @@ -18797,7 +18800,7 @@ yydefault: case 1155: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL ColTuple -//line sql.y:5951 +//line sql.y:5953 { yyLOCAL = yyDollar[1].subqueryUnion() } @@ -18805,7 +18808,7 @@ yydefault: case 1156: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL ColTuple -//line sql.y:5955 +//line sql.y:5957 { yyLOCAL = ListArg(yyDollar[1].str[2:]) markBindVariable(yylex, yyDollar[1].str[2:]) @@ -18814,30 +18817,30 @@ yydefault: case 1157: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL *Subquery -//line sql.y:5962 +//line sql.y:5964 { yyLOCAL = &Subquery{yyDollar[1].tableStmtUnion()} } yyVAL.union = yyLOCAL case 1158: yyDollar = yyS[yypt-1 : yypt+1] - var yyLOCAL Exprs -//line sql.y:5968 + var yyLOCAL []Expr +//line sql.y:5970 { - yyLOCAL = Exprs{yyDollar[1].exprUnion()} + yyLOCAL = []Expr{yyDollar[1].exprUnion()} } yyVAL.union = yyLOCAL case 1159: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:5972 +//line sql.y:5974 { - yySLICE := (*Exprs)(yyIaddr(yyVAL.union)) + yySLICE := (*[]Expr)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, yyDollar[3].exprUnion()) } case 1160: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:5982 +//line sql.y:5984 { yyLOCAL = &FuncExpr{Name: yyDollar[1].identifierCI, Exprs: yyDollar[3].exprsUnion()} } @@ -18845,7 +18848,7 @@ yydefault: case 1161: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:5986 +//line sql.y:5988 { yyLOCAL = &FuncExpr{Qualifier: yyDollar[1].identifierCS, Name: yyDollar[3].identifierCI, Exprs: yyDollar[5].exprsUnion()} } @@ -18853,7 +18856,7 @@ yydefault: case 1162: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:5996 +//line sql.y:5998 { yyLOCAL = &FuncExpr{Name: NewIdentifierCI("left"), Exprs: yyDollar[3].exprsUnion()} } @@ -18861,7 +18864,7 @@ yydefault: case 1163: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6000 +//line sql.y:6002 { yyLOCAL = &FuncExpr{Name: NewIdentifierCI("right"), Exprs: yyDollar[3].exprsUnion()} } @@ -18869,7 +18872,7 @@ yydefault: case 1164: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL Expr -//line sql.y:6004 +//line sql.y:6006 { yyLOCAL = &SubstrExpr{Name: yyDollar[3].exprUnion(), From: yyDollar[5].exprUnion(), To: yyDollar[7].exprUnion()} } @@ -18877,7 +18880,7 @@ yydefault: case 1165: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL Expr -//line sql.y:6008 +//line sql.y:6010 { yyLOCAL = &SubstrExpr{Name: yyDollar[3].exprUnion(), From: yyDollar[5].exprUnion(), To: yyDollar[7].exprUnion()} } @@ -18885,7 +18888,7 @@ yydefault: case 1166: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6012 +//line sql.y:6014 { yyLOCAL = &SubstrExpr{Name: yyDollar[3].exprUnion(), From: yyDollar[5].exprUnion()} } @@ -18893,7 +18896,7 @@ yydefault: case 1167: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL Expr -//line sql.y:6016 +//line sql.y:6018 { yyLOCAL = &SubstrExpr{Name: yyDollar[3].exprUnion(), From: yyDollar[5].exprUnion(), To: yyDollar[7].exprUnion()} } @@ -18901,7 +18904,7 @@ yydefault: case 1168: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6020 +//line sql.y:6022 { yyLOCAL = &SubstrExpr{Name: yyDollar[3].exprUnion(), From: yyDollar[5].exprUnion()} } @@ -18909,7 +18912,7 @@ yydefault: case 1169: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL Expr -//line sql.y:6024 +//line sql.y:6026 { yyLOCAL = &CaseExpr{Expr: yyDollar[2].exprUnion(), Whens: yyDollar[3].whensUnion(), Else: yyDollar[4].exprUnion()} } @@ -18917,7 +18920,7 @@ yydefault: case 1170: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6028 +//line sql.y:6030 { yyLOCAL = &ValuesFuncExpr{Name: yyDollar[3].colNameUnion()} } @@ -18925,7 +18928,7 @@ yydefault: case 1171: yyDollar = yyS[yypt-10 : yypt+1] var yyLOCAL Expr -//line sql.y:6032 +//line sql.y:6034 { yyLOCAL = &InsertExpr{Str: yyDollar[3].exprUnion(), Pos: yyDollar[5].exprUnion(), Len: yyDollar[7].exprUnion(), NewStr: yyDollar[9].exprUnion()} } @@ -18933,7 +18936,7 @@ yydefault: case 1172: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Expr -//line sql.y:6036 +//line sql.y:6038 { yyLOCAL = &FuncExpr{Name: NewIdentifierCI(yyDollar[1].str)} } @@ -18941,7 +18944,7 @@ yydefault: case 1173: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Expr -//line sql.y:6047 +//line sql.y:6049 { yyLOCAL = &FuncExpr{Name: NewIdentifierCI("utc_date")} } @@ -18949,7 +18952,7 @@ yydefault: case 1174: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:6051 +//line sql.y:6053 { yyLOCAL = yyDollar[1].exprUnion() } @@ -18957,7 +18960,7 @@ yydefault: case 1175: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Expr -//line sql.y:6057 +//line sql.y:6059 { yyLOCAL = &FuncExpr{Name: NewIdentifierCI("current_date")} } @@ -18965,7 +18968,7 @@ yydefault: case 1176: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Expr -//line sql.y:6061 +//line sql.y:6063 { yyLOCAL = &FuncExpr{Name: NewIdentifierCI("curdate")} } @@ -18973,7 +18976,7 @@ yydefault: case 1177: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Expr -//line sql.y:6065 +//line sql.y:6067 { yyLOCAL = &CurTimeFuncExpr{Name: NewIdentifierCI("utc_time"), Fsp: yyDollar[2].integerUnion()} } @@ -18981,7 +18984,7 @@ yydefault: case 1178: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Expr -//line sql.y:6070 +//line sql.y:6072 { yyLOCAL = &CurTimeFuncExpr{Name: NewIdentifierCI("curtime"), Fsp: yyDollar[2].integerUnion()} } @@ -18989,7 +18992,7 @@ yydefault: case 1179: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Expr -//line sql.y:6075 +//line sql.y:6077 { yyLOCAL = &CurTimeFuncExpr{Name: NewIdentifierCI("current_time"), Fsp: yyDollar[2].integerUnion()} } @@ -18997,7 +19000,7 @@ yydefault: case 1180: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL Expr -//line sql.y:6079 +//line sql.y:6081 { yyLOCAL = &CountStar{OverClause: yyDollar[5].overClauseUnion()} } @@ -19005,7 +19008,7 @@ yydefault: case 1181: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6083 +//line sql.y:6085 { yyLOCAL = &Count{Distinct: yyDollar[3].booleanUnion(), Args: yyDollar[4].exprsUnion(), OverClause: yyDollar[6].overClauseUnion()} } @@ -19013,7 +19016,7 @@ yydefault: case 1182: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6087 +//line sql.y:6089 { yyLOCAL = &Max{Distinct: yyDollar[3].booleanUnion(), Arg: yyDollar[4].exprUnion(), OverClause: yyDollar[6].overClauseUnion()} } @@ -19021,7 +19024,7 @@ yydefault: case 1183: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6091 +//line sql.y:6093 { yyLOCAL = &Min{Distinct: yyDollar[3].booleanUnion(), Arg: yyDollar[4].exprUnion(), OverClause: yyDollar[6].overClauseUnion()} } @@ -19029,7 +19032,7 @@ yydefault: case 1184: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6095 +//line sql.y:6097 { yyLOCAL = &Sum{Distinct: yyDollar[3].booleanUnion(), Arg: yyDollar[4].exprUnion(), OverClause: yyDollar[6].overClauseUnion()} } @@ -19037,7 +19040,7 @@ yydefault: case 1185: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6099 +//line sql.y:6101 { yyLOCAL = &Avg{Distinct: yyDollar[3].booleanUnion(), Arg: yyDollar[4].exprUnion(), OverClause: yyDollar[6].overClauseUnion()} } @@ -19045,7 +19048,7 @@ yydefault: case 1186: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL Expr -//line sql.y:6103 +//line sql.y:6105 { yyLOCAL = &BitAnd{Arg: yyDollar[3].exprUnion(), OverClause: yyDollar[5].overClauseUnion()} } @@ -19053,7 +19056,7 @@ yydefault: case 1187: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL Expr -//line sql.y:6107 +//line sql.y:6109 { yyLOCAL = &BitOr{Arg: yyDollar[3].exprUnion(), OverClause: yyDollar[5].overClauseUnion()} } @@ -19061,7 +19064,7 @@ yydefault: case 1188: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL Expr -//line sql.y:6111 +//line sql.y:6113 { yyLOCAL = &BitXor{Arg: yyDollar[3].exprUnion(), OverClause: yyDollar[5].overClauseUnion()} } @@ -19069,7 +19072,7 @@ yydefault: case 1189: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL Expr -//line sql.y:6115 +//line sql.y:6117 { yyLOCAL = &Std{Arg: yyDollar[3].exprUnion(), OverClause: yyDollar[5].overClauseUnion()} } @@ -19077,7 +19080,7 @@ yydefault: case 1190: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL Expr -//line sql.y:6119 +//line sql.y:6121 { yyLOCAL = &StdDev{Arg: yyDollar[3].exprUnion(), OverClause: yyDollar[5].overClauseUnion()} } @@ -19085,7 +19088,7 @@ yydefault: case 1191: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL Expr -//line sql.y:6123 +//line sql.y:6125 { yyLOCAL = &StdPop{Arg: yyDollar[3].exprUnion(), OverClause: yyDollar[5].overClauseUnion()} } @@ -19093,7 +19096,7 @@ yydefault: case 1192: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL Expr -//line sql.y:6127 +//line sql.y:6129 { yyLOCAL = &StdSamp{Arg: yyDollar[3].exprUnion(), OverClause: yyDollar[5].overClauseUnion()} } @@ -19101,7 +19104,7 @@ yydefault: case 1193: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL Expr -//line sql.y:6131 +//line sql.y:6133 { yyLOCAL = &VarPop{Arg: yyDollar[3].exprUnion(), OverClause: yyDollar[5].overClauseUnion()} } @@ -19109,7 +19112,7 @@ yydefault: case 1194: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL Expr -//line sql.y:6135 +//line sql.y:6137 { yyLOCAL = &VarSamp{Arg: yyDollar[3].exprUnion(), OverClause: yyDollar[5].overClauseUnion()} } @@ -19117,7 +19120,7 @@ yydefault: case 1195: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL Expr -//line sql.y:6139 +//line sql.y:6141 { yyLOCAL = &Variance{Arg: yyDollar[3].exprUnion(), OverClause: yyDollar[5].overClauseUnion()} } @@ -19125,7 +19128,7 @@ yydefault: case 1196: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL Expr -//line sql.y:6143 +//line sql.y:6145 { yyLOCAL = &GroupConcatExpr{Distinct: yyDollar[3].booleanUnion(), Exprs: yyDollar[4].exprsUnion(), OrderBy: yyDollar[5].orderByUnion(), Separator: yyDollar[6].str, Limit: yyDollar[7].limitUnion()} } @@ -19133,7 +19136,7 @@ yydefault: case 1197: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6147 +//line sql.y:6149 { yyLOCAL = &AnyValue{Arg: yyDollar[3].exprUnion()} } @@ -19141,7 +19144,7 @@ yydefault: case 1198: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL Expr -//line sql.y:6151 +//line sql.y:6153 { yyLOCAL = &IntervalDateExpr{Syntax: IntervalDateExprTimestampadd, Date: yyDollar[7].exprUnion(), Interval: yyDollar[5].exprUnion(), Unit: yyDollar[3].intervalTypeUnion()} } @@ -19149,7 +19152,7 @@ yydefault: case 1199: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL Expr -//line sql.y:6155 +//line sql.y:6157 { yyLOCAL = &TimestampDiffExpr{Unit: yyDollar[3].intervalTypeUnion(), Expr1: yyDollar[5].exprUnion(), Expr2: yyDollar[7].exprUnion()} } @@ -19157,7 +19160,7 @@ yydefault: case 1200: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6159 +//line sql.y:6161 { yyLOCAL = &ExtractFuncExpr{IntervalType: yyDollar[3].intervalTypeUnion(), Expr: yyDollar[5].exprUnion()} } @@ -19165,7 +19168,7 @@ yydefault: case 1201: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL Expr -//line sql.y:6163 +//line sql.y:6165 { yyLOCAL = &WeightStringFuncExpr{Expr: yyDollar[3].exprUnion(), As: yyDollar[4].convertTypeUnion()} } @@ -19173,7 +19176,7 @@ yydefault: case 1202: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6167 +//line sql.y:6169 { yyLOCAL = &JSONPrettyExpr{JSONVal: yyDollar[3].exprUnion()} } @@ -19181,7 +19184,7 @@ yydefault: case 1203: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6171 +//line sql.y:6173 { yyLOCAL = &JSONStorageFreeExpr{JSONVal: yyDollar[3].exprUnion()} } @@ -19189,7 +19192,7 @@ yydefault: case 1204: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6175 +//line sql.y:6177 { yyLOCAL = &JSONStorageSizeExpr{JSONVal: yyDollar[3].exprUnion()} } @@ -19197,7 +19200,7 @@ yydefault: case 1205: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL Expr -//line sql.y:6179 +//line sql.y:6181 { yyLOCAL = &JSONArrayAgg{Expr: yyDollar[3].exprUnion(), OverClause: yyDollar[5].overClauseUnion()} } @@ -19205,7 +19208,7 @@ yydefault: case 1206: yyDollar = yyS[yypt-7 : yypt+1] var yyLOCAL Expr -//line sql.y:6183 +//line sql.y:6185 { yyLOCAL = &JSONObjectAgg{Key: yyDollar[3].exprUnion(), Value: yyDollar[5].exprUnion(), OverClause: yyDollar[7].overClauseUnion()} } @@ -19213,7 +19216,7 @@ yydefault: case 1207: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6187 +//line sql.y:6189 { yyLOCAL = &TrimFuncExpr{TrimFuncType: LTrimType, Type: LeadingTrimType, StringArg: yyDollar[3].exprUnion()} } @@ -19221,7 +19224,7 @@ yydefault: case 1208: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6191 +//line sql.y:6193 { yyLOCAL = &TrimFuncExpr{TrimFuncType: RTrimType, Type: TrailingTrimType, StringArg: yyDollar[3].exprUnion()} } @@ -19229,7 +19232,7 @@ yydefault: case 1209: yyDollar = yyS[yypt-7 : yypt+1] var yyLOCAL Expr -//line sql.y:6195 +//line sql.y:6197 { yyLOCAL = &TrimFuncExpr{Type: yyDollar[3].trimTypeUnion(), TrimArg: yyDollar[4].exprUnion(), StringArg: yyDollar[6].exprUnion()} } @@ -19237,7 +19240,7 @@ yydefault: case 1210: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6199 +//line sql.y:6201 { yyLOCAL = &TrimFuncExpr{StringArg: yyDollar[3].exprUnion()} } @@ -19245,7 +19248,7 @@ yydefault: case 1211: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6203 +//line sql.y:6205 { yyLOCAL = &CharExpr{Exprs: yyDollar[3].exprsUnion()} } @@ -19253,7 +19256,7 @@ yydefault: case 1212: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6207 +//line sql.y:6209 { yyLOCAL = &CharExpr{Exprs: yyDollar[3].exprsUnion(), Charset: yyDollar[5].str} } @@ -19261,7 +19264,7 @@ yydefault: case 1213: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6211 +//line sql.y:6213 { yyLOCAL = &TrimFuncExpr{TrimArg: yyDollar[3].exprUnion(), StringArg: yyDollar[5].exprUnion()} } @@ -19269,7 +19272,7 @@ yydefault: case 1214: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6215 +//line sql.y:6217 { yyLOCAL = &LocateExpr{SubStr: yyDollar[3].exprUnion(), Str: yyDollar[5].exprUnion()} } @@ -19277,7 +19280,7 @@ yydefault: case 1215: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL Expr -//line sql.y:6219 +//line sql.y:6221 { yyLOCAL = &LocateExpr{SubStr: yyDollar[3].exprUnion(), Str: yyDollar[5].exprUnion(), Pos: yyDollar[7].exprUnion()} } @@ -19285,7 +19288,7 @@ yydefault: case 1216: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6223 +//line sql.y:6225 { yyLOCAL = &LocateExpr{SubStr: yyDollar[3].exprUnion(), Str: yyDollar[5].exprUnion()} } @@ -19293,7 +19296,7 @@ yydefault: case 1217: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6227 +//line sql.y:6229 { yyLOCAL = &LockingFunc{Type: GetLock, Name: yyDollar[3].exprUnion(), Timeout: yyDollar[5].exprUnion()} } @@ -19301,7 +19304,7 @@ yydefault: case 1218: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6231 +//line sql.y:6233 { yyLOCAL = &LockingFunc{Type: IsFreeLock, Name: yyDollar[3].exprUnion()} } @@ -19309,7 +19312,7 @@ yydefault: case 1219: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6235 +//line sql.y:6237 { yyLOCAL = &LockingFunc{Type: IsUsedLock, Name: yyDollar[3].exprUnion()} } @@ -19317,7 +19320,7 @@ yydefault: case 1220: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Expr -//line sql.y:6239 +//line sql.y:6241 { yyLOCAL = &LockingFunc{Type: ReleaseAllLocks} } @@ -19325,7 +19328,7 @@ yydefault: case 1221: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6243 +//line sql.y:6245 { yyLOCAL = &LockingFunc{Type: ReleaseLock, Name: yyDollar[3].exprUnion()} } @@ -19333,7 +19336,7 @@ yydefault: case 1222: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6247 +//line sql.y:6249 { yyLOCAL = &JSONSchemaValidFuncExpr{Schema: yyDollar[3].exprUnion(), Document: yyDollar[5].exprUnion()} } @@ -19341,7 +19344,7 @@ yydefault: case 1223: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6251 +//line sql.y:6253 { yyLOCAL = &JSONSchemaValidationReportFuncExpr{Schema: yyDollar[3].exprUnion(), Document: yyDollar[5].exprUnion()} } @@ -19349,7 +19352,7 @@ yydefault: case 1224: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6255 +//line sql.y:6257 { yyLOCAL = &JSONArrayExpr{Params: yyDollar[3].exprsUnion()} } @@ -19357,7 +19360,7 @@ yydefault: case 1225: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6259 +//line sql.y:6261 { yyLOCAL = &GeomFormatExpr{FormatType: BinaryFormat, Geom: yyDollar[3].exprUnion()} } @@ -19365,7 +19368,7 @@ yydefault: case 1226: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6263 +//line sql.y:6265 { yyLOCAL = &GeomFormatExpr{FormatType: BinaryFormat, Geom: yyDollar[3].exprUnion(), AxisOrderOpt: yyDollar[5].exprUnion()} } @@ -19373,7 +19376,7 @@ yydefault: case 1227: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6267 +//line sql.y:6269 { yyLOCAL = &GeomFormatExpr{FormatType: TextFormat, Geom: yyDollar[3].exprUnion()} } @@ -19381,7 +19384,7 @@ yydefault: case 1228: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6271 +//line sql.y:6273 { yyLOCAL = &GeomFormatExpr{FormatType: TextFormat, Geom: yyDollar[3].exprUnion(), AxisOrderOpt: yyDollar[5].exprUnion()} } @@ -19389,7 +19392,7 @@ yydefault: case 1229: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6275 +//line sql.y:6277 { yyLOCAL = &GeomPropertyFuncExpr{Property: IsEmpty, Geom: yyDollar[3].exprUnion()} } @@ -19397,7 +19400,7 @@ yydefault: case 1230: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6279 +//line sql.y:6281 { yyLOCAL = &GeomPropertyFuncExpr{Property: IsSimple, Geom: yyDollar[3].exprUnion()} } @@ -19405,7 +19408,7 @@ yydefault: case 1231: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6283 +//line sql.y:6285 { yyLOCAL = &GeomPropertyFuncExpr{Property: Dimension, Geom: yyDollar[3].exprUnion()} } @@ -19413,7 +19416,7 @@ yydefault: case 1232: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6287 +//line sql.y:6289 { yyLOCAL = &GeomPropertyFuncExpr{Property: Envelope, Geom: yyDollar[3].exprUnion()} } @@ -19421,7 +19424,7 @@ yydefault: case 1233: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6291 +//line sql.y:6293 { yyLOCAL = &GeomPropertyFuncExpr{Property: GeometryType, Geom: yyDollar[3].exprUnion()} } @@ -19429,7 +19432,7 @@ yydefault: case 1234: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6295 +//line sql.y:6297 { yyLOCAL = &PointPropertyFuncExpr{Property: Latitude, Point: yyDollar[3].exprUnion()} } @@ -19437,7 +19440,7 @@ yydefault: case 1235: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6299 +//line sql.y:6301 { yyLOCAL = &PointPropertyFuncExpr{Property: Latitude, Point: yyDollar[3].exprUnion(), ValueToSet: yyDollar[5].exprUnion()} } @@ -19445,7 +19448,7 @@ yydefault: case 1236: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6303 +//line sql.y:6305 { yyLOCAL = &PointPropertyFuncExpr{Property: Longitude, Point: yyDollar[3].exprUnion()} } @@ -19453,7 +19456,7 @@ yydefault: case 1237: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6307 +//line sql.y:6309 { yyLOCAL = &PointPropertyFuncExpr{Property: Longitude, Point: yyDollar[3].exprUnion(), ValueToSet: yyDollar[5].exprUnion()} } @@ -19461,7 +19464,7 @@ yydefault: case 1238: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6311 +//line sql.y:6313 { yyLOCAL = &LinestrPropertyFuncExpr{Property: EndPoint, Linestring: yyDollar[3].exprUnion()} } @@ -19469,7 +19472,7 @@ yydefault: case 1239: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6315 +//line sql.y:6317 { yyLOCAL = &LinestrPropertyFuncExpr{Property: IsClosed, Linestring: yyDollar[3].exprUnion()} } @@ -19477,7 +19480,7 @@ yydefault: case 1240: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6319 +//line sql.y:6321 { yyLOCAL = &LinestrPropertyFuncExpr{Property: Length, Linestring: yyDollar[3].exprUnion()} } @@ -19485,7 +19488,7 @@ yydefault: case 1241: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6323 +//line sql.y:6325 { yyLOCAL = &LinestrPropertyFuncExpr{Property: Length, Linestring: yyDollar[3].exprUnion(), PropertyDefArg: yyDollar[5].exprUnion()} } @@ -19493,7 +19496,7 @@ yydefault: case 1242: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6327 +//line sql.y:6329 { yyLOCAL = &LinestrPropertyFuncExpr{Property: NumPoints, Linestring: yyDollar[3].exprUnion()} } @@ -19501,7 +19504,7 @@ yydefault: case 1243: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6331 +//line sql.y:6333 { yyLOCAL = &LinestrPropertyFuncExpr{Property: PointN, Linestring: yyDollar[3].exprUnion(), PropertyDefArg: yyDollar[5].exprUnion()} } @@ -19509,7 +19512,7 @@ yydefault: case 1244: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6335 +//line sql.y:6337 { yyLOCAL = &LinestrPropertyFuncExpr{Property: StartPoint, Linestring: yyDollar[3].exprUnion()} } @@ -19517,7 +19520,7 @@ yydefault: case 1245: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6339 +//line sql.y:6341 { yyLOCAL = &PointPropertyFuncExpr{Property: XCordinate, Point: yyDollar[3].exprUnion()} } @@ -19525,7 +19528,7 @@ yydefault: case 1246: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6343 +//line sql.y:6345 { yyLOCAL = &PointPropertyFuncExpr{Property: XCordinate, Point: yyDollar[3].exprUnion(), ValueToSet: yyDollar[5].exprUnion()} } @@ -19533,7 +19536,7 @@ yydefault: case 1247: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6347 +//line sql.y:6349 { yyLOCAL = &PointPropertyFuncExpr{Property: YCordinate, Point: yyDollar[3].exprUnion()} } @@ -19541,7 +19544,7 @@ yydefault: case 1248: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6351 +//line sql.y:6353 { yyLOCAL = &PointPropertyFuncExpr{Property: YCordinate, Point: yyDollar[3].exprUnion(), ValueToSet: yyDollar[5].exprUnion()} } @@ -19549,7 +19552,7 @@ yydefault: case 1249: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6355 +//line sql.y:6357 { yyLOCAL = &GeomFromTextExpr{Type: GeometryFromText, WktText: yyDollar[3].exprUnion()} } @@ -19557,7 +19560,7 @@ yydefault: case 1250: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6359 +//line sql.y:6361 { yyLOCAL = &GeomFromTextExpr{Type: GeometryFromText, WktText: yyDollar[3].exprUnion(), Srid: yyDollar[5].exprUnion()} } @@ -19565,7 +19568,7 @@ yydefault: case 1251: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL Expr -//line sql.y:6363 +//line sql.y:6365 { yyLOCAL = &GeomFromTextExpr{Type: GeometryFromText, WktText: yyDollar[3].exprUnion(), Srid: yyDollar[5].exprUnion(), AxisOrderOpt: yyDollar[7].exprUnion()} } @@ -19573,7 +19576,7 @@ yydefault: case 1252: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6367 +//line sql.y:6369 { yyLOCAL = &GeomFromTextExpr{Type: GeometryCollectionFromText, WktText: yyDollar[3].exprUnion()} } @@ -19581,7 +19584,7 @@ yydefault: case 1253: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6371 +//line sql.y:6373 { yyLOCAL = &GeomFromTextExpr{Type: GeometryCollectionFromText, WktText: yyDollar[3].exprUnion(), Srid: yyDollar[5].exprUnion()} } @@ -19589,7 +19592,7 @@ yydefault: case 1254: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL Expr -//line sql.y:6375 +//line sql.y:6377 { yyLOCAL = &GeomFromTextExpr{Type: GeometryCollectionFromText, WktText: yyDollar[3].exprUnion(), Srid: yyDollar[5].exprUnion(), AxisOrderOpt: yyDollar[7].exprUnion()} } @@ -19597,7 +19600,7 @@ yydefault: case 1255: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6379 +//line sql.y:6381 { yyLOCAL = &GeomFromTextExpr{Type: LineStringFromText, WktText: yyDollar[3].exprUnion()} } @@ -19605,7 +19608,7 @@ yydefault: case 1256: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6383 +//line sql.y:6385 { yyLOCAL = &GeomFromTextExpr{Type: LineStringFromText, WktText: yyDollar[3].exprUnion(), Srid: yyDollar[5].exprUnion()} } @@ -19613,7 +19616,7 @@ yydefault: case 1257: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL Expr -//line sql.y:6387 +//line sql.y:6389 { yyLOCAL = &GeomFromTextExpr{Type: LineStringFromText, WktText: yyDollar[3].exprUnion(), Srid: yyDollar[5].exprUnion(), AxisOrderOpt: yyDollar[7].exprUnion()} } @@ -19621,7 +19624,7 @@ yydefault: case 1258: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6391 +//line sql.y:6393 { yyLOCAL = &GeomFromTextExpr{Type: MultiLinestringFromText, WktText: yyDollar[3].exprUnion()} } @@ -19629,7 +19632,7 @@ yydefault: case 1259: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6395 +//line sql.y:6397 { yyLOCAL = &GeomFromTextExpr{Type: MultiLinestringFromText, WktText: yyDollar[3].exprUnion(), Srid: yyDollar[5].exprUnion()} } @@ -19637,7 +19640,7 @@ yydefault: case 1260: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL Expr -//line sql.y:6399 +//line sql.y:6401 { yyLOCAL = &GeomFromTextExpr{Type: MultiLinestringFromText, WktText: yyDollar[3].exprUnion(), Srid: yyDollar[5].exprUnion(), AxisOrderOpt: yyDollar[7].exprUnion()} } @@ -19645,7 +19648,7 @@ yydefault: case 1261: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6403 +//line sql.y:6405 { yyLOCAL = &GeomFromTextExpr{Type: MultiPointFromText, WktText: yyDollar[3].exprUnion()} } @@ -19653,7 +19656,7 @@ yydefault: case 1262: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6407 +//line sql.y:6409 { yyLOCAL = &GeomFromTextExpr{Type: MultiPointFromText, WktText: yyDollar[3].exprUnion(), Srid: yyDollar[5].exprUnion()} } @@ -19661,7 +19664,7 @@ yydefault: case 1263: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL Expr -//line sql.y:6411 +//line sql.y:6413 { yyLOCAL = &GeomFromTextExpr{Type: MultiPointFromText, WktText: yyDollar[3].exprUnion(), Srid: yyDollar[5].exprUnion(), AxisOrderOpt: yyDollar[7].exprUnion()} } @@ -19669,7 +19672,7 @@ yydefault: case 1264: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6415 +//line sql.y:6417 { yyLOCAL = &GeomFromTextExpr{Type: MultiPolygonFromText, WktText: yyDollar[3].exprUnion()} } @@ -19677,7 +19680,7 @@ yydefault: case 1265: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6419 +//line sql.y:6421 { yyLOCAL = &GeomFromTextExpr{Type: MultiPolygonFromText, WktText: yyDollar[3].exprUnion(), Srid: yyDollar[5].exprUnion()} } @@ -19685,7 +19688,7 @@ yydefault: case 1266: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL Expr -//line sql.y:6423 +//line sql.y:6425 { yyLOCAL = &GeomFromTextExpr{Type: MultiPolygonFromText, WktText: yyDollar[3].exprUnion(), Srid: yyDollar[5].exprUnion(), AxisOrderOpt: yyDollar[7].exprUnion()} } @@ -19693,7 +19696,7 @@ yydefault: case 1267: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6427 +//line sql.y:6429 { yyLOCAL = &GeomFromTextExpr{Type: PointFromText, WktText: yyDollar[3].exprUnion()} } @@ -19701,7 +19704,7 @@ yydefault: case 1268: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6431 +//line sql.y:6433 { yyLOCAL = &GeomFromTextExpr{Type: PointFromText, WktText: yyDollar[3].exprUnion(), Srid: yyDollar[5].exprUnion()} } @@ -19709,7 +19712,7 @@ yydefault: case 1269: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL Expr -//line sql.y:6435 +//line sql.y:6437 { yyLOCAL = &GeomFromTextExpr{Type: PointFromText, WktText: yyDollar[3].exprUnion(), Srid: yyDollar[5].exprUnion(), AxisOrderOpt: yyDollar[7].exprUnion()} } @@ -19717,7 +19720,7 @@ yydefault: case 1270: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6439 +//line sql.y:6441 { yyLOCAL = &GeomFromTextExpr{Type: PolygonFromText, WktText: yyDollar[3].exprUnion()} } @@ -19725,7 +19728,7 @@ yydefault: case 1271: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6443 +//line sql.y:6445 { yyLOCAL = &GeomFromTextExpr{Type: PolygonFromText, WktText: yyDollar[3].exprUnion(), Srid: yyDollar[5].exprUnion()} } @@ -19733,7 +19736,7 @@ yydefault: case 1272: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL Expr -//line sql.y:6447 +//line sql.y:6449 { yyLOCAL = &GeomFromTextExpr{Type: PolygonFromText, WktText: yyDollar[3].exprUnion(), Srid: yyDollar[5].exprUnion(), AxisOrderOpt: yyDollar[7].exprUnion()} } @@ -19741,7 +19744,7 @@ yydefault: case 1273: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6451 +//line sql.y:6453 { yyLOCAL = &GeomFromWKBExpr{Type: GeometryFromWKB, WkbBlob: yyDollar[3].exprUnion()} } @@ -19749,7 +19752,7 @@ yydefault: case 1274: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6455 +//line sql.y:6457 { yyLOCAL = &GeomFromWKBExpr{Type: GeometryFromWKB, WkbBlob: yyDollar[3].exprUnion(), Srid: yyDollar[5].exprUnion()} } @@ -19757,7 +19760,7 @@ yydefault: case 1275: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL Expr -//line sql.y:6459 +//line sql.y:6461 { yyLOCAL = &GeomFromWKBExpr{Type: GeometryFromWKB, WkbBlob: yyDollar[3].exprUnion(), Srid: yyDollar[5].exprUnion(), AxisOrderOpt: yyDollar[7].exprUnion()} } @@ -19765,7 +19768,7 @@ yydefault: case 1276: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6463 +//line sql.y:6465 { yyLOCAL = &GeomFromWKBExpr{Type: GeometryCollectionFromWKB, WkbBlob: yyDollar[3].exprUnion()} } @@ -19773,7 +19776,7 @@ yydefault: case 1277: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6467 +//line sql.y:6469 { yyLOCAL = &GeomFromWKBExpr{Type: GeometryCollectionFromWKB, WkbBlob: yyDollar[3].exprUnion(), Srid: yyDollar[5].exprUnion()} } @@ -19781,7 +19784,7 @@ yydefault: case 1278: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL Expr -//line sql.y:6471 +//line sql.y:6473 { yyLOCAL = &GeomFromWKBExpr{Type: GeometryCollectionFromWKB, WkbBlob: yyDollar[3].exprUnion(), Srid: yyDollar[5].exprUnion(), AxisOrderOpt: yyDollar[7].exprUnion()} } @@ -19789,7 +19792,7 @@ yydefault: case 1279: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6475 +//line sql.y:6477 { yyLOCAL = &GeomFromWKBExpr{Type: LineStringFromWKB, WkbBlob: yyDollar[3].exprUnion()} } @@ -19797,7 +19800,7 @@ yydefault: case 1280: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6479 +//line sql.y:6481 { yyLOCAL = &GeomFromWKBExpr{Type: LineStringFromWKB, WkbBlob: yyDollar[3].exprUnion(), Srid: yyDollar[5].exprUnion()} } @@ -19805,7 +19808,7 @@ yydefault: case 1281: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL Expr -//line sql.y:6483 +//line sql.y:6485 { yyLOCAL = &GeomFromWKBExpr{Type: LineStringFromWKB, WkbBlob: yyDollar[3].exprUnion(), Srid: yyDollar[5].exprUnion(), AxisOrderOpt: yyDollar[7].exprUnion()} } @@ -19813,7 +19816,7 @@ yydefault: case 1282: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6487 +//line sql.y:6489 { yyLOCAL = &GeomFromWKBExpr{Type: MultiLinestringFromWKB, WkbBlob: yyDollar[3].exprUnion()} } @@ -19821,7 +19824,7 @@ yydefault: case 1283: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6491 +//line sql.y:6493 { yyLOCAL = &GeomFromWKBExpr{Type: MultiLinestringFromWKB, WkbBlob: yyDollar[3].exprUnion(), Srid: yyDollar[5].exprUnion()} } @@ -19829,7 +19832,7 @@ yydefault: case 1284: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL Expr -//line sql.y:6495 +//line sql.y:6497 { yyLOCAL = &GeomFromWKBExpr{Type: MultiLinestringFromWKB, WkbBlob: yyDollar[3].exprUnion(), Srid: yyDollar[5].exprUnion(), AxisOrderOpt: yyDollar[7].exprUnion()} } @@ -19837,7 +19840,7 @@ yydefault: case 1285: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6499 +//line sql.y:6501 { yyLOCAL = &GeomFromWKBExpr{Type: MultiPointFromWKB, WkbBlob: yyDollar[3].exprUnion()} } @@ -19845,7 +19848,7 @@ yydefault: case 1286: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6503 +//line sql.y:6505 { yyLOCAL = &GeomFromWKBExpr{Type: MultiPointFromWKB, WkbBlob: yyDollar[3].exprUnion(), Srid: yyDollar[5].exprUnion()} } @@ -19853,7 +19856,7 @@ yydefault: case 1287: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL Expr -//line sql.y:6507 +//line sql.y:6509 { yyLOCAL = &GeomFromWKBExpr{Type: MultiPointFromWKB, WkbBlob: yyDollar[3].exprUnion(), Srid: yyDollar[5].exprUnion(), AxisOrderOpt: yyDollar[7].exprUnion()} } @@ -19861,7 +19864,7 @@ yydefault: case 1288: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6511 +//line sql.y:6513 { yyLOCAL = &GeomFromWKBExpr{Type: MultiPolygonFromWKB, WkbBlob: yyDollar[3].exprUnion()} } @@ -19869,7 +19872,7 @@ yydefault: case 1289: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6515 +//line sql.y:6517 { yyLOCAL = &GeomFromWKBExpr{Type: MultiPolygonFromWKB, WkbBlob: yyDollar[3].exprUnion(), Srid: yyDollar[5].exprUnion()} } @@ -19877,7 +19880,7 @@ yydefault: case 1290: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL Expr -//line sql.y:6519 +//line sql.y:6521 { yyLOCAL = &GeomFromWKBExpr{Type: MultiPolygonFromWKB, WkbBlob: yyDollar[3].exprUnion(), Srid: yyDollar[5].exprUnion(), AxisOrderOpt: yyDollar[7].exprUnion()} } @@ -19885,7 +19888,7 @@ yydefault: case 1291: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6523 +//line sql.y:6525 { yyLOCAL = &GeomFromWKBExpr{Type: PointFromWKB, WkbBlob: yyDollar[3].exprUnion()} } @@ -19893,7 +19896,7 @@ yydefault: case 1292: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6527 +//line sql.y:6529 { yyLOCAL = &GeomFromWKBExpr{Type: PointFromWKB, WkbBlob: yyDollar[3].exprUnion(), Srid: yyDollar[5].exprUnion()} } @@ -19901,7 +19904,7 @@ yydefault: case 1293: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL Expr -//line sql.y:6531 +//line sql.y:6533 { yyLOCAL = &GeomFromWKBExpr{Type: PointFromWKB, WkbBlob: yyDollar[3].exprUnion(), Srid: yyDollar[5].exprUnion(), AxisOrderOpt: yyDollar[7].exprUnion()} } @@ -19909,7 +19912,7 @@ yydefault: case 1294: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6535 +//line sql.y:6537 { yyLOCAL = &GeomFromWKBExpr{Type: PolygonFromWKB, WkbBlob: yyDollar[3].exprUnion()} } @@ -19917,7 +19920,7 @@ yydefault: case 1295: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6539 +//line sql.y:6541 { yyLOCAL = &GeomFromWKBExpr{Type: PolygonFromWKB, WkbBlob: yyDollar[3].exprUnion(), Srid: yyDollar[5].exprUnion()} } @@ -19925,7 +19928,7 @@ yydefault: case 1296: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL Expr -//line sql.y:6543 +//line sql.y:6545 { yyLOCAL = &GeomFromWKBExpr{Type: PolygonFromWKB, WkbBlob: yyDollar[3].exprUnion(), Srid: yyDollar[5].exprUnion(), AxisOrderOpt: yyDollar[7].exprUnion()} } @@ -19933,7 +19936,7 @@ yydefault: case 1297: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6547 +//line sql.y:6549 { yyLOCAL = &PolygonPropertyFuncExpr{Property: Area, Polygon: yyDollar[3].exprUnion()} } @@ -19941,7 +19944,7 @@ yydefault: case 1298: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6551 +//line sql.y:6553 { yyLOCAL = &PolygonPropertyFuncExpr{Property: Centroid, Polygon: yyDollar[3].exprUnion()} } @@ -19949,7 +19952,7 @@ yydefault: case 1299: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6555 +//line sql.y:6557 { yyLOCAL = &PolygonPropertyFuncExpr{Property: ExteriorRing, Polygon: yyDollar[3].exprUnion()} } @@ -19957,7 +19960,7 @@ yydefault: case 1300: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6559 +//line sql.y:6561 { yyLOCAL = &PolygonPropertyFuncExpr{Property: InteriorRingN, Polygon: yyDollar[3].exprUnion(), PropertyDefArg: yyDollar[5].exprUnion()} } @@ -19965,7 +19968,7 @@ yydefault: case 1301: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6563 +//line sql.y:6565 { yyLOCAL = &PolygonPropertyFuncExpr{Property: NumInteriorRings, Polygon: yyDollar[3].exprUnion()} } @@ -19973,7 +19976,7 @@ yydefault: case 1302: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6567 +//line sql.y:6569 { yyLOCAL = &GeomCollPropertyFuncExpr{Property: GeometryN, GeomColl: yyDollar[3].exprUnion(), PropertyDefArg: yyDollar[5].exprUnion()} } @@ -19981,7 +19984,7 @@ yydefault: case 1303: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6571 +//line sql.y:6573 { yyLOCAL = &GeomCollPropertyFuncExpr{Property: NumGeometries, GeomColl: yyDollar[3].exprUnion()} } @@ -19989,7 +19992,7 @@ yydefault: case 1304: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL Expr -//line sql.y:6575 +//line sql.y:6577 { yyLOCAL = &GeoHashFromLatLongExpr{Longitude: yyDollar[3].exprUnion(), Latitude: yyDollar[5].exprUnion(), MaxLength: yyDollar[7].exprUnion()} } @@ -19997,7 +20000,7 @@ yydefault: case 1305: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6579 +//line sql.y:6581 { yyLOCAL = &GeoHashFromPointExpr{Point: yyDollar[3].exprUnion(), MaxLength: yyDollar[5].exprUnion()} } @@ -20005,7 +20008,7 @@ yydefault: case 1306: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6583 +//line sql.y:6585 { yyLOCAL = &GeomFromGeoHashExpr{GeomType: LatitudeFromHash, GeoHash: yyDollar[3].exprUnion()} } @@ -20013,7 +20016,7 @@ yydefault: case 1307: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6587 +//line sql.y:6589 { yyLOCAL = &GeomFromGeoHashExpr{GeomType: LongitudeFromHash, GeoHash: yyDollar[3].exprUnion()} } @@ -20021,7 +20024,7 @@ yydefault: case 1308: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6591 +//line sql.y:6593 { yyLOCAL = &GeomFromGeoHashExpr{GeomType: PointFromHash, GeoHash: yyDollar[3].exprUnion(), SridOpt: yyDollar[5].exprUnion()} } @@ -20029,7 +20032,7 @@ yydefault: case 1309: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6595 +//line sql.y:6597 { yyLOCAL = &GeomFromGeoJSONExpr{GeoJSON: yyDollar[3].exprUnion()} } @@ -20037,7 +20040,7 @@ yydefault: case 1310: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6599 +//line sql.y:6601 { yyLOCAL = &GeomFromGeoJSONExpr{GeoJSON: yyDollar[3].exprUnion(), HigherDimHandlerOpt: yyDollar[5].exprUnion()} } @@ -20045,7 +20048,7 @@ yydefault: case 1311: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL Expr -//line sql.y:6603 +//line sql.y:6605 { yyLOCAL = &GeomFromGeoJSONExpr{GeoJSON: yyDollar[3].exprUnion(), HigherDimHandlerOpt: yyDollar[5].exprUnion(), Srid: yyDollar[7].exprUnion()} } @@ -20053,7 +20056,7 @@ yydefault: case 1312: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6607 +//line sql.y:6609 { yyLOCAL = &GeoJSONFromGeomExpr{Geom: yyDollar[3].exprUnion()} } @@ -20061,7 +20064,7 @@ yydefault: case 1313: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6611 +//line sql.y:6613 { yyLOCAL = &GeoJSONFromGeomExpr{Geom: yyDollar[3].exprUnion(), MaxDecimalDigits: yyDollar[5].exprUnion()} } @@ -20069,7 +20072,7 @@ yydefault: case 1314: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL Expr -//line sql.y:6615 +//line sql.y:6617 { yyLOCAL = &GeoJSONFromGeomExpr{Geom: yyDollar[3].exprUnion(), MaxDecimalDigits: yyDollar[5].exprUnion(), Bitmask: yyDollar[7].exprUnion()} } @@ -20077,7 +20080,7 @@ yydefault: case 1315: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6619 +//line sql.y:6621 { yyLOCAL = &JSONObjectExpr{Params: yyDollar[3].jsonObjectParamsUnion()} } @@ -20085,7 +20088,7 @@ yydefault: case 1316: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6623 +//line sql.y:6625 { yyLOCAL = &JSONQuoteExpr{StringArg: yyDollar[3].exprUnion()} } @@ -20093,7 +20096,7 @@ yydefault: case 1317: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6627 +//line sql.y:6629 { yyLOCAL = &JSONContainsExpr{Target: yyDollar[3].exprUnion(), Candidate: yyDollar[5].exprsUnion()[0], PathList: yyDollar[5].exprsUnion()[1:]} } @@ -20101,7 +20104,7 @@ yydefault: case 1318: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL Expr -//line sql.y:6631 +//line sql.y:6633 { yyLOCAL = &JSONContainsPathExpr{JSONDoc: yyDollar[3].exprUnion(), OneOrAll: yyDollar[5].exprUnion(), PathList: yyDollar[7].exprsUnion()} } @@ -20109,7 +20112,7 @@ yydefault: case 1319: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6635 +//line sql.y:6637 { yyLOCAL = &JSONExtractExpr{JSONDoc: yyDollar[3].exprUnion(), PathList: yyDollar[5].exprsUnion()} } @@ -20117,7 +20120,7 @@ yydefault: case 1320: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6639 +//line sql.y:6641 { yyLOCAL = &JSONKeysExpr{JSONDoc: yyDollar[3].exprUnion()} } @@ -20125,7 +20128,7 @@ yydefault: case 1321: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6643 +//line sql.y:6645 { yyLOCAL = &JSONKeysExpr{JSONDoc: yyDollar[3].exprUnion(), Path: yyDollar[5].exprUnion()} } @@ -20133,7 +20136,7 @@ yydefault: case 1322: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6647 +//line sql.y:6649 { yyLOCAL = &JSONOverlapsExpr{JSONDoc1: yyDollar[3].exprUnion(), JSONDoc2: yyDollar[5].exprUnion()} } @@ -20141,7 +20144,7 @@ yydefault: case 1323: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL Expr -//line sql.y:6651 +//line sql.y:6653 { yyLOCAL = &JSONSearchExpr{JSONDoc: yyDollar[3].exprUnion(), OneOrAll: yyDollar[5].exprUnion(), SearchStr: yyDollar[7].exprUnion()} } @@ -20149,7 +20152,7 @@ yydefault: case 1324: yyDollar = yyS[yypt-10 : yypt+1] var yyLOCAL Expr -//line sql.y:6655 +//line sql.y:6657 { yyLOCAL = &JSONSearchExpr{JSONDoc: yyDollar[3].exprUnion(), OneOrAll: yyDollar[5].exprUnion(), SearchStr: yyDollar[7].exprUnion(), EscapeChar: yyDollar[9].exprsUnion()[0], PathList: yyDollar[9].exprsUnion()[1:]} } @@ -20157,7 +20160,7 @@ yydefault: case 1325: yyDollar = yyS[yypt-7 : yypt+1] var yyLOCAL Expr -//line sql.y:6659 +//line sql.y:6661 { yyLOCAL = &JSONValueExpr{JSONDoc: yyDollar[3].exprUnion(), Path: yyDollar[5].exprUnion(), ReturningType: yyDollar[6].convertTypeUnion()} } @@ -20165,7 +20168,7 @@ yydefault: case 1326: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL Expr -//line sql.y:6663 +//line sql.y:6665 { yyLOCAL = &JSONValueExpr{JSONDoc: yyDollar[3].exprUnion(), Path: yyDollar[5].exprUnion(), ReturningType: yyDollar[6].convertTypeUnion(), EmptyOnResponse: yyDollar[7].jtOnResponseUnion()} } @@ -20173,7 +20176,7 @@ yydefault: case 1327: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL Expr -//line sql.y:6667 +//line sql.y:6669 { yyLOCAL = &JSONValueExpr{JSONDoc: yyDollar[3].exprUnion(), Path: yyDollar[5].exprUnion(), ReturningType: yyDollar[6].convertTypeUnion(), ErrorOnResponse: yyDollar[7].jtOnResponseUnion()} } @@ -20181,7 +20184,7 @@ yydefault: case 1328: yyDollar = yyS[yypt-9 : yypt+1] var yyLOCAL Expr -//line sql.y:6671 +//line sql.y:6673 { yyLOCAL = &JSONValueExpr{JSONDoc: yyDollar[3].exprUnion(), Path: yyDollar[5].exprUnion(), ReturningType: yyDollar[6].convertTypeUnion(), EmptyOnResponse: yyDollar[7].jtOnResponseUnion(), ErrorOnResponse: yyDollar[8].jtOnResponseUnion()} } @@ -20189,7 +20192,7 @@ yydefault: case 1329: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6675 +//line sql.y:6677 { yyLOCAL = &JSONAttributesExpr{Type: DepthAttributeType, JSONDoc: yyDollar[3].exprUnion()} } @@ -20197,7 +20200,7 @@ yydefault: case 1330: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6679 +//line sql.y:6681 { yyLOCAL = &JSONAttributesExpr{Type: ValidAttributeType, JSONDoc: yyDollar[3].exprUnion()} } @@ -20205,7 +20208,7 @@ yydefault: case 1331: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6683 +//line sql.y:6685 { yyLOCAL = &JSONAttributesExpr{Type: TypeAttributeType, JSONDoc: yyDollar[3].exprUnion()} } @@ -20213,7 +20216,7 @@ yydefault: case 1332: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6687 +//line sql.y:6689 { yyLOCAL = &JSONAttributesExpr{Type: LengthAttributeType, JSONDoc: yyDollar[3].exprUnion()} } @@ -20221,7 +20224,7 @@ yydefault: case 1333: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6691 +//line sql.y:6693 { yyLOCAL = &JSONAttributesExpr{Type: LengthAttributeType, JSONDoc: yyDollar[3].exprUnion(), Path: yyDollar[5].exprUnion()} } @@ -20229,7 +20232,7 @@ yydefault: case 1334: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6695 +//line sql.y:6697 { yyLOCAL = &JSONValueModifierExpr{Type: JSONArrayAppendType, JSONDoc: yyDollar[3].exprUnion(), Params: yyDollar[5].jsonObjectParamsUnion()} } @@ -20237,7 +20240,7 @@ yydefault: case 1335: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6699 +//line sql.y:6701 { yyLOCAL = &JSONValueModifierExpr{Type: JSONArrayInsertType, JSONDoc: yyDollar[3].exprUnion(), Params: yyDollar[5].jsonObjectParamsUnion()} } @@ -20245,7 +20248,7 @@ yydefault: case 1336: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6703 +//line sql.y:6705 { yyLOCAL = &JSONValueModifierExpr{Type: JSONInsertType, JSONDoc: yyDollar[3].exprUnion(), Params: yyDollar[5].jsonObjectParamsUnion()} } @@ -20253,7 +20256,7 @@ yydefault: case 1337: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6707 +//line sql.y:6709 { yyLOCAL = &JSONValueModifierExpr{Type: JSONReplaceType, JSONDoc: yyDollar[3].exprUnion(), Params: yyDollar[5].jsonObjectParamsUnion()} } @@ -20261,7 +20264,7 @@ yydefault: case 1338: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6711 +//line sql.y:6713 { yyLOCAL = &JSONValueModifierExpr{Type: JSONSetType, JSONDoc: yyDollar[3].exprUnion(), Params: yyDollar[5].jsonObjectParamsUnion()} } @@ -20269,7 +20272,7 @@ yydefault: case 1339: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6715 +//line sql.y:6717 { yyLOCAL = &JSONValueMergeExpr{Type: JSONMergeType, JSONDoc: yyDollar[3].exprUnion(), JSONDocList: yyDollar[5].exprsUnion()} } @@ -20277,7 +20280,7 @@ yydefault: case 1340: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6719 +//line sql.y:6721 { yyLOCAL = &JSONValueMergeExpr{Type: JSONMergePatchType, JSONDoc: yyDollar[3].exprUnion(), JSONDocList: yyDollar[5].exprsUnion()} } @@ -20285,7 +20288,7 @@ yydefault: case 1341: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6723 +//line sql.y:6725 { yyLOCAL = &JSONValueMergeExpr{Type: JSONMergePreserveType, JSONDoc: yyDollar[3].exprUnion(), JSONDocList: yyDollar[5].exprsUnion()} } @@ -20293,7 +20296,7 @@ yydefault: case 1342: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6727 +//line sql.y:6729 { yyLOCAL = &JSONRemoveExpr{JSONDoc: yyDollar[3].exprUnion(), PathList: yyDollar[5].exprsUnion()} } @@ -20301,7 +20304,7 @@ yydefault: case 1343: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6731 +//line sql.y:6733 { yyLOCAL = &JSONUnquoteExpr{JSONValue: yyDollar[3].exprUnion()} } @@ -20309,7 +20312,7 @@ yydefault: case 1344: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6735 +//line sql.y:6737 { yyLOCAL = &MultiPolygonExpr{PolygonParams: yyDollar[3].exprsUnion()} } @@ -20317,7 +20320,7 @@ yydefault: case 1345: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6739 +//line sql.y:6741 { yyLOCAL = &MultiPointExpr{PointParams: yyDollar[3].exprsUnion()} } @@ -20325,7 +20328,7 @@ yydefault: case 1346: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6743 +//line sql.y:6745 { yyLOCAL = &MultiLinestringExpr{LinestringParams: yyDollar[3].exprsUnion()} } @@ -20333,7 +20336,7 @@ yydefault: case 1347: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6747 +//line sql.y:6749 { yyLOCAL = &PolygonExpr{LinestringParams: yyDollar[3].exprsUnion()} } @@ -20341,7 +20344,7 @@ yydefault: case 1348: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6751 +//line sql.y:6753 { yyLOCAL = &LineStringExpr{PointParams: yyDollar[3].exprsUnion()} } @@ -20349,7 +20352,7 @@ yydefault: case 1349: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6755 +//line sql.y:6757 { yyLOCAL = &PointExpr{XCordinate: yyDollar[3].exprUnion(), YCordinate: yyDollar[5].exprUnion()} } @@ -20357,7 +20360,7 @@ yydefault: case 1350: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6759 +//line sql.y:6761 { yyLOCAL = &ArgumentLessWindowExpr{Type: yyDollar[1].argumentLessWindowExprTypeUnion(), OverClause: yyDollar[4].overClauseUnion()} } @@ -20365,7 +20368,7 @@ yydefault: case 1351: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6763 +//line sql.y:6765 { yyLOCAL = &FirstOrLastValueExpr{Type: yyDollar[1].firstOrLastValueExprTypeUnion(), Expr: yyDollar[3].exprUnion(), NullTreatmentClause: yyDollar[5].nullTreatmentClauseUnion(), OverClause: yyDollar[6].overClauseUnion()} } @@ -20373,7 +20376,7 @@ yydefault: case 1352: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL Expr -//line sql.y:6767 +//line sql.y:6769 { yyLOCAL = &NtileExpr{N: yyDollar[3].exprUnion(), OverClause: yyDollar[5].overClauseUnion()} } @@ -20381,7 +20384,7 @@ yydefault: case 1353: yyDollar = yyS[yypt-9 : yypt+1] var yyLOCAL Expr -//line sql.y:6771 +//line sql.y:6773 { yyLOCAL = &NTHValueExpr{Expr: yyDollar[3].exprUnion(), N: yyDollar[5].exprUnion(), FromFirstLastClause: yyDollar[7].fromFirstLastClauseUnion(), NullTreatmentClause: yyDollar[8].nullTreatmentClauseUnion(), OverClause: yyDollar[9].overClauseUnion()} } @@ -20389,7 +20392,7 @@ yydefault: case 1354: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6775 +//line sql.y:6777 { yyLOCAL = &LagLeadExpr{Type: yyDollar[1].lagLeadExprTypeUnion(), Expr: yyDollar[3].exprUnion(), NullTreatmentClause: yyDollar[5].nullTreatmentClauseUnion(), OverClause: yyDollar[6].overClauseUnion()} } @@ -20397,7 +20400,7 @@ yydefault: case 1355: yyDollar = yyS[yypt-9 : yypt+1] var yyLOCAL Expr -//line sql.y:6779 +//line sql.y:6781 { yyLOCAL = &LagLeadExpr{Type: yyDollar[1].lagLeadExprTypeUnion(), Expr: yyDollar[3].exprUnion(), N: yyDollar[5].exprUnion(), Default: yyDollar[6].exprUnion(), NullTreatmentClause: yyDollar[8].nullTreatmentClauseUnion(), OverClause: yyDollar[9].overClauseUnion()} } @@ -20405,7 +20408,7 @@ yydefault: case 1356: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL Expr -//line sql.y:6783 +//line sql.y:6785 { yyLOCAL = &IntervalDateExpr{Syntax: IntervalDateExprAdddate, Date: yyDollar[3].exprUnion(), Interval: yyDollar[6].exprUnion(), Unit: yyDollar[7].intervalTypeUnion()} } @@ -20413,7 +20416,7 @@ yydefault: case 1357: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6787 +//line sql.y:6789 { yyLOCAL = &IntervalDateExpr{Syntax: IntervalDateExprAdddate, Date: yyDollar[3].exprUnion(), Interval: yyDollar[5].exprUnion(), Unit: IntervalNone} } @@ -20421,7 +20424,7 @@ yydefault: case 1358: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL Expr -//line sql.y:6791 +//line sql.y:6793 { yyLOCAL = &IntervalDateExpr{Syntax: IntervalDateExprDateAdd, Date: yyDollar[3].exprUnion(), Interval: yyDollar[6].exprUnion(), Unit: yyDollar[7].intervalTypeUnion()} } @@ -20429,7 +20432,7 @@ yydefault: case 1359: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL Expr -//line sql.y:6795 +//line sql.y:6797 { yyLOCAL = &IntervalDateExpr{Syntax: IntervalDateExprDateSub, Date: yyDollar[3].exprUnion(), Interval: yyDollar[6].exprUnion(), Unit: yyDollar[7].intervalTypeUnion()} } @@ -20437,7 +20440,7 @@ yydefault: case 1360: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL Expr -//line sql.y:6799 +//line sql.y:6801 { yyLOCAL = &IntervalDateExpr{Syntax: IntervalDateExprSubdate, Date: yyDollar[3].exprUnion(), Interval: yyDollar[6].exprUnion(), Unit: yyDollar[7].intervalTypeUnion()} } @@ -20445,7 +20448,7 @@ yydefault: case 1361: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6803 +//line sql.y:6805 { yyLOCAL = &IntervalDateExpr{Syntax: IntervalDateExprSubdate, Date: yyDollar[3].exprUnion(), Interval: yyDollar[5].exprUnion(), Unit: IntervalNone} } @@ -20453,7 +20456,7 @@ yydefault: case 1366: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:6813 +//line sql.y:6815 { yyLOCAL = yyDollar[1].exprUnion() } @@ -20461,7 +20464,7 @@ yydefault: case 1367: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:6817 +//line sql.y:6819 { yyLOCAL = NewIntLiteral(yyDollar[1].str) } @@ -20469,7 +20472,7 @@ yydefault: case 1368: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:6821 +//line sql.y:6823 { yyLOCAL = yyDollar[1].variableUnion() } @@ -20477,7 +20480,7 @@ yydefault: case 1369: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:6825 +//line sql.y:6827 { yyLOCAL = parseBindVariable(yylex, yyDollar[1].str[1:]) } @@ -20485,7 +20488,7 @@ yydefault: case 1370: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL Expr -//line sql.y:6830 +//line sql.y:6832 { yyLOCAL = nil } @@ -20493,7 +20496,7 @@ yydefault: case 1371: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Expr -//line sql.y:6834 +//line sql.y:6836 { yyLOCAL = yyDollar[2].exprUnion() } @@ -20501,7 +20504,7 @@ yydefault: case 1372: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6840 +//line sql.y:6842 { yyLOCAL = &RegexpInstrExpr{Expr: yyDollar[3].exprUnion(), Pattern: yyDollar[5].exprUnion()} } @@ -20509,7 +20512,7 @@ yydefault: case 1373: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL Expr -//line sql.y:6844 +//line sql.y:6846 { yyLOCAL = &RegexpInstrExpr{Expr: yyDollar[3].exprUnion(), Pattern: yyDollar[5].exprUnion(), Position: yyDollar[7].exprUnion()} } @@ -20517,7 +20520,7 @@ yydefault: case 1374: yyDollar = yyS[yypt-10 : yypt+1] var yyLOCAL Expr -//line sql.y:6848 +//line sql.y:6850 { yyLOCAL = &RegexpInstrExpr{Expr: yyDollar[3].exprUnion(), Pattern: yyDollar[5].exprUnion(), Position: yyDollar[7].exprUnion(), Occurrence: yyDollar[9].exprUnion()} } @@ -20525,7 +20528,7 @@ yydefault: case 1375: yyDollar = yyS[yypt-12 : yypt+1] var yyLOCAL Expr -//line sql.y:6852 +//line sql.y:6854 { yyLOCAL = &RegexpInstrExpr{Expr: yyDollar[3].exprUnion(), Pattern: yyDollar[5].exprUnion(), Position: yyDollar[7].exprUnion(), Occurrence: yyDollar[9].exprUnion(), ReturnOption: yyDollar[11].exprUnion()} } @@ -20533,7 +20536,7 @@ yydefault: case 1376: yyDollar = yyS[yypt-14 : yypt+1] var yyLOCAL Expr -//line sql.y:6856 +//line sql.y:6858 { // Match type is kept expression as TRIM( ' m ') is accepted yyLOCAL = &RegexpInstrExpr{Expr: yyDollar[3].exprUnion(), Pattern: yyDollar[5].exprUnion(), Position: yyDollar[7].exprUnion(), Occurrence: yyDollar[9].exprUnion(), ReturnOption: yyDollar[11].exprUnion(), MatchType: yyDollar[13].exprUnion()} @@ -20542,7 +20545,7 @@ yydefault: case 1377: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6861 +//line sql.y:6863 { yyLOCAL = &RegexpLikeExpr{Expr: yyDollar[3].exprUnion(), Pattern: yyDollar[5].exprUnion()} } @@ -20550,7 +20553,7 @@ yydefault: case 1378: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL Expr -//line sql.y:6865 +//line sql.y:6867 { yyLOCAL = &RegexpLikeExpr{Expr: yyDollar[3].exprUnion(), Pattern: yyDollar[5].exprUnion(), MatchType: yyDollar[7].exprUnion()} } @@ -20558,7 +20561,7 @@ yydefault: case 1379: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL Expr -//line sql.y:6869 +//line sql.y:6871 { yyLOCAL = &RegexpReplaceExpr{Expr: yyDollar[3].exprUnion(), Pattern: yyDollar[5].exprUnion(), Repl: yyDollar[7].exprUnion()} } @@ -20566,7 +20569,7 @@ yydefault: case 1380: yyDollar = yyS[yypt-10 : yypt+1] var yyLOCAL Expr -//line sql.y:6873 +//line sql.y:6875 { yyLOCAL = &RegexpReplaceExpr{Expr: yyDollar[3].exprUnion(), Pattern: yyDollar[5].exprUnion(), Repl: yyDollar[7].exprUnion(), Position: yyDollar[9].exprUnion()} } @@ -20574,7 +20577,7 @@ yydefault: case 1381: yyDollar = yyS[yypt-12 : yypt+1] var yyLOCAL Expr -//line sql.y:6877 +//line sql.y:6879 { yyLOCAL = &RegexpReplaceExpr{Expr: yyDollar[3].exprUnion(), Pattern: yyDollar[5].exprUnion(), Repl: yyDollar[7].exprUnion(), Position: yyDollar[9].exprUnion(), Occurrence: yyDollar[11].exprUnion()} } @@ -20582,7 +20585,7 @@ yydefault: case 1382: yyDollar = yyS[yypt-14 : yypt+1] var yyLOCAL Expr -//line sql.y:6881 +//line sql.y:6883 { // Match type is kept expression as TRIM( ' m ') is accepted yyLOCAL = &RegexpReplaceExpr{Expr: yyDollar[3].exprUnion(), Pattern: yyDollar[5].exprUnion(), Repl: yyDollar[7].exprUnion(), Position: yyDollar[9].exprUnion(), Occurrence: yyDollar[11].exprUnion(), MatchType: yyDollar[13].exprUnion()} @@ -20591,7 +20594,7 @@ yydefault: case 1383: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6886 +//line sql.y:6888 { yyLOCAL = &RegexpSubstrExpr{Expr: yyDollar[3].exprUnion(), Pattern: yyDollar[5].exprUnion()} } @@ -20599,7 +20602,7 @@ yydefault: case 1384: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL Expr -//line sql.y:6890 +//line sql.y:6892 { yyLOCAL = &RegexpSubstrExpr{Expr: yyDollar[3].exprUnion(), Pattern: yyDollar[5].exprUnion(), Position: yyDollar[7].exprUnion()} } @@ -20607,7 +20610,7 @@ yydefault: case 1385: yyDollar = yyS[yypt-10 : yypt+1] var yyLOCAL Expr -//line sql.y:6894 +//line sql.y:6896 { yyLOCAL = &RegexpSubstrExpr{Expr: yyDollar[3].exprUnion(), Pattern: yyDollar[5].exprUnion(), Position: yyDollar[7].exprUnion(), Occurrence: yyDollar[9].exprUnion()} } @@ -20615,7 +20618,7 @@ yydefault: case 1386: yyDollar = yyS[yypt-12 : yypt+1] var yyLOCAL Expr -//line sql.y:6898 +//line sql.y:6900 { // Match type is kept expression as TRIM( ' m ') is accepted yyLOCAL = &RegexpSubstrExpr{Expr: yyDollar[3].exprUnion(), Pattern: yyDollar[5].exprUnion(), Position: yyDollar[7].exprUnion(), Occurrence: yyDollar[9].exprUnion(), MatchType: yyDollar[11].exprUnion()} @@ -20624,7 +20627,7 @@ yydefault: case 1387: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6905 +//line sql.y:6907 { yyLOCAL = &ExtractValueExpr{Fragment: yyDollar[3].exprUnion(), XPathExpr: yyDollar[5].exprUnion()} } @@ -20632,7 +20635,7 @@ yydefault: case 1388: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL Expr -//line sql.y:6909 +//line sql.y:6911 { yyLOCAL = &UpdateXMLExpr{Target: yyDollar[3].exprUnion(), XPathExpr: yyDollar[5].exprUnion(), NewXML: yyDollar[7].exprUnion()} } @@ -20640,7 +20643,7 @@ yydefault: case 1389: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6915 +//line sql.y:6917 { yyLOCAL = &PerformanceSchemaFuncExpr{Type: FormatBytesType, Argument: yyDollar[3].exprUnion()} } @@ -20648,7 +20651,7 @@ yydefault: case 1390: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6919 +//line sql.y:6921 { yyLOCAL = &PerformanceSchemaFuncExpr{Type: FormatPicoTimeType, Argument: yyDollar[3].exprUnion()} } @@ -20656,7 +20659,7 @@ yydefault: case 1391: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Expr -//line sql.y:6923 +//line sql.y:6925 { yyLOCAL = &PerformanceSchemaFuncExpr{Type: PsCurrentThreadIDType} } @@ -20664,7 +20667,7 @@ yydefault: case 1392: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6927 +//line sql.y:6929 { yyLOCAL = &PerformanceSchemaFuncExpr{Type: PsThreadIDType, Argument: yyDollar[3].exprUnion()} } @@ -20672,7 +20675,7 @@ yydefault: case 1393: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6933 +//line sql.y:6935 { yyLOCAL = >IDFuncExpr{Type: GTIDSubsetType, Set1: yyDollar[3].exprUnion(), Set2: yyDollar[5].exprUnion()} } @@ -20680,7 +20683,7 @@ yydefault: case 1394: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6937 +//line sql.y:6939 { yyLOCAL = >IDFuncExpr{Type: GTIDSubtractType, Set1: yyDollar[3].exprUnion(), Set2: yyDollar[5].exprUnion()} } @@ -20688,7 +20691,7 @@ yydefault: case 1395: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6941 +//line sql.y:6943 { yyLOCAL = >IDFuncExpr{Type: WaitForExecutedGTIDSetType, Set1: yyDollar[3].exprUnion()} } @@ -20696,7 +20699,7 @@ yydefault: case 1396: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6945 +//line sql.y:6947 { yyLOCAL = >IDFuncExpr{Type: WaitForExecutedGTIDSetType, Set1: yyDollar[3].exprUnion(), Timeout: yyDollar[5].exprUnion()} } @@ -20704,7 +20707,7 @@ yydefault: case 1397: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6949 +//line sql.y:6951 { yyLOCAL = >IDFuncExpr{Type: WaitUntilSQLThreadAfterGTIDSType, Set1: yyDollar[3].exprUnion()} } @@ -20712,7 +20715,7 @@ yydefault: case 1398: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6953 +//line sql.y:6955 { yyLOCAL = >IDFuncExpr{Type: WaitUntilSQLThreadAfterGTIDSType, Set1: yyDollar[3].exprUnion(), Timeout: yyDollar[5].exprUnion()} } @@ -20720,7 +20723,7 @@ yydefault: case 1399: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL Expr -//line sql.y:6957 +//line sql.y:6959 { yyLOCAL = >IDFuncExpr{Type: WaitUntilSQLThreadAfterGTIDSType, Set1: yyDollar[3].exprUnion(), Timeout: yyDollar[5].exprUnion(), Channel: yyDollar[7].exprUnion()} } @@ -20728,7 +20731,7 @@ yydefault: case 1400: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL *ConvertType -//line sql.y:6962 +//line sql.y:6964 { yyLOCAL = nil } @@ -20736,7 +20739,7 @@ yydefault: case 1401: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *ConvertType -//line sql.y:6966 +//line sql.y:6968 { yyLOCAL = yyDollar[2].convertTypeUnion() } @@ -20744,7 +20747,7 @@ yydefault: case 1402: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IntervalType -//line sql.y:6972 +//line sql.y:6974 { yyLOCAL = IntervalDayHour } @@ -20752,7 +20755,7 @@ yydefault: case 1403: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IntervalType -//line sql.y:6976 +//line sql.y:6978 { yyLOCAL = IntervalDayMicrosecond } @@ -20760,7 +20763,7 @@ yydefault: case 1404: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IntervalType -//line sql.y:6980 +//line sql.y:6982 { yyLOCAL = IntervalDayMinute } @@ -20768,7 +20771,7 @@ yydefault: case 1405: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IntervalType -//line sql.y:6984 +//line sql.y:6986 { yyLOCAL = IntervalDaySecond } @@ -20776,7 +20779,7 @@ yydefault: case 1406: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IntervalType -//line sql.y:6988 +//line sql.y:6990 { yyLOCAL = IntervalHourMicrosecond } @@ -20784,7 +20787,7 @@ yydefault: case 1407: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IntervalType -//line sql.y:6992 +//line sql.y:6994 { yyLOCAL = IntervalHourMinute } @@ -20792,7 +20795,7 @@ yydefault: case 1408: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IntervalType -//line sql.y:6996 +//line sql.y:6998 { yyLOCAL = IntervalHourSecond } @@ -20800,7 +20803,7 @@ yydefault: case 1409: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IntervalType -//line sql.y:7000 +//line sql.y:7002 { yyLOCAL = IntervalMinuteMicrosecond } @@ -20808,7 +20811,7 @@ yydefault: case 1410: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IntervalType -//line sql.y:7004 +//line sql.y:7006 { yyLOCAL = IntervalMinuteSecond } @@ -20816,7 +20819,7 @@ yydefault: case 1411: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IntervalType -//line sql.y:7008 +//line sql.y:7010 { yyLOCAL = IntervalSecondMicrosecond } @@ -20824,7 +20827,7 @@ yydefault: case 1412: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IntervalType -//line sql.y:7012 +//line sql.y:7014 { yyLOCAL = IntervalYearMonth } @@ -20832,7 +20835,7 @@ yydefault: case 1413: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IntervalType -//line sql.y:7016 +//line sql.y:7018 { yyLOCAL = IntervalDay } @@ -20840,7 +20843,7 @@ yydefault: case 1414: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IntervalType -//line sql.y:7020 +//line sql.y:7022 { yyLOCAL = IntervalWeek } @@ -20848,7 +20851,7 @@ yydefault: case 1415: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IntervalType -//line sql.y:7024 +//line sql.y:7026 { yyLOCAL = IntervalHour } @@ -20856,7 +20859,7 @@ yydefault: case 1416: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IntervalType -//line sql.y:7028 +//line sql.y:7030 { yyLOCAL = IntervalMinute } @@ -20864,7 +20867,7 @@ yydefault: case 1417: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IntervalType -//line sql.y:7032 +//line sql.y:7034 { yyLOCAL = IntervalMonth } @@ -20872,7 +20875,7 @@ yydefault: case 1418: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IntervalType -//line sql.y:7036 +//line sql.y:7038 { yyLOCAL = IntervalQuarter } @@ -20880,7 +20883,7 @@ yydefault: case 1419: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IntervalType -//line sql.y:7040 +//line sql.y:7042 { yyLOCAL = IntervalSecond } @@ -20888,7 +20891,7 @@ yydefault: case 1420: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IntervalType -//line sql.y:7044 +//line sql.y:7046 { yyLOCAL = IntervalMicrosecond } @@ -20896,7 +20899,7 @@ yydefault: case 1421: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IntervalType -//line sql.y:7048 +//line sql.y:7050 { yyLOCAL = IntervalYear } @@ -20904,7 +20907,7 @@ yydefault: case 1422: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IntervalType -//line sql.y:7054 +//line sql.y:7056 { yyLOCAL = IntervalDay } @@ -20912,7 +20915,7 @@ yydefault: case 1423: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IntervalType -//line sql.y:7058 +//line sql.y:7060 { yyLOCAL = IntervalWeek } @@ -20920,7 +20923,7 @@ yydefault: case 1424: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IntervalType -//line sql.y:7062 +//line sql.y:7064 { yyLOCAL = IntervalHour } @@ -20928,7 +20931,7 @@ yydefault: case 1425: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IntervalType -//line sql.y:7066 +//line sql.y:7068 { yyLOCAL = IntervalMinute } @@ -20936,7 +20939,7 @@ yydefault: case 1426: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IntervalType -//line sql.y:7070 +//line sql.y:7072 { yyLOCAL = IntervalMonth } @@ -20944,7 +20947,7 @@ yydefault: case 1427: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IntervalType -//line sql.y:7074 +//line sql.y:7076 { yyLOCAL = IntervalQuarter } @@ -20952,7 +20955,7 @@ yydefault: case 1428: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IntervalType -//line sql.y:7078 +//line sql.y:7080 { yyLOCAL = IntervalSecond } @@ -20960,7 +20963,7 @@ yydefault: case 1429: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IntervalType -//line sql.y:7082 +//line sql.y:7084 { yyLOCAL = IntervalMicrosecond } @@ -20968,7 +20971,7 @@ yydefault: case 1430: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IntervalType -//line sql.y:7086 +//line sql.y:7088 { yyLOCAL = IntervalYear } @@ -20976,7 +20979,7 @@ yydefault: case 1431: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IntervalType -//line sql.y:7090 +//line sql.y:7092 { yyLOCAL = IntervalDay } @@ -20984,7 +20987,7 @@ yydefault: case 1432: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IntervalType -//line sql.y:7094 +//line sql.y:7096 { yyLOCAL = IntervalWeek } @@ -20992,7 +20995,7 @@ yydefault: case 1433: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IntervalType -//line sql.y:7098 +//line sql.y:7100 { yyLOCAL = IntervalHour } @@ -21000,7 +21003,7 @@ yydefault: case 1434: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IntervalType -//line sql.y:7102 +//line sql.y:7104 { yyLOCAL = IntervalMinute } @@ -21008,7 +21011,7 @@ yydefault: case 1435: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IntervalType -//line sql.y:7106 +//line sql.y:7108 { yyLOCAL = IntervalMonth } @@ -21016,7 +21019,7 @@ yydefault: case 1436: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IntervalType -//line sql.y:7110 +//line sql.y:7112 { yyLOCAL = IntervalQuarter } @@ -21024,7 +21027,7 @@ yydefault: case 1437: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IntervalType -//line sql.y:7114 +//line sql.y:7116 { yyLOCAL = IntervalSecond } @@ -21032,7 +21035,7 @@ yydefault: case 1438: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IntervalType -//line sql.y:7118 +//line sql.y:7120 { yyLOCAL = IntervalMicrosecond } @@ -21040,7 +21043,7 @@ yydefault: case 1439: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IntervalType -//line sql.y:7122 +//line sql.y:7124 { yyLOCAL = IntervalYear } @@ -21048,7 +21051,7 @@ yydefault: case 1442: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL int -//line sql.y:7132 +//line sql.y:7134 { yyLOCAL = 0 } @@ -21056,7 +21059,7 @@ yydefault: case 1443: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL int -//line sql.y:7136 +//line sql.y:7138 { yyLOCAL = 0 } @@ -21064,7 +21067,7 @@ yydefault: case 1444: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL int -//line sql.y:7140 +//line sql.y:7142 { yyLOCAL = convertStringToInt(yyDollar[2].str) } @@ -21072,7 +21075,7 @@ yydefault: case 1445: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:7150 +//line sql.y:7152 { yyLOCAL = &FuncExpr{Name: NewIdentifierCI("if"), Exprs: yyDollar[3].exprsUnion()} } @@ -21080,7 +21083,7 @@ yydefault: case 1446: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:7154 +//line sql.y:7156 { yyLOCAL = &FuncExpr{Name: NewIdentifierCI("database"), Exprs: yyDollar[3].exprsUnion()} } @@ -21088,7 +21091,7 @@ yydefault: case 1447: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:7158 +//line sql.y:7160 { yyLOCAL = &FuncExpr{Name: NewIdentifierCI("schema"), Exprs: yyDollar[3].exprsUnion()} } @@ -21096,7 +21099,7 @@ yydefault: case 1448: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:7162 +//line sql.y:7164 { yyLOCAL = &FuncExpr{Name: NewIdentifierCI("mod"), Exprs: yyDollar[3].exprsUnion()} } @@ -21104,7 +21107,7 @@ yydefault: case 1449: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:7166 +//line sql.y:7168 { yyLOCAL = &FuncExpr{Name: NewIdentifierCI("replace"), Exprs: yyDollar[3].exprsUnion()} } @@ -21112,7 +21115,7 @@ yydefault: case 1450: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL MatchExprOption -//line sql.y:7172 +//line sql.y:7174 { yyLOCAL = NoOption } @@ -21120,7 +21123,7 @@ yydefault: case 1451: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL MatchExprOption -//line sql.y:7176 +//line sql.y:7178 { yyLOCAL = BooleanModeOpt } @@ -21128,7 +21131,7 @@ yydefault: case 1452: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL MatchExprOption -//line sql.y:7180 +//line sql.y:7182 { yyLOCAL = NaturalLanguageModeOpt } @@ -21136,7 +21139,7 @@ yydefault: case 1453: yyDollar = yyS[yypt-7 : yypt+1] var yyLOCAL MatchExprOption -//line sql.y:7184 +//line sql.y:7186 { yyLOCAL = NaturalLanguageModeWithQueryExpansionOpt } @@ -21144,33 +21147,33 @@ yydefault: case 1454: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL MatchExprOption -//line sql.y:7188 +//line sql.y:7190 { yyLOCAL = QueryExpansionOpt } yyVAL.union = yyLOCAL case 1455: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:7194 +//line sql.y:7196 { yyVAL.str = string(yyDollar[1].identifierCI.String()) } case 1456: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:7198 +//line sql.y:7200 { yyVAL.str = string(yyDollar[1].str) } case 1457: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:7202 +//line sql.y:7204 { yyVAL.str = string(yyDollar[1].str) } case 1458: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL *ConvertType -//line sql.y:7208 +//line sql.y:7210 { yyLOCAL = nil } @@ -21178,7 +21181,7 @@ yydefault: case 1459: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL *ConvertType -//line sql.y:7212 +//line sql.y:7214 { yyLOCAL = &ConvertType{Type: string(yyDollar[2].str), Length: ptr.Of(convertStringToInt(yyDollar[4].str))} } @@ -21186,7 +21189,7 @@ yydefault: case 1460: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL *ConvertType -//line sql.y:7216 +//line sql.y:7218 { yyLOCAL = &ConvertType{Type: string(yyDollar[2].str), Length: ptr.Of(convertStringToInt(yyDollar[4].str))} } @@ -21194,7 +21197,7 @@ yydefault: case 1461: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *ConvertType -//line sql.y:7222 +//line sql.y:7224 { yyLOCAL = &ConvertType{Type: string(yyDollar[1].str), Length: yyDollar[2].intPtrUnion()} } @@ -21202,7 +21205,7 @@ yydefault: case 1462: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *ConvertType -//line sql.y:7226 +//line sql.y:7228 { yyLOCAL = &ConvertType{Type: string(yyDollar[1].str), Length: yyDollar[2].intPtrUnion(), Charset: yyDollar[3].columnCharset} } @@ -21210,7 +21213,7 @@ yydefault: case 1463: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL *ConvertType -//line sql.y:7230 +//line sql.y:7232 { yyLOCAL = &ConvertType{Type: string(yyDollar[1].str)} } @@ -21218,7 +21221,7 @@ yydefault: case 1464: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *ConvertType -//line sql.y:7234 +//line sql.y:7236 { yyLOCAL = &ConvertType{Type: string(yyDollar[1].str), Length: yyDollar[2].intPtrUnion()} } @@ -21226,7 +21229,7 @@ yydefault: case 1465: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *ConvertType -//line sql.y:7238 +//line sql.y:7240 { yyLOCAL = &ConvertType{Type: string(yyDollar[1].str)} yyLOCAL.Length = yyDollar[2].LengthScaleOption.Length @@ -21236,7 +21239,7 @@ yydefault: case 1466: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL *ConvertType -//line sql.y:7244 +//line sql.y:7246 { yyLOCAL = &ConvertType{Type: string(yyDollar[1].str)} } @@ -21244,7 +21247,7 @@ yydefault: case 1467: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *ConvertType -//line sql.y:7248 +//line sql.y:7250 { yyLOCAL = &ConvertType{Type: string(yyDollar[1].str), Length: yyDollar[2].intPtrUnion()} } @@ -21252,7 +21255,7 @@ yydefault: case 1468: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL *ConvertType -//line sql.y:7252 +//line sql.y:7254 { yyLOCAL = &ConvertType{Type: string(yyDollar[1].str)} } @@ -21260,7 +21263,7 @@ yydefault: case 1469: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *ConvertType -//line sql.y:7256 +//line sql.y:7258 { yyLOCAL = &ConvertType{Type: string(yyDollar[1].str)} } @@ -21268,7 +21271,7 @@ yydefault: case 1470: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *ConvertType -//line sql.y:7260 +//line sql.y:7262 { yyLOCAL = &ConvertType{Type: string(yyDollar[1].str), Length: yyDollar[2].intPtrUnion()} } @@ -21276,7 +21279,7 @@ yydefault: case 1471: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL *ConvertType -//line sql.y:7264 +//line sql.y:7266 { yyLOCAL = &ConvertType{Type: string(yyDollar[1].str)} } @@ -21284,7 +21287,7 @@ yydefault: case 1472: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *ConvertType -//line sql.y:7268 +//line sql.y:7270 { yyLOCAL = &ConvertType{Type: string(yyDollar[1].str)} } @@ -21292,7 +21295,7 @@ yydefault: case 1473: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *ConvertType -//line sql.y:7272 +//line sql.y:7274 { yyLOCAL = &ConvertType{Type: string(yyDollar[1].str), Length: yyDollar[2].intPtrUnion()} } @@ -21300,7 +21303,7 @@ yydefault: case 1474: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL *ConvertType -//line sql.y:7276 +//line sql.y:7278 { yyLOCAL = &ConvertType{Type: string(yyDollar[1].str)} } @@ -21308,7 +21311,7 @@ yydefault: case 1475: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL *ConvertType -//line sql.y:7280 +//line sql.y:7282 { yyLOCAL = &ConvertType{Type: string(yyDollar[1].str)} } @@ -21316,7 +21319,7 @@ yydefault: case 1476: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL bool -//line sql.y:7286 +//line sql.y:7288 { yyLOCAL = false } @@ -21324,7 +21327,7 @@ yydefault: case 1477: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL bool -//line sql.y:7290 +//line sql.y:7292 { yyLOCAL = true } @@ -21332,7 +21335,7 @@ yydefault: case 1478: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL Expr -//line sql.y:7295 +//line sql.y:7297 { yyLOCAL = nil } @@ -21340,34 +21343,34 @@ yydefault: case 1479: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:7299 +//line sql.y:7301 { yyLOCAL = yyDollar[1].exprUnion() } yyVAL.union = yyLOCAL case 1480: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:7304 +//line sql.y:7306 { yyVAL.str = string("") } case 1481: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:7308 +//line sql.y:7310 { yyVAL.str = encodeSQLString(yyDollar[2].str) } case 1482: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL []*When -//line sql.y:7314 +//line sql.y:7316 { yyLOCAL = []*When{yyDollar[1].whenUnion()} } yyVAL.union = yyLOCAL case 1483: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:7318 +//line sql.y:7320 { yySLICE := (*[]*When)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, yyDollar[2].whenUnion()) @@ -21375,7 +21378,7 @@ yydefault: case 1484: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL *When -//line sql.y:7324 +//line sql.y:7326 { yyLOCAL = &When{Cond: yyDollar[2].exprUnion(), Val: yyDollar[4].exprUnion()} } @@ -21383,7 +21386,7 @@ yydefault: case 1485: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL Expr -//line sql.y:7329 +//line sql.y:7331 { yyLOCAL = nil } @@ -21391,7 +21394,7 @@ yydefault: case 1486: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Expr -//line sql.y:7333 +//line sql.y:7335 { yyLOCAL = yyDollar[2].exprUnion() } @@ -21399,7 +21402,7 @@ yydefault: case 1487: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL *ColName -//line sql.y:7339 +//line sql.y:7341 { yyLOCAL = &ColName{Name: yyDollar[1].identifierCI} } @@ -21407,7 +21410,7 @@ yydefault: case 1488: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL *ColName -//line sql.y:7343 +//line sql.y:7345 { yyLOCAL = &ColName{Name: NewIdentifierCI(string(yyDollar[1].str))} } @@ -21415,7 +21418,7 @@ yydefault: case 1489: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *ColName -//line sql.y:7347 +//line sql.y:7349 { yyLOCAL = &ColName{Qualifier: TableName{Name: yyDollar[1].identifierCS}, Name: yyDollar[3].identifierCI} } @@ -21423,7 +21426,7 @@ yydefault: case 1490: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL *ColName -//line sql.y:7351 +//line sql.y:7353 { yyLOCAL = &ColName{Qualifier: TableName{Qualifier: yyDollar[1].identifierCS, Name: yyDollar[3].identifierCS}, Name: yyDollar[5].identifierCI} } @@ -21431,7 +21434,7 @@ yydefault: case 1491: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:7357 +//line sql.y:7359 { yyLOCAL = yyDollar[1].colNameUnion() } @@ -21439,7 +21442,7 @@ yydefault: case 1492: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:7361 +//line sql.y:7363 { yyLOCAL = &Offset{V: convertStringToInt(yyDollar[1].str)} } @@ -21447,7 +21450,7 @@ yydefault: case 1493: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:7367 +//line sql.y:7369 { // TODO(sougou): Deprecate this construct. if yyDollar[1].identifierCI.Lowered() != "value" { @@ -21460,7 +21463,7 @@ yydefault: case 1494: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Expr -//line sql.y:7376 +//line sql.y:7378 { yyLOCAL = NewIntLiteral(yyDollar[1].str) } @@ -21468,7 +21471,7 @@ yydefault: case 1495: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Expr -//line sql.y:7380 +//line sql.y:7382 { yyLOCAL = parseBindVariable(yylex, yyDollar[1].str[1:]) } @@ -21476,7 +21479,7 @@ yydefault: case 1496: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL *GroupBy -//line sql.y:7385 +//line sql.y:7387 { yyLOCAL = nil } @@ -21484,7 +21487,7 @@ yydefault: case 1497: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL *GroupBy -//line sql.y:7389 +//line sql.y:7391 { yyLOCAL = &GroupBy{Exprs: yyDollar[3].exprsUnion(), WithRollup: yyDollar[4].booleanUnion()} } @@ -21492,7 +21495,7 @@ yydefault: case 1498: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL bool -//line sql.y:7394 +//line sql.y:7396 { yyLOCAL = false } @@ -21500,7 +21503,7 @@ yydefault: case 1499: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL bool -//line sql.y:7398 +//line sql.y:7400 { yyLOCAL = true } @@ -21508,7 +21511,7 @@ yydefault: case 1500: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL Expr -//line sql.y:7404 +//line sql.y:7406 { yyLOCAL = nil } @@ -21516,7 +21519,7 @@ yydefault: case 1501: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Expr -//line sql.y:7408 +//line sql.y:7410 { yyLOCAL = yyDollar[2].exprUnion() } @@ -21524,7 +21527,7 @@ yydefault: case 1502: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *NamedWindow -//line sql.y:7414 +//line sql.y:7416 { yyLOCAL = &NamedWindow{yyDollar[2].windowDefinitionsUnion()} } @@ -21532,14 +21535,14 @@ yydefault: case 1503: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL NamedWindows -//line sql.y:7420 +//line sql.y:7422 { yyLOCAL = NamedWindows{yyDollar[1].namedWindowUnion()} } yyVAL.union = yyLOCAL case 1504: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:7424 +//line sql.y:7426 { yySLICE := (*NamedWindows)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, yyDollar[3].namedWindowUnion()) @@ -21547,7 +21550,7 @@ yydefault: case 1505: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL NamedWindows -//line sql.y:7429 +//line sql.y:7431 { yyLOCAL = nil } @@ -21555,7 +21558,7 @@ yydefault: case 1506: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL NamedWindows -//line sql.y:7433 +//line sql.y:7435 { yyLOCAL = yyDollar[1].namedWindowsUnion() } @@ -21563,7 +21566,7 @@ yydefault: case 1507: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL OrderBy -//line sql.y:7438 +//line sql.y:7440 { yyLOCAL = nil } @@ -21571,7 +21574,7 @@ yydefault: case 1508: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL OrderBy -//line sql.y:7442 +//line sql.y:7444 { yyLOCAL = yyDollar[1].orderByUnion() } @@ -21579,7 +21582,7 @@ yydefault: case 1509: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL OrderBy -//line sql.y:7448 +//line sql.y:7450 { yyLOCAL = yyDollar[3].orderByUnion() } @@ -21587,14 +21590,14 @@ yydefault: case 1510: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL OrderBy -//line sql.y:7454 +//line sql.y:7456 { yyLOCAL = OrderBy{yyDollar[1].orderUnion()} } yyVAL.union = yyLOCAL case 1511: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:7458 +//line sql.y:7460 { yySLICE := (*OrderBy)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, yyDollar[3].orderUnion()) @@ -21602,7 +21605,7 @@ yydefault: case 1512: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *Order -//line sql.y:7464 +//line sql.y:7466 { yyLOCAL = &Order{Expr: yyDollar[1].exprUnion(), Direction: yyDollar[2].orderDirectionUnion()} } @@ -21610,7 +21613,7 @@ yydefault: case 1513: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL OrderDirection -//line sql.y:7469 +//line sql.y:7471 { yyLOCAL = AscOrder } @@ -21618,7 +21621,7 @@ yydefault: case 1514: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL OrderDirection -//line sql.y:7473 +//line sql.y:7475 { yyLOCAL = AscOrder } @@ -21626,7 +21629,7 @@ yydefault: case 1515: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL OrderDirection -//line sql.y:7477 +//line sql.y:7479 { yyLOCAL = DescOrder } @@ -21634,7 +21637,7 @@ yydefault: case 1516: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL *Limit -//line sql.y:7482 +//line sql.y:7484 { yyLOCAL = nil } @@ -21642,7 +21645,7 @@ yydefault: case 1517: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL *Limit -//line sql.y:7486 +//line sql.y:7488 { yyLOCAL = yyDollar[1].limitUnion() } @@ -21650,7 +21653,7 @@ yydefault: case 1518: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *Limit -//line sql.y:7492 +//line sql.y:7494 { yyLOCAL = &Limit{Rowcount: yyDollar[2].exprUnion()} } @@ -21658,7 +21661,7 @@ yydefault: case 1519: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL *Limit -//line sql.y:7496 +//line sql.y:7498 { yyLOCAL = &Limit{Offset: yyDollar[2].exprUnion(), Rowcount: yyDollar[4].exprUnion()} } @@ -21666,7 +21669,7 @@ yydefault: case 1520: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL *Limit -//line sql.y:7500 +//line sql.y:7502 { yyLOCAL = &Limit{Offset: yyDollar[4].exprUnion(), Rowcount: yyDollar[2].exprUnion()} } @@ -21674,7 +21677,7 @@ yydefault: case 1521: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL []AlterOption -//line sql.y:7505 +//line sql.y:7507 { yyLOCAL = nil } @@ -21682,7 +21685,7 @@ yydefault: case 1522: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL []AlterOption -//line sql.y:7509 +//line sql.y:7511 { yyLOCAL = []AlterOption{yyDollar[1].alterOptionUnion(), yyDollar[2].alterOptionUnion()} } @@ -21690,7 +21693,7 @@ yydefault: case 1523: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL []AlterOption -//line sql.y:7513 +//line sql.y:7515 { yyLOCAL = []AlterOption{yyDollar[1].alterOptionUnion(), yyDollar[2].alterOptionUnion()} } @@ -21698,7 +21701,7 @@ yydefault: case 1524: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL []AlterOption -//line sql.y:7517 +//line sql.y:7519 { yyLOCAL = []AlterOption{yyDollar[1].alterOptionUnion()} } @@ -21706,7 +21709,7 @@ yydefault: case 1525: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL []AlterOption -//line sql.y:7521 +//line sql.y:7523 { yyLOCAL = []AlterOption{yyDollar[1].alterOptionUnion()} } @@ -21714,7 +21717,7 @@ yydefault: case 1526: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL AlterOption -//line sql.y:7528 +//line sql.y:7530 { yyLOCAL = &LockOption{Type: DefaultType} } @@ -21722,7 +21725,7 @@ yydefault: case 1527: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL AlterOption -//line sql.y:7532 +//line sql.y:7534 { yyLOCAL = &LockOption{Type: NoneType} } @@ -21730,7 +21733,7 @@ yydefault: case 1528: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL AlterOption -//line sql.y:7536 +//line sql.y:7538 { yyLOCAL = &LockOption{Type: SharedType} } @@ -21738,7 +21741,7 @@ yydefault: case 1529: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL AlterOption -//line sql.y:7540 +//line sql.y:7542 { yyLOCAL = &LockOption{Type: ExclusiveType} } @@ -21746,7 +21749,7 @@ yydefault: case 1530: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL AlterOption -//line sql.y:7546 +//line sql.y:7548 { yyLOCAL = AlgorithmValue(yyDollar[3].str) } @@ -21754,7 +21757,7 @@ yydefault: case 1531: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL AlterOption -//line sql.y:7550 +//line sql.y:7552 { yyLOCAL = AlgorithmValue(yyDollar[3].str) } @@ -21762,7 +21765,7 @@ yydefault: case 1532: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL AlterOption -//line sql.y:7554 +//line sql.y:7556 { yyLOCAL = AlgorithmValue(yyDollar[3].str) } @@ -21770,93 +21773,93 @@ yydefault: case 1533: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL AlterOption -//line sql.y:7558 +//line sql.y:7560 { yyLOCAL = AlgorithmValue(yyDollar[3].str) } yyVAL.union = yyLOCAL case 1534: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:7563 +//line sql.y:7565 { yyVAL.str = "" } case 1535: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:7567 +//line sql.y:7569 { yyVAL.str = string(yyDollar[3].str) } case 1536: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:7571 +//line sql.y:7573 { yyVAL.str = string(yyDollar[3].str) } case 1537: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:7575 +//line sql.y:7577 { yyVAL.str = string(yyDollar[3].str) } case 1538: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:7580 +//line sql.y:7582 { yyVAL.str = "" } case 1539: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:7584 +//line sql.y:7586 { yyVAL.str = yyDollar[3].str } case 1540: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:7590 +//line sql.y:7592 { yyVAL.str = string(yyDollar[1].str) } case 1541: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:7594 +//line sql.y:7596 { yyVAL.str = string(yyDollar[1].str) } case 1542: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:7599 +//line sql.y:7601 { yyVAL.str = "" } case 1543: yyDollar = yyS[yypt-4 : yypt+1] -//line sql.y:7603 +//line sql.y:7605 { yyVAL.str = yyDollar[2].str } case 1544: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:7608 +//line sql.y:7610 { yyVAL.str = "cascaded" } case 1545: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:7612 +//line sql.y:7614 { yyVAL.str = string(yyDollar[1].str) } case 1546: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:7616 +//line sql.y:7618 { yyVAL.str = string(yyDollar[1].str) } case 1547: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL *Definer -//line sql.y:7621 +//line sql.y:7623 { yyLOCAL = nil } @@ -21864,7 +21867,7 @@ yydefault: case 1548: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *Definer -//line sql.y:7625 +//line sql.y:7627 { yyLOCAL = yyDollar[3].definerUnion() } @@ -21872,7 +21875,7 @@ yydefault: case 1549: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL *Definer -//line sql.y:7631 +//line sql.y:7633 { yyLOCAL = &Definer{ Name: string(yyDollar[1].str), @@ -21882,7 +21885,7 @@ yydefault: case 1550: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *Definer -//line sql.y:7637 +//line sql.y:7639 { yyLOCAL = &Definer{ Name: string(yyDollar[1].str), @@ -21892,7 +21895,7 @@ yydefault: case 1551: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *Definer -//line sql.y:7643 +//line sql.y:7645 { yyLOCAL = &Definer{ Name: yyDollar[1].str, @@ -21902,32 +21905,32 @@ yydefault: yyVAL.union = yyLOCAL case 1552: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:7652 +//line sql.y:7654 { yyVAL.str = encodeSQLString(yyDollar[1].str) } case 1553: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:7656 +//line sql.y:7658 { yyVAL.str = formatIdentifier(yyDollar[1].str) } case 1554: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:7661 +//line sql.y:7663 { yyVAL.str = "" } case 1555: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:7665 +//line sql.y:7667 { yyVAL.str = formatAddress(yyDollar[1].str) } case 1556: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Lock -//line sql.y:7671 +//line sql.y:7673 { yyLOCAL = ForUpdateLock } @@ -21935,7 +21938,7 @@ yydefault: case 1557: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Lock -//line sql.y:7675 +//line sql.y:7677 { yyLOCAL = ForUpdateLockNoWait } @@ -21943,7 +21946,7 @@ yydefault: case 1558: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Lock -//line sql.y:7679 +//line sql.y:7681 { yyLOCAL = ForUpdateLockSkipLocked } @@ -21951,7 +21954,7 @@ yydefault: case 1559: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Lock -//line sql.y:7683 +//line sql.y:7685 { yyLOCAL = ForShareLock } @@ -21959,7 +21962,7 @@ yydefault: case 1560: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Lock -//line sql.y:7687 +//line sql.y:7689 { yyLOCAL = ForShareLockNoWait } @@ -21967,7 +21970,7 @@ yydefault: case 1561: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Lock -//line sql.y:7691 +//line sql.y:7693 { yyLOCAL = ForShareLockSkipLocked } @@ -21975,7 +21978,7 @@ yydefault: case 1562: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Lock -//line sql.y:7695 +//line sql.y:7697 { yyLOCAL = ShareModeLock } @@ -21983,7 +21986,7 @@ yydefault: case 1563: yyDollar = yyS[yypt-9 : yypt+1] var yyLOCAL *SelectInto -//line sql.y:7701 +//line sql.y:7703 { yyLOCAL = &SelectInto{Type: IntoOutfileS3, FileName: encodeSQLString(yyDollar[4].str), Charset: yyDollar[5].columnCharset, FormatOption: yyDollar[6].str, ExportOption: yyDollar[7].str, Manifest: yyDollar[8].str, Overwrite: yyDollar[9].str} } @@ -21991,7 +21994,7 @@ yydefault: case 1564: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *SelectInto -//line sql.y:7705 +//line sql.y:7707 { yyLOCAL = &SelectInto{Type: IntoDumpfile, FileName: encodeSQLString(yyDollar[3].str), Charset: ColumnCharset{}, FormatOption: "", ExportOption: "", Manifest: "", Overwrite: ""} } @@ -21999,177 +22002,177 @@ yydefault: case 1565: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL *SelectInto -//line sql.y:7709 +//line sql.y:7711 { yyLOCAL = &SelectInto{Type: IntoOutfile, FileName: encodeSQLString(yyDollar[3].str), Charset: yyDollar[4].columnCharset, FormatOption: "", ExportOption: yyDollar[5].str, Manifest: "", Overwrite: ""} } yyVAL.union = yyLOCAL case 1566: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:7714 +//line sql.y:7716 { yyVAL.str = "" } case 1567: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:7718 +//line sql.y:7720 { yyVAL.str = " format csv" + yyDollar[3].str } case 1568: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:7722 +//line sql.y:7724 { yyVAL.str = " format text" + yyDollar[3].str } case 1569: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:7727 +//line sql.y:7729 { yyVAL.str = "" } case 1570: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:7731 +//line sql.y:7733 { yyVAL.str = " header" } case 1571: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:7736 +//line sql.y:7738 { yyVAL.str = "" } case 1572: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:7740 +//line sql.y:7742 { yyVAL.str = " manifest on" } case 1573: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:7744 +//line sql.y:7746 { yyVAL.str = " manifest off" } case 1574: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:7749 +//line sql.y:7751 { yyVAL.str = "" } case 1575: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:7753 +//line sql.y:7755 { yyVAL.str = " overwrite on" } case 1576: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:7757 +//line sql.y:7759 { yyVAL.str = " overwrite off" } case 1577: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:7763 +//line sql.y:7765 { yyVAL.str = yyDollar[1].str + yyDollar[2].str } case 1578: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:7768 +//line sql.y:7770 { yyVAL.str = "" } case 1579: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:7772 +//line sql.y:7774 { yyVAL.str = " lines" + yyDollar[2].str } case 1580: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:7778 +//line sql.y:7780 { yyVAL.str = yyDollar[1].str } case 1581: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:7782 +//line sql.y:7784 { yyVAL.str = yyDollar[1].str + yyDollar[2].str } case 1582: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:7788 +//line sql.y:7790 { yyVAL.str = " starting by " + encodeSQLString(yyDollar[3].str) } case 1583: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:7792 +//line sql.y:7794 { yyVAL.str = " terminated by " + encodeSQLString(yyDollar[3].str) } case 1584: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:7797 +//line sql.y:7799 { yyVAL.str = "" } case 1585: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:7801 +//line sql.y:7803 { yyVAL.str = " " + yyDollar[1].str + yyDollar[2].str } case 1586: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:7807 +//line sql.y:7809 { yyVAL.str = yyDollar[1].str } case 1587: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:7811 +//line sql.y:7813 { yyVAL.str = yyDollar[1].str + yyDollar[2].str } case 1588: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:7817 +//line sql.y:7819 { yyVAL.str = " terminated by " + encodeSQLString(yyDollar[3].str) } case 1589: yyDollar = yyS[yypt-4 : yypt+1] -//line sql.y:7821 +//line sql.y:7823 { yyVAL.str = yyDollar[1].str + " enclosed by " + encodeSQLString(yyDollar[4].str) } case 1590: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:7825 +//line sql.y:7827 { yyVAL.str = " escaped by " + encodeSQLString(yyDollar[3].str) } case 1591: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:7830 +//line sql.y:7832 { yyVAL.str = "" } case 1592: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:7834 +//line sql.y:7836 { yyVAL.str = " optionally" } case 1593: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *Insert -//line sql.y:7847 +//line sql.y:7849 { yyLOCAL = &Insert{Rows: yyDollar[2].valuesUnion(), RowAlias: yyDollar[3].rowAliasUnion()} } @@ -22177,7 +22180,7 @@ yydefault: case 1594: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL *Insert -//line sql.y:7851 +//line sql.y:7853 { yyLOCAL = &Insert{Rows: yyDollar[1].tableStmtUnion()} } @@ -22185,7 +22188,7 @@ yydefault: case 1595: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL *Insert -//line sql.y:7855 +//line sql.y:7857 { yyLOCAL = &Insert{Columns: yyDollar[2].columnsUnion(), Rows: yyDollar[5].valuesUnion(), RowAlias: yyDollar[6].rowAliasUnion()} } @@ -22193,7 +22196,7 @@ yydefault: case 1596: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL *Insert -//line sql.y:7859 +//line sql.y:7861 { yyLOCAL = &Insert{Columns: []IdentifierCI{}, Rows: yyDollar[4].valuesUnion(), RowAlias: yyDollar[5].rowAliasUnion()} } @@ -22201,7 +22204,7 @@ yydefault: case 1597: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL *Insert -//line sql.y:7863 +//line sql.y:7865 { yyLOCAL = &Insert{Columns: yyDollar[2].columnsUnion(), Rows: yyDollar[4].tableStmtUnion()} } @@ -22209,7 +22212,7 @@ yydefault: case 1598: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Columns -//line sql.y:7869 +//line sql.y:7871 { yyLOCAL = Columns{yyDollar[1].identifierCI} } @@ -22217,21 +22220,21 @@ yydefault: case 1599: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Columns -//line sql.y:7873 +//line sql.y:7875 { yyLOCAL = Columns{yyDollar[3].identifierCI} } yyVAL.union = yyLOCAL case 1600: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:7877 +//line sql.y:7879 { yySLICE := (*Columns)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, yyDollar[3].identifierCI) } case 1601: yyDollar = yyS[yypt-5 : yypt+1] -//line sql.y:7881 +//line sql.y:7883 { yySLICE := (*Columns)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, yyDollar[5].identifierCI) @@ -22239,7 +22242,7 @@ yydefault: case 1602: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL *RowAlias -//line sql.y:7886 +//line sql.y:7888 { yyLOCAL = nil } @@ -22247,7 +22250,7 @@ yydefault: case 1603: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *RowAlias -//line sql.y:7890 +//line sql.y:7892 { yyLOCAL = &RowAlias{TableName: yyDollar[2].identifierCS} } @@ -22255,7 +22258,7 @@ yydefault: case 1604: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL *RowAlias -//line sql.y:7894 +//line sql.y:7896 { yyLOCAL = &RowAlias{TableName: yyDollar[2].identifierCS, Columns: yyDollar[4].columnsUnion()} } @@ -22263,7 +22266,7 @@ yydefault: case 1605: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL UpdateExprs -//line sql.y:7899 +//line sql.y:7901 { yyLOCAL = nil } @@ -22271,7 +22274,7 @@ yydefault: case 1606: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL UpdateExprs -//line sql.y:7903 +//line sql.y:7905 { yyLOCAL = yyDollar[5].updateExprsUnion() } @@ -22279,14 +22282,14 @@ yydefault: case 1607: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Values -//line sql.y:7909 +//line sql.y:7911 { yyLOCAL = Values{yyDollar[1].valTupleUnion()} } yyVAL.union = yyLOCAL case 1608: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:7913 +//line sql.y:7915 { yySLICE := (*Values)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, yyDollar[3].valTupleUnion()) @@ -22294,14 +22297,14 @@ yydefault: case 1609: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Values -//line sql.y:7919 +//line sql.y:7921 { yyLOCAL = Values{yyDollar[1].valTupleUnion()} } yyVAL.union = yyLOCAL case 1610: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:7923 +//line sql.y:7925 { yySLICE := (*Values)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, yyDollar[3].valTupleUnion()) @@ -22309,7 +22312,7 @@ yydefault: case 1611: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL ValTuple -//line sql.y:7929 +//line sql.y:7931 { yyLOCAL = yyDollar[1].valTupleUnion() } @@ -22317,7 +22320,7 @@ yydefault: case 1612: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL ValTuple -//line sql.y:7933 +//line sql.y:7935 { yyLOCAL = ValTuple{} } @@ -22325,7 +22328,7 @@ yydefault: case 1613: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL ValTuple -//line sql.y:7939 +//line sql.y:7941 { yyLOCAL = yyDollar[1].valTupleUnion() } @@ -22333,7 +22336,7 @@ yydefault: case 1614: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL ValTuple -//line sql.y:7943 +//line sql.y:7945 { yyLOCAL = ValTuple{} } @@ -22341,7 +22344,7 @@ yydefault: case 1615: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL ValTuple -//line sql.y:7949 +//line sql.y:7951 { yyLOCAL = ValTuple(yyDollar[2].exprsUnion()) } @@ -22349,7 +22352,7 @@ yydefault: case 1616: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL ValTuple -//line sql.y:7955 +//line sql.y:7957 { yyLOCAL = ValTuple(yyDollar[3].exprsUnion()) } @@ -22357,7 +22360,7 @@ yydefault: case 1619: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:7965 +//line sql.y:7967 { if len(yyDollar[1].valTupleUnion()) == 1 { yyLOCAL = yyDollar[1].valTupleUnion()[0] @@ -22369,14 +22372,14 @@ yydefault: case 1620: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL UpdateExprs -//line sql.y:7975 +//line sql.y:7977 { yyLOCAL = UpdateExprs{yyDollar[1].updateExprUnion()} } yyVAL.union = yyLOCAL case 1621: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:7979 +//line sql.y:7981 { yySLICE := (*UpdateExprs)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, yyDollar[3].updateExprUnion()) @@ -22384,21 +22387,21 @@ yydefault: case 1622: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *UpdateExpr -//line sql.y:7985 +//line sql.y:7987 { yyLOCAL = &UpdateExpr{Name: yyDollar[1].colNameUnion(), Expr: yyDollar[3].exprUnion()} } yyVAL.union = yyLOCAL case 1624: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:7992 +//line sql.y:7994 { yyVAL.str = "charset" } case 1627: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:8002 +//line sql.y:8004 { yyLOCAL = NewStrLiteral(yyDollar[1].identifierCI.String()) } @@ -22406,7 +22409,7 @@ yydefault: case 1628: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:8006 +//line sql.y:8008 { yyLOCAL = NewStrLiteral(yyDollar[1].str) } @@ -22414,7 +22417,7 @@ yydefault: case 1629: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:8010 +//line sql.y:8012 { yyLOCAL = &Default{} } @@ -22422,7 +22425,7 @@ yydefault: case 1632: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL bool -//line sql.y:8019 +//line sql.y:8021 { yyLOCAL = false } @@ -22430,7 +22433,7 @@ yydefault: case 1633: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL bool -//line sql.y:8021 +//line sql.y:8023 { yyLOCAL = true } @@ -22438,7 +22441,7 @@ yydefault: case 1634: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL bool -//line sql.y:8024 +//line sql.y:8026 { yyLOCAL = false } @@ -22446,7 +22449,7 @@ yydefault: case 1635: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL bool -//line sql.y:8026 +//line sql.y:8028 { yyLOCAL = true } @@ -22454,7 +22457,7 @@ yydefault: case 1636: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL bool -//line sql.y:8029 +//line sql.y:8031 { yyLOCAL = false } @@ -22462,7 +22465,7 @@ yydefault: case 1637: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL bool -//line sql.y:8031 +//line sql.y:8033 { yyLOCAL = true } @@ -22470,7 +22473,7 @@ yydefault: case 1638: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL Ignore -//line sql.y:8034 +//line sql.y:8036 { yyLOCAL = false } @@ -22478,49 +22481,49 @@ yydefault: case 1639: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Ignore -//line sql.y:8036 +//line sql.y:8038 { yyLOCAL = true } yyVAL.union = yyLOCAL case 1640: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:8039 +//line sql.y:8041 { yyVAL.empty = struct{}{} } case 1641: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:8041 +//line sql.y:8043 { yyVAL.empty = struct{}{} } case 1642: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:8043 +//line sql.y:8045 { yyVAL.empty = struct{}{} } case 1643: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL Statement -//line sql.y:8047 +//line sql.y:8049 { yyLOCAL = &CallProc{Name: yyDollar[2].tableName, Params: yyDollar[4].exprsUnion()} } yyVAL.union = yyLOCAL case 1644: yyDollar = yyS[yypt-0 : yypt+1] - var yyLOCAL Exprs -//line sql.y:8052 + var yyLOCAL []Expr +//line sql.y:8054 { yyLOCAL = nil } yyVAL.union = yyLOCAL case 1645: yyDollar = yyS[yypt-1 : yypt+1] - var yyLOCAL Exprs -//line sql.y:8056 + var yyLOCAL []Expr +//line sql.y:8058 { yyLOCAL = yyDollar[1].exprsUnion() } @@ -22528,7 +22531,7 @@ yydefault: case 1646: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL []*IndexOption -//line sql.y:8061 +//line sql.y:8063 { yyLOCAL = nil } @@ -22536,7 +22539,7 @@ yydefault: case 1647: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL []*IndexOption -//line sql.y:8063 +//line sql.y:8065 { yyLOCAL = []*IndexOption{yyDollar[1].indexOptionUnion()} } @@ -22544,63 +22547,63 @@ yydefault: case 1648: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *IndexOption -//line sql.y:8067 +//line sql.y:8069 { yyLOCAL = &IndexOption{Name: string(yyDollar[1].str), String: string(yyDollar[2].identifierCI.String())} } yyVAL.union = yyLOCAL case 1649: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:8073 +//line sql.y:8075 { yyVAL.identifierCI = yyDollar[1].identifierCI } case 1650: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:8077 +//line sql.y:8079 { yyVAL.identifierCI = NewIdentifierCI(string(yyDollar[1].str)) } case 1652: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:8084 +//line sql.y:8086 { yyVAL.identifierCI = NewIdentifierCI(string(yyDollar[1].str)) } case 1653: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:8090 +//line sql.y:8092 { yyVAL.identifierCS = NewIdentifierCS(string(yyDollar[1].str)) } case 1654: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:8094 +//line sql.y:8096 { yyVAL.identifierCS = NewIdentifierCS(string(yyDollar[1].str)) } case 1655: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:8100 +//line sql.y:8102 { yyVAL.identifierCS = NewIdentifierCS("") } case 1656: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:8104 +//line sql.y:8106 { yyVAL.identifierCS = yyDollar[1].identifierCS } case 1658: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:8111 +//line sql.y:8113 { yyVAL.identifierCS = NewIdentifierCS(string(yyDollar[1].str)) } case 1659: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Statement -//line sql.y:8117 +//line sql.y:8119 { yyLOCAL = &Kill{Type: yyDollar[2].killTypeUnion(), ProcesslistID: convertStringToUInt64(yyDollar[3].str)} } @@ -22608,7 +22611,7 @@ yydefault: case 1660: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL KillType -//line sql.y:8123 +//line sql.y:8125 { yyLOCAL = ConnectionType } @@ -22616,7 +22619,7 @@ yydefault: case 1661: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL KillType -//line sql.y:8127 +//line sql.y:8129 { yyLOCAL = ConnectionType } @@ -22624,42 +22627,42 @@ yydefault: case 1662: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL KillType -//line sql.y:8131 +//line sql.y:8133 { yyLOCAL = QueryType } yyVAL.union = yyLOCAL case 2298: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:8795 +//line sql.y:8797 { } case 2299: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:8800 +//line sql.y:8802 { } case 2300: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:8804 +//line sql.y:8806 { skipToEnd(yylex) } case 2301: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:8809 +//line sql.y:8811 { skipToEnd(yylex) } case 2302: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:8813 +//line sql.y:8815 { skipToEnd(yylex) } case 2303: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:8817 +//line sql.y:8819 { skipToEnd(yylex) } diff --git a/go/vt/sqlparser/sql.y b/go/vt/sqlparser/sql.y index f1663a9a41c..5ecdeabe108 100644 --- a/go/vt/sqlparser/sql.y +++ b/go/vt/sqlparser/sql.y @@ -154,14 +154,14 @@ func markBindVariable(yylex yyLexer, bvar string) { partitions Partitions tableExprs TableExprs tableNames TableNames - exprs Exprs + exprs []Expr values Values valTuple ValTuple orderBy OrderBy updateExprs UpdateExprs setExprs SetExprs - selectExprs SelectExprs - tableOptions TableOptions + selectExprs *SelectExprs + tableOptions TableOptions starExpr StarExpr groupBy *GroupBy @@ -835,7 +835,7 @@ query_expression: } | SELECT comment_opt cache_opt NEXT num_val for_from table_name { - $$ = NewSelect(Comments($2), SelectExprs{&Nextval{Expr: $5}}, []string{$3}/*options*/, nil, TableExprs{&AliasedTableExpr{Expr: $7}}, nil/*where*/, nil/*groupBy*/, nil/*having*/, nil) + $$ = NewSelect(Comments($2), &SelectExprs{Exprs: []SelectExpr{&Nextval{Expr: $5}}}, []string{$3}/*options*/, nil, TableExprs{&AliasedTableExpr{Expr: $7}}, nil/*where*/, nil/*groupBy*/, nil/*having*/, nil) } query_expression_body: @@ -4935,11 +4935,13 @@ select_option: select_expression_list: select_expression { - $$ = SelectExprs{$1} + $$ = &SelectExprs{Exprs: []SelectExpr{$1}} } | select_expression_list ',' select_expression { - $$ = append($$, $3) + res := $1 + res.Exprs = append(res.Exprs, $3) + $$ = res } select_expression: @@ -5966,7 +5968,7 @@ subquery: expression_list: expression { - $$ = Exprs{$1} + $$ = []Expr{$1} } | expression_list ',' expression { diff --git a/go/vt/sqlparser/tracked_buffer.go b/go/vt/sqlparser/tracked_buffer.go index 48efe9547af..9ef0cfd1f93 100644 --- a/go/vt/sqlparser/tracked_buffer.go +++ b/go/vt/sqlparser/tracked_buffer.go @@ -18,8 +18,11 @@ package sqlparser import ( "fmt" + "reflect" "strconv" "strings" + + "vitess.io/vitess/go/slice" ) // NodeFormatter defines the signature of a custom node formatter @@ -174,15 +177,6 @@ func (buf *TrackedBuffer) astPrintf(currentNode SQLNode, format string, values . } switch format[i] { - case 'c': - switch v := values[fieldnum].(type) { - case byte: - buf.WriteByte(v) - case rune: - buf.WriteRune(v) - default: - panic(fmt.Sprintf("unexpected TrackedBuffer type %T", v)) - } case 's': switch v := values[fieldnum].(type) { case string: @@ -240,14 +234,61 @@ func (buf *TrackedBuffer) astPrintf(currentNode SQLNode, format string, values . } case 'a': buf.WriteArg("", values[fieldnum].(string)) + case 'n': + // used for printing slices of SQLNodes + value := values[fieldnum] + buf.formatNodes(value) default: - panic("unexpected") + panic("unexpected format: " + string(format[i-1:i+1])) } fieldnum++ i++ } } +func (buf *TrackedBuffer) formatExprs(exprs []Expr) { + var prefix string + for _, expr := range exprs { + buf.WriteString(prefix) + buf.formatter(expr) + prefix = ", " + } +} + +func (buf *TrackedBuffer) formatNodes(input any) { + switch nodes := input.(type) { + case []Expr: + buf.formatExprs(nodes) + return + } + + // SLOW PATH! Add specific cases above to avoid reflection. + + // Check if the input is a slice + val := reflect.ValueOf(input) + if val.Kind() != reflect.Slice { + // Handle the error or return if input is not a slice + panic("input is not a slice") + } + + // Iterate over the slice elements + for i := 0; i < val.Len(); i++ { + elem := val.Index(i).Interface() + + // Assert each element implements SQLNode + node, ok := elem.(SQLNode) + if !ok { + // Handle the error or skip non-SQLNode elements + panic("element does not implement SQLNode") + } + + // Now `node` is of type SQLNode + // You can call methods or use it as a SQLNode here + buf.Myprintf("%v", node) + } + +} + func getExpressionForParensEval(checkParens bool, value any) Expr { if checkParens { expr, isExpr := value.(Expr) @@ -388,3 +429,20 @@ func CanonicalString(node SQLNode) string { node.Format(buf) return buf.String() } + +func FormatSlice[T SQLNode](buf *TrackedBuffer, valueExprs []T) { + for _, expr := range valueExprs { + buf.Myprintf("%v", expr) + } +} + +func SliceString[T SQLNode](valueExprs []T) string { + return SliceStringWithSep(valueExprs, ", ") +} + +func SliceStringWithSep[T SQLNode](valueExprs []T, sep string) string { + exprs := slice.Map(valueExprs, func(expr T) string { + return String(expr) + }) + return strings.Join(exprs, sep) +} diff --git a/go/vt/vtctl/workflow/materializer.go b/go/vt/vtctl/workflow/materializer.go index 8cd99d384ee..3e827cbdb6a 100644 --- a/go/vt/vtctl/workflow/materializer.go +++ b/go/vt/vtctl/workflow/materializer.go @@ -233,7 +233,7 @@ func (mz *materializer) generateBinlogSources(ctx context.Context, targetShard * } mappedCols = append(mappedCols, colName) } - subExprs := make(sqlparser.Exprs, 0, len(mappedCols)+2) + subExprs := make([]sqlparser.Expr, 0, len(mappedCols)+2) for _, mappedCol := range mappedCols { subExprs = append(subExprs, mappedCol) } @@ -253,10 +253,7 @@ func (mz *materializer) generateBinlogSources(ctx context.Context, targetShard * subExprs = append(subExprs, sqlparser.NewStrLiteral(vindexName)) subExprs = append(subExprs, sqlparser.NewStrLiteral(key.KeyRangeString(targetShard.KeyRange))) - inKeyRange := &sqlparser.FuncExpr{ - Name: sqlparser.NewIdentifierCI("in_keyrange"), - Exprs: subExprs, - } + inKeyRange := sqlparser.NewFuncExpr("in_keyrange", subExprs...) addFilter(sel, inKeyRange) } if tenantClause != nil { diff --git a/go/vt/vtctl/workflow/stream_migrator.go b/go/vt/vtctl/workflow/stream_migrator.go index 7b4fe69074f..f73c3aa64de 100644 --- a/go/vt/vtctl/workflow/stream_migrator.go +++ b/go/vt/vtctl/workflow/stream_migrator.go @@ -1195,14 +1195,10 @@ func (sm *StreamMigrator) templatizeKeyRange(ctx context.Context, rule *binlogda // There was no in_keyrange expression. Create a new one. vtable := sm.ts.SourceKeyspaceSchema().Tables[rule.Match] - inkr := &sqlparser.FuncExpr{ - Name: sqlparser.NewIdentifierCI("in_keyrange"), - Exprs: sqlparser.Exprs{ - &sqlparser.ColName{Name: vtable.ColumnVindexes[0].Columns[0]}, - sqlparser.NewStrLiteral(vtable.ColumnVindexes[0].Type), - sqlparser.NewStrLiteral("{{.}}"), - }, - } + inkr := sqlparser.NewFuncExpr("in_keyrange", + sqlparser.NewColName(vtable.ColumnVindexes[0].Columns[0].String()), + sqlparser.NewStrLiteral(vtable.ColumnVindexes[0].Type), + sqlparser.NewStrLiteral("{{.}}")) sel.AddWhere(inkr) rule.Filter = sqlparser.String(statement) return nil diff --git a/go/vt/vtctl/workflow/utils.go b/go/vt/vtctl/workflow/utils.go index 571c40b474f..2f7f51ed206 100644 --- a/go/vt/vtctl/workflow/utils.go +++ b/go/vt/vtctl/workflow/utils.go @@ -293,7 +293,7 @@ func forAllShards(shards []*topo.ShardInfo, f func(*topo.ShardInfo) error) error } func matchColInSelect(col sqlparser.IdentifierCI, sel *sqlparser.Select) (*sqlparser.ColName, error) { - for _, selExpr := range sel.SelectExprs { + for _, selExpr := range sel.GetColumns() { switch selExpr := selExpr.(type) { case *sqlparser.StarExpr: return &sqlparser.ColName{Name: col}, nil diff --git a/go/vt/vtexplain/vtexplain_vttablet.go b/go/vt/vtexplain/vtexplain_vttablet.go index 94697c22e91..7918162192a 100644 --- a/go/vt/vtexplain/vtexplain_vttablet.go +++ b/go/vt/vtexplain/vtexplain_vttablet.go @@ -789,7 +789,7 @@ func (t *explainTablet) analyzeWhere(selStmt *sqlparser.Select, tableColumnMap m func (t *explainTablet) analyzeExpressions(selStmt *sqlparser.Select, tableColumnMap map[sqlparser.IdentifierCS]map[string]querypb.Type) ([]string, []querypb.Type) { colNames := make([]string, 0, 4) colTypes := make([]querypb.Type, 0, 4) - for _, node := range selStmt.SelectExprs { + for _, node := range selStmt.GetColumns() { switch node := node.(type) { case *sqlparser.AliasedExpr: colNames, colTypes = inferColTypeFromExpr(node.Expr, tableColumnMap, colNames, colTypes) diff --git a/go/vt/vtgate/engine/insert_test.go b/go/vt/vtgate/engine/insert_test.go index 2de95e5d186..118a2ab0458 100644 --- a/go/vt/vtgate/engine/insert_test.go +++ b/go/vt/vtgate/engine/insert_test.go @@ -340,6 +340,9 @@ func TestInsertShardWithONDuplicateKey(t *testing.T) { ks := vs.Keyspaces["sharded"] // A single row insert should be autocommitted + funcExpr := sqlparser.NewFuncExpr("if", sqlparser.NewComparisonExpr(sqlparser.InOp, &sqlparser.ValuesFuncExpr{Name: sqlparser.NewColName("col")}, sqlparser.ListArg("_id_1"), nil), + sqlparser.NewColName("col"), + &sqlparser.ValuesFuncExpr{Name: sqlparser.NewColName("col")}) ins := newInsert( InsertSharded, false, @@ -356,15 +359,8 @@ func TestInsertShardWithONDuplicateKey(t *testing.T) { {&sqlparser.Argument{Name: "_id_0", Type: sqltypes.Int64}}, }, sqlparser.OnDup{ - &sqlparser.UpdateExpr{Name: sqlparser.NewColName("suffix1"), Expr: &sqlparser.Argument{Name: "_id_0", Type: sqltypes.Int64}}, - &sqlparser.UpdateExpr{Name: sqlparser.NewColName("suffix2"), Expr: &sqlparser.FuncExpr{ - Name: sqlparser.NewIdentifierCI("if"), - Exprs: sqlparser.Exprs{ - sqlparser.NewComparisonExpr(sqlparser.InOp, &sqlparser.ValuesFuncExpr{Name: sqlparser.NewColName("col")}, sqlparser.ListArg("_id_1"), nil), - sqlparser.NewColName("col"), - &sqlparser.ValuesFuncExpr{Name: sqlparser.NewColName("col")}, - }, - }}}, + &sqlparser.UpdateExpr{Name: sqlparser.NewColName("suffix1"), Expr: sqlparser.NewTypedArgument("_id_0", sqltypes.Int64)}, + &sqlparser.UpdateExpr{Name: sqlparser.NewColName("suffix2"), Expr: funcExpr}}, ) vc := newDMLTestVCursor("-20", "20-") vc.shardForKsid = []string{"20-", "-20", "20-"} diff --git a/go/vt/vtgate/evalengine/expr_env_test.go b/go/vt/vtgate/evalengine/expr_env_test.go index f75cc6f1376..1206ac42f0a 100644 --- a/go/vt/vtgate/evalengine/expr_env_test.go +++ b/go/vt/vtgate/evalengine/expr_env_test.go @@ -42,7 +42,7 @@ func TestExpressionEnvTypeOf(t *testing.T) { Type: sqltypes.Unknown, Offset: 1, Original: &sqlparser.Count{ - Args: sqlparser.Exprs{ + Args: []sqlparser.Expr{ sqlparser.NewColName("l_discount"), }, }, diff --git a/go/vt/vtgate/evalengine/integration/fuzz_test.go b/go/vt/vtgate/evalengine/integration/fuzz_test.go index 7372d6fd731..a16f6164b35 100644 --- a/go/vt/vtgate/evalengine/integration/fuzz_test.go +++ b/go/vt/vtgate/evalengine/integration/fuzz_test.go @@ -137,7 +137,7 @@ func evaluateLocalEvalengine(env *evalengine.ExpressionEnv, query string, fields return evalengine.EvalResult{}, err } - astExpr := stmt.(*sqlparser.Select).SelectExprs[0].(*sqlparser.AliasedExpr).Expr + astExpr := stmt.(*sqlparser.Select).SelectExprs.Exprs[0].(*sqlparser.AliasedExpr).Expr local, err := func() (expr evalengine.Expr, err error) { defer func() { if r := recover(); r != nil { @@ -239,7 +239,7 @@ func TestGenerateFuzzCases(t *testing.T) { t.Fatal(err) } - astExpr := stmt.(*sqlparser.Select).SelectExprs[0].(*sqlparser.AliasedExpr).Expr + astExpr := stmt.(*sqlparser.Select).SelectExprs.Exprs[0].(*sqlparser.AliasedExpr).Expr if fail := compareWithMySQL(astExpr); fail != nil { failures = append(failures, fail) diff --git a/go/vt/vtgate/evalengine/mysql_test.go b/go/vt/vtgate/evalengine/mysql_test.go index 6434d7dcfbf..61bd6e3af1e 100644 --- a/go/vt/vtgate/evalengine/mysql_test.go +++ b/go/vt/vtgate/evalengine/mysql_test.go @@ -74,7 +74,7 @@ func convert(t *testing.T, query string, simplify bool) (Expr, error) { NoConstantFolding: !simplify, } - astExpr := stmt.(*sqlparser.Select).SelectExprs[0].(*sqlparser.AliasedExpr).Expr + astExpr := stmt.(*sqlparser.Select).SelectExprs.Exprs[0].(*sqlparser.AliasedExpr).Expr converted, err := Translate(astExpr, cfg) if err == nil { if knownBadQuery(converted) { diff --git a/go/vt/vtgate/evalengine/translate_test.go b/go/vt/vtgate/evalengine/translate_test.go index 2bebae548e1..715b773398a 100644 --- a/go/vt/vtgate/evalengine/translate_test.go +++ b/go/vt/vtgate/evalengine/translate_test.go @@ -134,7 +134,7 @@ func TestTranslateSimplification(t *testing.T) { NoCompilation: true, } - astExpr := stmt.(*sqlparser.Select).SelectExprs[0].(*sqlparser.AliasedExpr).Expr + astExpr := stmt.(*sqlparser.Select).SelectExprs.Exprs[0].(*sqlparser.AliasedExpr).Expr converted, err := Translate(astExpr, cfg) if err != nil { if tc.converted.err == "" { @@ -305,7 +305,7 @@ func TestEvaluate(t *testing.T) { // Given stmt, err := sqlparser.NewTestParser().Parse("select " + test.expression) require.NoError(t, err) - astExpr := stmt.(*sqlparser.Select).SelectExprs[0].(*sqlparser.AliasedExpr).Expr + astExpr := stmt.(*sqlparser.Select).SelectExprs.Exprs[0].(*sqlparser.AliasedExpr).Expr sqltypesExpr, err := Translate(astExpr, &Config{ Collation: venv.CollationEnv().DefaultConnectionCharset(), Environment: venv, @@ -354,7 +354,7 @@ func TestEvaluateTuple(t *testing.T) { // Given stmt, err := sqlparser.NewTestParser().Parse("select " + test.expression) require.NoError(t, err) - astExpr := stmt.(*sqlparser.Select).SelectExprs[0].(*sqlparser.AliasedExpr).Expr + astExpr := stmt.(*sqlparser.Select).SelectExprs.Exprs[0].(*sqlparser.AliasedExpr).Expr sqltypesExpr, err := Translate(astExpr, &Config{ Collation: venv.CollationEnv().DefaultConnectionCharset(), Environment: venv, @@ -395,7 +395,7 @@ func TestTranslationFailures(t *testing.T) { // Given stmt, err := sqlparser.NewTestParser().Parse("select " + testcase.expression) require.NoError(t, err) - astExpr := stmt.(*sqlparser.Select).SelectExprs[0].(*sqlparser.AliasedExpr).Expr + astExpr := stmt.(*sqlparser.Select).SelectExprs.Exprs[0].(*sqlparser.AliasedExpr).Expr _, err = Translate(astExpr, &Config{ Collation: venv.CollationEnv().DefaultConnectionCharset(), Environment: venv, @@ -435,7 +435,7 @@ func TestCardinalityWithBindVariables(t *testing.T) { return err } - astExpr := stmt.(*sqlparser.Select).SelectExprs[0].(*sqlparser.AliasedExpr).Expr + astExpr := stmt.(*sqlparser.Select).SelectExprs.Exprs[0].(*sqlparser.AliasedExpr).Expr _, err = Translate(astExpr, &Config{ Collation: venv.CollationEnv().DefaultConnectionCharset(), Environment: venv, diff --git a/go/vt/vtgate/planbuilder/ddl.go b/go/vt/vtgate/planbuilder/ddl.go index 1359da1c0a8..112d0280813 100644 --- a/go/vt/vtgate/planbuilder/ddl.go +++ b/go/vt/vtgate/planbuilder/ddl.go @@ -211,7 +211,7 @@ func buildCreateViewCommon( } // because we don't trust the schema tracker to have up-to-date info, we don't want to expand any SELECT * here - var expressions []sqlparser.SelectExprs + var expressions []*sqlparser.SelectExprs _ = sqlparser.VisitAllSelects(ddlSelect, func(p *sqlparser.Select, idx int) error { expressions = append(expressions, sqlparser.Clone(p.SelectExprs)) return nil @@ -252,7 +252,7 @@ func createViewEnabled(vschema plancontext.VSchema, reservedVars *sqlparser.Rese // views definition with `select *` should not be expanded as schema tracker might not be up-to-date // We copy the expressions and restore them after the planning context is created - var expressions []sqlparser.SelectExprs + var expressions []*sqlparser.SelectExprs _ = sqlparser.VisitAllSelects(ddlSelect, func(p *sqlparser.Select, idx int) error { expressions = append(expressions, sqlparser.Clone(p.SelectExprs)) return nil diff --git a/go/vt/vtgate/planbuilder/expression_converter_test.go b/go/vt/vtgate/planbuilder/expression_converter_test.go index c92cc184262..0204324e978 100644 --- a/go/vt/vtgate/planbuilder/expression_converter_test.go +++ b/go/vt/vtgate/planbuilder/expression_converter_test.go @@ -19,6 +19,8 @@ package planbuilder import ( "testing" + "vitess.io/vitess/go/slice" + "github.com/stretchr/testify/require" "vitess.io/vitess/go/vt/sqlparser" @@ -66,10 +68,8 @@ func TestConversion(t *testing.T) { } } -func extract(in sqlparser.SelectExprs) []sqlparser.Expr { - var result []sqlparser.Expr - for _, expr := range in { - result = append(result, expr.(*sqlparser.AliasedExpr).Expr) - } - return result +func extract(in *sqlparser.SelectExprs) []sqlparser.Expr { + return slice.Map(in.Exprs, func(i sqlparser.SelectExpr) sqlparser.Expr { + return i.(*sqlparser.AliasedExpr).Expr + }) } diff --git a/go/vt/vtgate/planbuilder/operator_transformers.go b/go/vt/vtgate/planbuilder/operator_transformers.go index 807912110df..1b3313b540a 100644 --- a/go/vt/vtgate/planbuilder/operator_transformers.go +++ b/go/vt/vtgate/planbuilder/operator_transformers.go @@ -689,9 +689,9 @@ func autoIncGenerate(gen *operators.Generate) *engine.Generate { return nil } selNext := &sqlparser.Select{ - From: []sqlparser.TableExpr{&sqlparser.AliasedTableExpr{Expr: gen.TableName}}, - SelectExprs: sqlparser.SelectExprs{&sqlparser.Nextval{Expr: &sqlparser.Argument{Name: "n", Type: sqltypes.Int64}}}, + From: []sqlparser.TableExpr{&sqlparser.AliasedTableExpr{Expr: gen.TableName}}, } + selNext.AddSelectExpr(&sqlparser.Nextval{Expr: &sqlparser.Argument{Name: "n", Type: sqltypes.Int64}}) return &engine.Generate{ Keyspace: gen.Keyspace, Query: sqlparser.String(selNext), diff --git a/go/vt/vtgate/planbuilder/operators/SQL_builder.go b/go/vt/vtgate/planbuilder/operators/SQL_builder.go index ca15b5c9134..0b8013a8737 100644 --- a/go/vt/vtgate/planbuilder/operators/SQL_builder.go +++ b/go/vt/vtgate/planbuilder/operators/SQL_builder.go @@ -163,7 +163,7 @@ func (qb *queryBuilder) setWithRollup() { func (qb *queryBuilder) addProjection(projection sqlparser.SelectExpr) { switch stmt := qb.stmt.(type) { case *sqlparser.Select: - stmt.SelectExprs = append(stmt.SelectExprs, projection) + stmt.AddSelectExpr(projection) return case *sqlparser.Union: if ae, ok := projection.(*sqlparser.AliasedExpr); ok { @@ -193,11 +193,12 @@ func (qb *queryBuilder) pushUnionInsideDerived() { }}, } firstSelect := getFirstSelect(selStmt) - sel.SelectExprs = unionSelects(firstSelect.SelectExprs) + sel.SetSelectExprs(unionSelects(firstSelect.GetColumns())...) qb.stmt = sel } -func unionSelects(exprs sqlparser.SelectExprs) (selectExprs sqlparser.SelectExprs) { +func unionSelects(exprs []sqlparser.SelectExpr) []sqlparser.SelectExpr { + var selectExprs []sqlparser.SelectExpr for _, col := range exprs { switch col := col.(type) { case *sqlparser.AliasedExpr: @@ -207,13 +208,13 @@ func unionSelects(exprs sqlparser.SelectExprs) (selectExprs sqlparser.SelectExpr selectExprs = append(selectExprs, col) } } - return + return selectExprs } func checkUnionColumnByName(column *sqlparser.ColName, sel sqlparser.TableStatement) { colName := column.Name.String() firstSelect := getFirstSelect(sel) - exprs := firstSelect.SelectExprs + exprs := firstSelect.GetColumns() offset := slices.IndexFunc(exprs, func(expr sqlparser.SelectExpr) bool { switch ae := expr.(type) { case *sqlparser.StarExpr: @@ -283,7 +284,9 @@ func (qb *queryBuilder) joinWith(other *queryBuilder, onCondition sqlparser.Expr if sel, isSel := stmt.(*sqlparser.Select); isSel { otherSel := otherStmt.(*sqlparser.Select) - sel.SelectExprs = append(sel.SelectExprs, otherSel.SelectExprs...) + for _, expr := range otherSel.GetColumns() { + sel.AddSelectExpr(expr) + } } qb.mergeWhereClauses(stmt, otherStmt) @@ -410,7 +413,7 @@ func stripDownQuery(from, to sqlparser.TableStatement) { toNode.Comments = node.Comments toNode.Limit = node.Limit toNode.SelectExprs = node.SelectExprs - for _, expr := range toNode.SelectExprs { + for _, expr := range toNode.SelectExprs.Exprs { removeKeyspaceFromSelectExpr(expr) } case *sqlparser.Union: @@ -599,8 +602,7 @@ func buildProjection(op *Projection, qb *queryBuilder) { } if !isSel { - cols := op.GetSelectExprs(qb.ctx) - for _, column := range cols { + for _, column := range op.GetSelectExprs(qb.ctx) { qb.addProjection(column) } } diff --git a/go/vt/vtgate/planbuilder/operators/aggregation_pushing.go b/go/vt/vtgate/planbuilder/operators/aggregation_pushing.go index ced81df147a..b11f49fe936 100644 --- a/go/vt/vtgate/planbuilder/operators/aggregation_pushing.go +++ b/go/vt/vtgate/planbuilder/operators/aggregation_pushing.go @@ -206,9 +206,9 @@ func pushAggregations(ctx *plancontext.PlanningContext, aggregator *Aggregator, } } -func checkIfWeCanPush(ctx *plancontext.PlanningContext, aggregator *Aggregator) (bool, sqlparser.Exprs) { +func checkIfWeCanPush(ctx *plancontext.PlanningContext, aggregator *Aggregator) (bool, []sqlparser.Expr) { canPush := true - var distinctExprs sqlparser.Exprs + var distinctExprs []sqlparser.Expr var differentExpr *sqlparser.AliasedExpr for _, aggr := range aggregator.Aggregations { @@ -574,13 +574,7 @@ outer: func coalesceFunc(e sqlparser.Expr) sqlparser.Expr { // `coalesce(e,1)` will return `e` if `e` is not `NULL`, otherwise it will return `1` - return &sqlparser.FuncExpr{ - Name: sqlparser.NewIdentifierCI("coalesce"), - Exprs: sqlparser.Exprs{ - e, - sqlparser.NewIntLiteral("1"), - }, - } + return sqlparser.NewFuncExpr("coalesce", e, sqlparser.NewIntLiteral("1")) } func initColReUse(size int) []int { diff --git a/go/vt/vtgate/planbuilder/operators/aggregator.go b/go/vt/vtgate/planbuilder/operators/aggregator.go index f353ee02d1e..1a96e81b66e 100644 --- a/go/vt/vtgate/planbuilder/operators/aggregator.go +++ b/go/vt/vtgate/planbuilder/operators/aggregator.go @@ -309,7 +309,7 @@ func (a *Aggregator) GetColumns(ctx *plancontext.PlanningContext) (res []*sqlpar return truncate(a, a.Columns) } -func (a *Aggregator) GetSelectExprs(ctx *plancontext.PlanningContext) sqlparser.SelectExprs { +func (a *Aggregator) GetSelectExprs(ctx *plancontext.PlanningContext) []sqlparser.SelectExpr { return transformColumnsToSelectExprs(ctx, a) } @@ -400,10 +400,10 @@ func (a *Aggregator) planOffsets(ctx *plancontext.PlanningContext) Operator { return nil } -func (aggr Aggr) setPushColumn(exprs sqlparser.Exprs) { +func (aggr Aggr) setPushColumn(exprs []sqlparser.Expr) { if aggr.Func == nil { if len(exprs) > 1 { - panic(vterrors.VT13001(fmt.Sprintf("unexpected number of expression in an random aggregation: %s", sqlparser.String(exprs)))) + panic(vterrors.VT13001(fmt.Sprintf("unexpected number of expression in an random aggregation: %s", sqlparser.SliceString(exprs)))) } aggr.Original.Expr = exprs[0] return @@ -434,12 +434,12 @@ func (aggr Aggr) getPushColumn() sqlparser.Expr { } } -func (aggr Aggr) getPushColumnExprs() sqlparser.Exprs { +func (aggr Aggr) getPushColumnExprs() []sqlparser.Expr { switch aggr.OpCode { case opcode.AggregateAnyValue: - return sqlparser.Exprs{aggr.Original.Expr} + return []sqlparser.Expr{aggr.Original.Expr} case opcode.AggregateCountStar: - return sqlparser.Exprs{sqlparser.NewIntLiteral("1")} + return []sqlparser.Expr{sqlparser.NewIntLiteral("1")} case opcode.AggregateUDF: // AggregateUDFs can't be evaluated on the vtgate. So either we are able to push everything down, or we will have to fail the query. return nil diff --git a/go/vt/vtgate/planbuilder/operators/apply_join.go b/go/vt/vtgate/planbuilder/operators/apply_join.go index 80bf74708a8..2297227a22d 100644 --- a/go/vt/vtgate/planbuilder/operators/apply_join.go +++ b/go/vt/vtgate/planbuilder/operators/apply_join.go @@ -180,7 +180,7 @@ func (aj *ApplyJoin) GetColumns(ctx *plancontext.PlanningContext) []*sqlparser.A return cols } -func (aj *ApplyJoin) GetSelectExprs(ctx *plancontext.PlanningContext) sqlparser.SelectExprs { +func (aj *ApplyJoin) GetSelectExprs(ctx *plancontext.PlanningContext) []sqlparser.SelectExpr { return transformColumnsToSelectExprs(ctx, aj) } @@ -414,7 +414,7 @@ func (aj *ApplyJoin) findOrAddColNameBindVarName(ctx *plancontext.PlanningContex return bvName } -func (aj *ApplyJoin) LHSColumnsNeeded(ctx *plancontext.PlanningContext) (needed sqlparser.Exprs) { +func (aj *ApplyJoin) LHSColumnsNeeded(ctx *plancontext.PlanningContext) (needed []sqlparser.Expr) { f := func(from BindVarExpr) sqlparser.Expr { return from.Expr } diff --git a/go/vt/vtgate/planbuilder/operators/ast_to_op.go b/go/vt/vtgate/planbuilder/operators/ast_to_op.go index 2e3781c94db..009f2c7c265 100644 --- a/go/vt/vtgate/planbuilder/operators/ast_to_op.go +++ b/go/vt/vtgate/planbuilder/operators/ast_to_op.go @@ -137,8 +137,8 @@ func findTablesContained(ctx *plancontext.PlanningContext, node sqlparser.SQLNod // comparisons between the inner and the outer side. // They can be used for merging the two parts of the query together type joinPredicateCollector struct { - predicates sqlparser.Exprs - remainingPredicates sqlparser.Exprs + predicates []sqlparser.Expr + remainingPredicates []sqlparser.Expr joinColumns []applyJoinColumn totalID, @@ -174,7 +174,7 @@ func createOperatorFromUnion(ctx *plancontext.PlanningContext, node *sqlparser.U rexprs := ctx.SemTable.SelectExprs(node.Right) unionCols := ctx.SemTable.SelectExprs(node) - union := newUnion([]Operator{opLHS, opRHS}, []sqlparser.SelectExprs{lexprs, rexprs}, unionCols, node.Distinct) + union := newUnion([]Operator{opLHS, opRHS}, [][]sqlparser.SelectExpr{lexprs, rexprs}, unionCols, node.Distinct) return newHorizon(union, node) } @@ -464,7 +464,7 @@ func createSelectionOp( lock sqlparser.Lock, ) Operator { selectionStmt := &sqlparser.Select{ - SelectExprs: selectExprs, + SelectExprs: &sqlparser.SelectExprs{Exprs: selectExprs}, From: tableExprs, Where: where, OrderBy: orderBy, diff --git a/go/vt/vtgate/planbuilder/operators/comments.go b/go/vt/vtgate/planbuilder/operators/comments.go index 9f0202c250a..445160e3d40 100644 --- a/go/vt/vtgate/planbuilder/operators/comments.go +++ b/go/vt/vtgate/planbuilder/operators/comments.go @@ -66,7 +66,7 @@ func (l *LockAndComment) GetColumns(ctx *plancontext.PlanningContext) []*sqlpars return l.Source.GetColumns(ctx) } -func (l *LockAndComment) GetSelectExprs(ctx *plancontext.PlanningContext) sqlparser.SelectExprs { +func (l *LockAndComment) GetSelectExprs(ctx *plancontext.PlanningContext) []sqlparser.SelectExpr { return l.Source.GetSelectExprs(ctx) } diff --git a/go/vt/vtgate/planbuilder/operators/delete.go b/go/vt/vtgate/planbuilder/operators/delete.go index 23c909e0a04..b16f9b8aacf 100644 --- a/go/vt/vtgate/planbuilder/operators/delete.go +++ b/go/vt/vtgate/planbuilder/operators/delete.go @@ -136,7 +136,7 @@ func createDeleteWithInputOp(ctx *plancontext.PlanningContext, del *sqlparser.De dmls := slice.Map(delOps, func(from dmlOp) Operator { colsList = append(colsList, from.cols) for _, col := range from.cols { - selectStmt.SelectExprs = append(selectStmt.SelectExprs, aeWrap(col)) + selectStmt.AddSelectExpr(aeWrap(col)) } return from.op }) @@ -264,7 +264,7 @@ func createDeleteOperator(ctx *plancontext.PlanningContext, del *sqlparser.Delet } func generateOwnedVindexQuery(del *sqlparser.Delete, table TargetTable, ksidCols []sqlparser.IdentifierCI) *sqlparser.Select { - var selExprs sqlparser.SelectExprs + var selExprs []sqlparser.SelectExpr for _, col := range ksidCols { colName := makeColName(col, table, sqlparser.MultiTable(del.TableExprs)) selExprs = append(selExprs, aeWrap(colName)) @@ -275,12 +275,13 @@ func generateOwnedVindexQuery(del *sqlparser.Delete, table TargetTable, ksidCols selExprs = append(selExprs, aeWrap(colName)) } } - return &sqlparser.Select{ - SelectExprs: selExprs, - OrderBy: del.OrderBy, - Limit: del.Limit, - Lock: sqlparser.ForUpdateLock, + sel := &sqlparser.Select{ + OrderBy: del.OrderBy, + Limit: del.Limit, + Lock: sqlparser.ForUpdateLock, } + sel.SetSelectExprs(selExprs...) + return sel } func makeColName(col sqlparser.IdentifierCI, table TargetTable, isMultiTbl bool) *sqlparser.ColName { diff --git a/go/vt/vtgate/planbuilder/operators/distinct.go b/go/vt/vtgate/planbuilder/operators/distinct.go index 52221498eea..00c9512af58 100644 --- a/go/vt/vtgate/planbuilder/operators/distinct.go +++ b/go/vt/vtgate/planbuilder/operators/distinct.go @@ -100,7 +100,7 @@ func (d *Distinct) GetColumns(ctx *plancontext.PlanningContext) []*sqlparser.Ali return truncate(d, d.Source.GetColumns(ctx)) } -func (d *Distinct) GetSelectExprs(ctx *plancontext.PlanningContext) sqlparser.SelectExprs { +func (d *Distinct) GetSelectExprs(ctx *plancontext.PlanningContext) []sqlparser.SelectExpr { return truncate(d, d.Source.GetSelectExprs(ctx)) } diff --git a/go/vt/vtgate/planbuilder/operators/filter.go b/go/vt/vtgate/planbuilder/operators/filter.go index d58d218908e..431461d4ab1 100644 --- a/go/vt/vtgate/planbuilder/operators/filter.go +++ b/go/vt/vtgate/planbuilder/operators/filter.go @@ -92,7 +92,7 @@ func (f *Filter) GetColumns(ctx *plancontext.PlanningContext) []*sqlparser.Alias return truncate(f, f.Source.GetColumns(ctx)) } -func (f *Filter) GetSelectExprs(ctx *plancontext.PlanningContext) sqlparser.SelectExprs { +func (f *Filter) GetSelectExprs(ctx *plancontext.PlanningContext) []sqlparser.SelectExpr { return truncate(f, f.Source.GetSelectExprs(ctx)) } diff --git a/go/vt/vtgate/planbuilder/operators/hash_join.go b/go/vt/vtgate/planbuilder/operators/hash_join.go index 3761c4b87a6..f8724f5221b 100644 --- a/go/vt/vtgate/planbuilder/operators/hash_join.go +++ b/go/vt/vtgate/planbuilder/operators/hash_join.go @@ -196,7 +196,7 @@ func (hj *HashJoin) GetColumns(*plancontext.PlanningContext) []*sqlparser.Aliase }) } -func (hj *HashJoin) GetSelectExprs(ctx *plancontext.PlanningContext) sqlparser.SelectExprs { +func (hj *HashJoin) GetSelectExprs(ctx *plancontext.PlanningContext) []sqlparser.SelectExpr { return transformColumnsToSelectExprs(ctx, hj) } diff --git a/go/vt/vtgate/planbuilder/operators/horizon.go b/go/vt/vtgate/planbuilder/operators/horizon.go index aa7737001d6..33070f5802b 100644 --- a/go/vt/vtgate/planbuilder/operators/horizon.go +++ b/go/vt/vtgate/planbuilder/operators/horizon.go @@ -148,7 +148,7 @@ func (h *Horizon) FindCol(ctx *plancontext.PlanningContext, expr sqlparser.Expr, return -1 } - for idx, se := range getFirstSelect(h.Query).SelectExprs { + for idx, se := range getFirstSelect(h.Query).GetColumns() { ae, ok := se.(*sqlparser.AliasedExpr) if !ok { panic(vterrors.VT09015()) @@ -173,8 +173,8 @@ func (h *Horizon) GetColumns(ctx *plancontext.PlanningContext) (exprs []*sqlpars return exprs } -func (h *Horizon) GetSelectExprs(*plancontext.PlanningContext) sqlparser.SelectExprs { - return getFirstSelect(h.Query).SelectExprs +func (h *Horizon) GetSelectExprs(*plancontext.PlanningContext) []sqlparser.SelectExpr { + return getFirstSelect(h.Query).GetColumns() } func (h *Horizon) GetOrdering(ctx *plancontext.PlanningContext) []OrderBy { diff --git a/go/vt/vtgate/planbuilder/operators/horizon_expanding.go b/go/vt/vtgate/planbuilder/operators/horizon_expanding.go index dad5ad3a91a..f60b7996714 100644 --- a/go/vt/vtgate/planbuilder/operators/horizon_expanding.go +++ b/go/vt/vtgate/planbuilder/operators/horizon_expanding.go @@ -235,7 +235,7 @@ func createProjectionWithAggr(ctx *plancontext.PlanningContext, qp *QueryProject func pullOutValueSubqueries(ctx *plancontext.PlanningContext, aggr Aggr, sqc *SubQueryBuilder, outerID semantics.TableSet) Aggr { exprs := aggr.getPushColumnExprs() - var newExprs sqlparser.Exprs + var newExprs []sqlparser.Expr for _, expr := range exprs { newExpr, subqs := sqc.pullOutValueSubqueries(ctx, expr, outerID, false) if newExpr != nil { @@ -344,7 +344,7 @@ func createProjectionWithoutAggr(ctx *plancontext.PlanningContext, qp *QueryProj } func newStarProjection(src Operator, qp *QueryProjection) *Projection { - cols := sqlparser.SelectExprs{} + var cols []sqlparser.SelectExpr for _, expr := range qp.SelectExprs { _ = sqlparser.Walk(func(node sqlparser.SQLNode) (kontinue bool, err error) { diff --git a/go/vt/vtgate/planbuilder/operators/info_schema_planning.go b/go/vt/vtgate/planbuilder/operators/info_schema_planning.go index f8dc9b9d281..1e15237f30d 100644 --- a/go/vt/vtgate/planbuilder/operators/info_schema_planning.go +++ b/go/vt/vtgate/planbuilder/operators/info_schema_planning.go @@ -196,7 +196,7 @@ func tryMergeInfoSchemaRoutings(ctx *plancontext.PlanningContext, routingA, rout return m.merge(ctx, lhsRoute, rhsRoute, isrA) // if both sides have the same schema predicate, we can safely merge them - case sqlparser.Equals.Exprs(isrA.SysTableTableSchema, isrB.SysTableTableSchema): + case equalExprs(isrA.SysTableTableSchema, isrB.SysTableTableSchema): for k, expr := range isrB.SysTableTableName { isrA.SysTableTableName[k] = expr } @@ -208,6 +208,18 @@ func tryMergeInfoSchemaRoutings(ctx *plancontext.PlanningContext, routingA, rout } } +func equalExprs(a, b []sqlparser.Expr) bool { + if len(a) != len(b) { + return false + } + for i := range a { + if !sqlparser.Equals.Expr(a[i], b[i]) { + return false + } + } + return true +} + var ( // these are filled in by the init() function below schemaColumns57 = map[string]any{} diff --git a/go/vt/vtgate/planbuilder/operators/insert.go b/go/vt/vtgate/planbuilder/operators/insert.go index f6d86d49ca2..dde07685ff0 100644 --- a/go/vt/vtgate/planbuilder/operators/insert.go +++ b/go/vt/vtgate/planbuilder/operators/insert.go @@ -266,7 +266,7 @@ func uniqKeyCompExpressions(vTbl *vindexes.BaseTable, ins *sqlparser.Insert, row type uIdx struct { Indexes [][]uComp - uniqKey sqlparser.Exprs + uniqKey []sqlparser.Expr } allIndexes := make([]uIdx, 0, noOfUniqKeys) @@ -470,7 +470,7 @@ func columnMismatch(gen *Generate, ins *sqlparser.Insert, sel sqlparser.TableSta if origColCount > sel.GetColumnCount() { sel := getFirstSelect(sel) var hasStarExpr bool - for _, sExpr := range sel.SelectExprs { + for _, sExpr := range sel.GetColumns() { if _, hasStarExpr = sExpr.(*sqlparser.StarExpr); hasStarExpr { break } diff --git a/go/vt/vtgate/planbuilder/operators/limit.go b/go/vt/vtgate/planbuilder/operators/limit.go index 4549b85fcda..0a0525562eb 100644 --- a/go/vt/vtgate/planbuilder/operators/limit.go +++ b/go/vt/vtgate/planbuilder/operators/limit.go @@ -69,7 +69,7 @@ func (l *Limit) GetColumns(ctx *plancontext.PlanningContext) []*sqlparser.Aliase return l.Source.GetColumns(ctx) } -func (l *Limit) GetSelectExprs(ctx *plancontext.PlanningContext) sqlparser.SelectExprs { +func (l *Limit) GetSelectExprs(ctx *plancontext.PlanningContext) []sqlparser.SelectExpr { return l.Source.GetSelectExprs(ctx) } diff --git a/go/vt/vtgate/planbuilder/operators/mirror.go b/go/vt/vtgate/planbuilder/operators/mirror.go index 82a431af0a2..23448b3fad6 100644 --- a/go/vt/vtgate/planbuilder/operators/mirror.go +++ b/go/vt/vtgate/planbuilder/operators/mirror.go @@ -75,7 +75,7 @@ func (m *PercentBasedMirror) GetColumns(ctx *plancontext.PlanningContext) []*sql return m.Operator().GetColumns(ctx) } -func (m *PercentBasedMirror) GetSelectExprs(ctx *plancontext.PlanningContext) sqlparser.SelectExprs { +func (m *PercentBasedMirror) GetSelectExprs(ctx *plancontext.PlanningContext) []sqlparser.SelectExpr { return m.Operator().GetSelectExprs(ctx) } diff --git a/go/vt/vtgate/planbuilder/operators/operator.go b/go/vt/vtgate/planbuilder/operators/operator.go index 42658e4c52e..6e9c10ab951 100644 --- a/go/vt/vtgate/planbuilder/operators/operator.go +++ b/go/vt/vtgate/planbuilder/operators/operator.go @@ -72,7 +72,7 @@ type ( FindCol(ctx *plancontext.PlanningContext, expr sqlparser.Expr, underRoute bool) int GetColumns(ctx *plancontext.PlanningContext) []*sqlparser.AliasedExpr - GetSelectExprs(ctx *plancontext.PlanningContext) sqlparser.SelectExprs + GetSelectExprs(ctx *plancontext.PlanningContext) []sqlparser.SelectExpr ShortDescription() string diff --git a/go/vt/vtgate/planbuilder/operators/ordering.go b/go/vt/vtgate/planbuilder/operators/ordering.go index 7e40b420f9e..367cb3c75b1 100644 --- a/go/vt/vtgate/planbuilder/operators/ordering.go +++ b/go/vt/vtgate/planbuilder/operators/ordering.go @@ -72,7 +72,7 @@ func (o *Ordering) GetColumns(ctx *plancontext.PlanningContext) []*sqlparser.Ali return truncate(o, o.Source.GetColumns(ctx)) } -func (o *Ordering) GetSelectExprs(ctx *plancontext.PlanningContext) sqlparser.SelectExprs { +func (o *Ordering) GetSelectExprs(ctx *plancontext.PlanningContext) []sqlparser.SelectExpr { return truncate(o, o.Source.GetSelectExprs(ctx)) } diff --git a/go/vt/vtgate/planbuilder/operators/plan_query.go b/go/vt/vtgate/planbuilder/operators/plan_query.go index dc83c89c72c..1bb619e3503 100644 --- a/go/vt/vtgate/planbuilder/operators/plan_query.go +++ b/go/vt/vtgate/planbuilder/operators/plan_query.go @@ -147,7 +147,7 @@ func (noColumns) FindCol(*plancontext.PlanningContext, sqlparser.Expr, bool) int panic(vterrors.VT13001("noColumns operators have no column")) } -func (noColumns) GetSelectExprs(*plancontext.PlanningContext) sqlparser.SelectExprs { +func (noColumns) GetSelectExprs(*plancontext.PlanningContext) []sqlparser.SelectExpr { panic(vterrors.VT13001("noColumns operators have no column")) } @@ -192,7 +192,7 @@ func tryTruncateColumnsAt(op Operator, truncateAt int) bool { } } -func transformColumnsToSelectExprs(ctx *plancontext.PlanningContext, op Operator) sqlparser.SelectExprs { +func transformColumnsToSelectExprs(ctx *plancontext.PlanningContext, op Operator) []sqlparser.SelectExpr { columns := op.GetColumns(ctx) if trunc, ok := op.(columnTruncator); ok { count := trunc.getTruncateColumnCount() @@ -201,8 +201,7 @@ func transformColumnsToSelectExprs(ctx *plancontext.PlanningContext, op Operator } } - selExprs := slice.Map(columns, func(from *sqlparser.AliasedExpr) sqlparser.SelectExpr { + return slice.Map(columns, func(from *sqlparser.AliasedExpr) sqlparser.SelectExpr { return from }) - return selExprs } diff --git a/go/vt/vtgate/planbuilder/operators/projection.go b/go/vt/vtgate/planbuilder/operators/projection.go index e894ab433b4..0f59d445714 100644 --- a/go/vt/vtgate/planbuilder/operators/projection.go +++ b/go/vt/vtgate/planbuilder/operators/projection.go @@ -76,11 +76,11 @@ type ( // ProjCols is used to enable projections that are only valid if we can push them into a route, and we never need to ask it about offsets ProjCols interface { GetColumns() []*sqlparser.AliasedExpr - GetSelectExprs() sqlparser.SelectExprs + GetSelectExprs() []sqlparser.SelectExpr } // Used when there are stars in the expressions that we were unable to expand - StarProjections sqlparser.SelectExprs + StarProjections []sqlparser.SelectExpr // Used when we know all the columns AliasedProjections []*ProjExpr @@ -136,8 +136,8 @@ func (sp StarProjections) GetColumns() []*sqlparser.AliasedExpr { panic(vterrors.VT09015()) } -func (sp StarProjections) GetSelectExprs() sqlparser.SelectExprs { - return sqlparser.SelectExprs(sp) +func (sp StarProjections) GetSelectExprs() []sqlparser.SelectExpr { + return sp } func (ap AliasedProjections) GetColumns() []*sqlparser.AliasedExpr { @@ -146,7 +146,7 @@ func (ap AliasedProjections) GetColumns() []*sqlparser.AliasedExpr { }) } -func (ap AliasedProjections) GetSelectExprs() sqlparser.SelectExprs { +func (ap AliasedProjections) GetSelectExprs() []sqlparser.SelectExpr { return slice.Map(ap, func(from *ProjExpr) sqlparser.SelectExpr { return aeWrap(from.ColExpr) }) @@ -420,12 +420,12 @@ func (p *Projection) GetColumns(*plancontext.PlanningContext) []*sqlparser.Alias return p.Columns.GetColumns() } -func (p *Projection) GetSelectExprs(*plancontext.PlanningContext) sqlparser.SelectExprs { +func (p *Projection) GetSelectExprs(*plancontext.PlanningContext) []sqlparser.SelectExpr { switch cols := p.Columns.(type) { case StarProjections: - return sqlparser.SelectExprs(cols) + return cols case AliasedProjections: - var output sqlparser.SelectExprs + var output []sqlparser.SelectExpr for _, pe := range cols { ae := &sqlparser.AliasedExpr{Expr: pe.EvalExpr} if pe.Original.As.NotEmpty() { diff --git a/go/vt/vtgate/planbuilder/operators/query_planning.go b/go/vt/vtgate/planbuilder/operators/query_planning.go index db716966d47..f70392252c1 100644 --- a/go/vt/vtgate/planbuilder/operators/query_planning.go +++ b/go/vt/vtgate/planbuilder/operators/query_planning.go @@ -30,10 +30,10 @@ import ( ) func planQuery(ctx *plancontext.PlanningContext, root Operator) Operator { - var selExpr sqlparser.SelectExprs + var selExpr []sqlparser.SelectExpr if horizon, isHorizon := root.(*Horizon); isHorizon { sel := getFirstSelect(horizon.Query) - selExpr = sqlparser.Clone(sel.SelectExprs) + selExpr = sqlparser.Clone(sel.SelectExprs).Exprs } output := runPhases(ctx, root) @@ -805,7 +805,7 @@ func tryPushUnion(ctx *plancontext.PlanningContext, op *Union) (Operator, *Apply } var sources []Operator - var selects []sqlparser.SelectExprs + var selects [][]sqlparser.SelectExpr if op.distinct { sources, selects = mergeUnionInputInAnyOrder(ctx, op) @@ -829,7 +829,7 @@ func tryPushUnion(ctx *plancontext.PlanningContext, op *Union) (Operator, *Apply } // addTruncationOrProjectionToReturnOutput uses the original Horizon to make sure that the output columns line up with what the user asked for -func addTruncationOrProjectionToReturnOutput(ctx *plancontext.PlanningContext, selExprs sqlparser.SelectExprs, output Operator) Operator { +func addTruncationOrProjectionToReturnOutput(ctx *plancontext.PlanningContext, selExprs []sqlparser.SelectExpr, output Operator) Operator { if len(selExprs) == 0 { return output } @@ -843,7 +843,7 @@ func addTruncationOrProjectionToReturnOutput(ctx *plancontext.PlanningContext, s return createSimpleProjection(ctx, selExprs, output) } -func colNamesAlign(expected, actual sqlparser.SelectExprs) bool { +func colNamesAlign(expected, actual []sqlparser.SelectExpr) bool { if len(expected) > len(actual) { // if we expect more columns than we have, we can't align return false diff --git a/go/vt/vtgate/planbuilder/operators/queryprojection.go b/go/vt/vtgate/planbuilder/operators/queryprojection.go index c66bf757dd8..073e320fff1 100644 --- a/go/vt/vtgate/planbuilder/operators/queryprojection.go +++ b/go/vt/vtgate/planbuilder/operators/queryprojection.go @@ -176,7 +176,7 @@ func createQPFromSelect(ctx *plancontext.PlanningContext, sel *sqlparser.Select) } func (qp *QueryProjection) addSelectExpressions(ctx *plancontext.PlanningContext, sel *sqlparser.Select) { - for _, selExp := range sel.SelectExprs { + for _, selExp := range sel.GetColumns() { switch selExp := selExp.(type) { case *sqlparser.AliasedExpr: col := SelectExpr{ diff --git a/go/vt/vtgate/planbuilder/operators/recurse_cte.go b/go/vt/vtgate/planbuilder/operators/recurse_cte.go index 61474b663d6..cbd31897479 100644 --- a/go/vt/vtgate/planbuilder/operators/recurse_cte.go +++ b/go/vt/vtgate/planbuilder/operators/recurse_cte.go @@ -147,7 +147,7 @@ func (r *RecurseCTE) GetColumns(ctx *plancontext.PlanningContext) []*sqlparser.A return r.Seed().GetColumns(ctx) } -func (r *RecurseCTE) GetSelectExprs(ctx *plancontext.PlanningContext) sqlparser.SelectExprs { +func (r *RecurseCTE) GetSelectExprs(ctx *plancontext.PlanningContext) []sqlparser.SelectExpr { return r.Seed().GetSelectExprs(ctx) } diff --git a/go/vt/vtgate/planbuilder/operators/route.go b/go/vt/vtgate/planbuilder/operators/route.go index 904d5085718..9aeafec2799 100644 --- a/go/vt/vtgate/planbuilder/operators/route.go +++ b/go/vt/vtgate/planbuilder/operators/route.go @@ -707,7 +707,7 @@ func (r *Route) GetColumns(ctx *plancontext.PlanningContext) []*sqlparser.Aliase return truncate(r, r.Source.GetColumns(ctx)) } -func (r *Route) GetSelectExprs(ctx *plancontext.PlanningContext) sqlparser.SelectExprs { +func (r *Route) GetSelectExprs(ctx *plancontext.PlanningContext) []sqlparser.SelectExpr { return truncate(r, r.Source.GetSelectExprs(ctx)) } diff --git a/go/vt/vtgate/planbuilder/operators/sharded_routing.go b/go/vt/vtgate/planbuilder/operators/sharded_routing.go index 9ad567c71b1..0cc828a7ae2 100644 --- a/go/vt/vtgate/planbuilder/operators/sharded_routing.go +++ b/go/vt/vtgate/planbuilder/operators/sharded_routing.go @@ -665,10 +665,11 @@ func (tr *ShardedRouting) extraInfo() string { ) } + valueExprs := tr.Selected.ValueExprs return fmt.Sprintf( "Vindex[%s] Values[%s] Seen:[%s]", tr.Selected.FoundVindex.String(), - sqlparser.String(sqlparser.Exprs(tr.Selected.ValueExprs)), + sqlparser.SliceString(valueExprs), sqlparser.String(sqlparser.AndExpressions(tr.SeenPredicates...)), ) } diff --git a/go/vt/vtgate/planbuilder/operators/subquery.go b/go/vt/vtgate/planbuilder/operators/subquery.go index 9610a2b10c9..62b6e7a725e 100644 --- a/go/vt/vtgate/planbuilder/operators/subquery.go +++ b/go/vt/vtgate/planbuilder/operators/subquery.go @@ -38,7 +38,7 @@ type SubQuery struct { FilterType opcode.PulloutOpcode // Type of subquery filter. Original sqlparser.Expr // This is the expression we should use if we can merge the inner to the outer originalSubquery *sqlparser.Subquery // Subquery representation, e.g., (SELECT foo from user LIMIT 1). - Predicates sqlparser.Exprs // Predicates joining outer and inner queries. Empty for uncorrelated subqueries. + Predicates []sqlparser.Expr // Predicates joining outer and inner queries. Empty for uncorrelated subqueries. OuterPredicate sqlparser.Expr // This is the predicate that is using the subquery expression. It will not be empty for projections ArgName string // This is the name of the ColName or Argument used to replace the subquery TopLevel bool // will be false if the subquery is deeply nested @@ -125,7 +125,7 @@ func (sq *SubQuery) Clone(inputs []Operator) Operator { } klone.JoinColumns = slices.Clone(sq.JoinColumns) klone.Vars = maps.Clone(sq.Vars) - klone.Predicates = sqlparser.Clone(sq.Predicates) + klone.Predicates = slices.Clone(sq.Predicates) return &klone } @@ -195,7 +195,7 @@ func (sq *SubQuery) GetColumns(ctx *plancontext.PlanningContext) []*sqlparser.Al return sq.Outer.GetColumns(ctx) } -func (sq *SubQuery) GetSelectExprs(ctx *plancontext.PlanningContext) sqlparser.SelectExprs { +func (sq *SubQuery) GetSelectExprs(ctx *plancontext.PlanningContext) []sqlparser.SelectExpr { return sq.Outer.GetSelectExprs(ctx) } diff --git a/go/vt/vtgate/planbuilder/operators/subquery_builder.go b/go/vt/vtgate/planbuilder/operators/subquery_builder.go index 6ec5ecdd7f3..cc7dc9afe69 100644 --- a/go/vt/vtgate/planbuilder/operators/subquery_builder.go +++ b/go/vt/vtgate/planbuilder/operators/subquery_builder.go @@ -116,7 +116,7 @@ func createSubqueryOp( // and extracts subqueries into operators func (sqb *SubQueryBuilder) inspectStatement(ctx *plancontext.PlanningContext, stmt sqlparser.TableStatement, -) (sqlparser.Exprs, []applyJoinColumn) { +) ([]sqlparser.Expr, []applyJoinColumn) { switch stmt := stmt.(type) { case *sqlparser.Select: return sqb.inspectSelect(ctx, stmt) @@ -134,7 +134,7 @@ func (sqb *SubQueryBuilder) inspectStatement(ctx *plancontext.PlanningContext, func (sqb *SubQueryBuilder) inspectSelect( ctx *plancontext.PlanningContext, sel *sqlparser.Select, -) (sqlparser.Exprs, []applyJoinColumn) { +) ([]sqlparser.Expr, []applyJoinColumn) { // first we need to go through all the places where one can find predicates // and search for subqueries newWhere, wherePreds, whereJoinCols := sqb.inspectWhere(ctx, sel.Where) @@ -191,7 +191,7 @@ func createSubquery( func (sqb *SubQueryBuilder) inspectWhere( ctx *plancontext.PlanningContext, in *sqlparser.Where, -) (*sqlparser.Where, sqlparser.Exprs, []applyJoinColumn) { +) (*sqlparser.Where, []sqlparser.Expr, []applyJoinColumn) { if in == nil { return nil, nil, nil } @@ -221,7 +221,7 @@ func (sqb *SubQueryBuilder) inspectWhere( func (sqb *SubQueryBuilder) inspectOnExpr( ctx *plancontext.PlanningContext, from []sqlparser.TableExpr, -) (newFrom []sqlparser.TableExpr, onPreds sqlparser.Exprs, onJoinCols []applyJoinColumn) { +) (newFrom []sqlparser.TableExpr, onPreds []sqlparser.Expr, onJoinCols []applyJoinColumn) { for _, tbl := range from { tbl := sqlparser.CopyOnRewrite(tbl, dontEnterSubqueries, func(cursor *sqlparser.CopyOnWriteCursor) { cond, ok := cursor.Node().(*sqlparser.JoinCondition) diff --git a/go/vt/vtgate/planbuilder/operators/subquery_container.go b/go/vt/vtgate/planbuilder/operators/subquery_container.go index 3f5c3eed254..396dc1b3b62 100644 --- a/go/vt/vtgate/planbuilder/operators/subquery_container.go +++ b/go/vt/vtgate/planbuilder/operators/subquery_container.go @@ -91,7 +91,7 @@ func (sqc *SubQueryContainer) GetColumns(ctx *plancontext.PlanningContext) []*sq return sqc.Outer.GetColumns(ctx) } -func (sqc *SubQueryContainer) GetSelectExprs(ctx *plancontext.PlanningContext) sqlparser.SelectExprs { +func (sqc *SubQueryContainer) GetSelectExprs(ctx *plancontext.PlanningContext) []sqlparser.SelectExpr { return sqc.Outer.GetSelectExprs(ctx) } diff --git a/go/vt/vtgate/planbuilder/operators/table.go b/go/vt/vtgate/planbuilder/operators/table.go index 473459d6864..2cc561497f7 100644 --- a/go/vt/vtgate/planbuilder/operators/table.go +++ b/go/vt/vtgate/planbuilder/operators/table.go @@ -91,7 +91,7 @@ func (to *Table) GetColumns(*plancontext.PlanningContext) []*sqlparser.AliasedEx return slice.Map(to.Columns, colNameToExpr) } -func (to *Table) GetSelectExprs(ctx *plancontext.PlanningContext) sqlparser.SelectExprs { +func (to *Table) GetSelectExprs(ctx *plancontext.PlanningContext) []sqlparser.SelectExpr { return transformColumnsToSelectExprs(ctx, to) } diff --git a/go/vt/vtgate/planbuilder/operators/union.go b/go/vt/vtgate/planbuilder/operators/union.go index 1c692c9f38e..4539569fdc0 100644 --- a/go/vt/vtgate/planbuilder/operators/union.go +++ b/go/vt/vtgate/planbuilder/operators/union.go @@ -30,14 +30,14 @@ type Union struct { Sources []Operator // These are the select expressions coming from each source - Selects []sqlparser.SelectExprs + Selects [][]sqlparser.SelectExpr distinct bool - unionColumns sqlparser.SelectExprs + unionColumns []sqlparser.SelectExpr unionColumnsAsAlisedExprs []*sqlparser.AliasedExpr } -func newUnion(srcs []Operator, sourceSelects []sqlparser.SelectExprs, columns sqlparser.SelectExprs, distinct bool) *Union { +func newUnion(srcs []Operator, sourceSelects [][]sqlparser.SelectExpr, columns []sqlparser.SelectExpr, distinct bool) *Union { if columns == nil { panic("rt") } @@ -95,7 +95,7 @@ can be found on the same offset. The names of the RHS are discarded. func (u *Union) AddPredicate(ctx *plancontext.PlanningContext, expr sqlparser.Expr) Operator { offsets := make(map[string]int) sel := u.GetSelectFor(0) - for i, selectExpr := range sel.SelectExprs { + for i, selectExpr := range sel.GetColumns() { ae, ok := selectExpr.(*sqlparser.AliasedExpr) if !ok { panic(vterrors.VT12001("pushing predicates on UNION where the first SELECT contains * or NEXT")) @@ -133,7 +133,7 @@ func (u *Union) predicatePerSource(expr sqlparser.Expr, offsets map[string]int) } sel := u.GetSelectFor(i) - ae, ok := sel.SelectExprs[idx].(*sqlparser.AliasedExpr) + ae, ok := sel.GetColumns()[idx].(*sqlparser.AliasedExpr) if !ok { panic(vterrors.VT09015()) } @@ -269,7 +269,7 @@ func (u *Union) GetColumns(ctx *plancontext.PlanningContext) (result []*sqlparse return u.unionColumnsAsAlisedExprs } -func (u *Union) GetSelectExprs(ctx *plancontext.PlanningContext) sqlparser.SelectExprs { +func (u *Union) GetSelectExprs(ctx *plancontext.PlanningContext) []sqlparser.SelectExpr { // if any of the inputs has more columns that we expect, we want to show on top of UNION, so the results can // be truncated to the expected result columns and nothing else for _, src := range u.Sources { diff --git a/go/vt/vtgate/planbuilder/operators/union_merging.go b/go/vt/vtgate/planbuilder/operators/union_merging.go index 6173b59e0dc..b38cc4e9561 100644 --- a/go/vt/vtgate/planbuilder/operators/union_merging.go +++ b/go/vt/vtgate/planbuilder/operators/union_merging.go @@ -25,7 +25,7 @@ import ( // mergeUnionInputInAnyOrder merges sources the sources of the union in any order // can be used for UNION DISTINCT -func mergeUnionInputInAnyOrder(ctx *plancontext.PlanningContext, op *Union) ([]Operator, []sqlparser.SelectExprs) { +func mergeUnionInputInAnyOrder(ctx *plancontext.PlanningContext, op *Union) ([]Operator, [][]sqlparser.SelectExpr) { sources := op.Sources selects := op.Selects @@ -57,7 +57,7 @@ func mergeUnionInputInAnyOrder(ctx *plancontext.PlanningContext, op *Union) ([]O } var newSources []Operator - var newSelects []sqlparser.SelectExprs + var newSelects [][]sqlparser.SelectExpr for i, source := range sources { if keep[i] || i <= idx { newSources = append(newSources, source) @@ -72,7 +72,7 @@ func mergeUnionInputInAnyOrder(ctx *plancontext.PlanningContext, op *Union) ([]O return sources, selects } -func mergeUnionInputsInOrder(ctx *plancontext.PlanningContext, op *Union) ([]Operator, []sqlparser.SelectExprs) { +func mergeUnionInputsInOrder(ctx *plancontext.PlanningContext, op *Union) ([]Operator, [][]sqlparser.SelectExpr) { sources := op.Sources selects := op.Selects for { @@ -105,9 +105,9 @@ func mergeUnionInputsInOrder(ctx *plancontext.PlanningContext, op *Union) ([]Ope func mergeUnionInputs( ctx *plancontext.PlanningContext, lhs, rhs Operator, - lhsExprs, rhsExprs sqlparser.SelectExprs, + lhsExprs, rhsExprs []sqlparser.SelectExpr, distinct bool, -) (Operator, sqlparser.SelectExprs) { +) (Operator, []sqlparser.SelectExpr) { lhsRoute, rhsRoute, routingA, routingB, a, b, sameKeyspace := prepareInputRoutes(ctx, lhs, rhs) if lhsRoute == nil { return nil, nil @@ -138,9 +138,9 @@ func mergeUnionInputs( func tryMergeUnionShardedRouting( ctx *plancontext.PlanningContext, routeA, routeB *Route, - exprsA, exprsB sqlparser.SelectExprs, + exprsA, exprsB []sqlparser.SelectExpr, distinct bool, -) (Operator, sqlparser.SelectExprs) { +) (Operator, []sqlparser.SelectExpr) { tblA := routeA.Routing.(*ShardedRouting) tblB := routeB.Routing.(*ShardedRouting) @@ -172,13 +172,13 @@ func tryMergeUnionShardedRouting( func createMergedUnion( ctx *plancontext.PlanningContext, lhsRoute, rhsRoute *Route, - lhsExprs, rhsExprs sqlparser.SelectExprs, + lhsExprs, rhsExprs []sqlparser.SelectExpr, distinct bool, - routing Routing) (Operator, sqlparser.SelectExprs) { + routing Routing) (Operator, []sqlparser.SelectExpr) { // if there are `*` on either side, or a different number of SelectExpr items, // we give up aligning the expressions and trust that we can push everything down - cols := make(sqlparser.SelectExprs, len(lhsExprs)) + cols := make([]sqlparser.SelectExpr, len(lhsExprs)) noDeps := len(lhsExprs) != len(rhsExprs) for idx, col := range lhsExprs { lae, ok := col.(*sqlparser.AliasedExpr) @@ -219,7 +219,8 @@ func createMergedUnion( ctx.SemTable.Recursive[col] = deps } - union := newUnion([]Operator{lhsRoute.Source, rhsRoute.Source}, []sqlparser.SelectExprs{lhsExprs, rhsExprs}, cols, distinct) + exprs := [][]sqlparser.SelectExpr{lhsExprs, rhsExprs} + union := newUnion([]Operator{lhsRoute.Source, rhsRoute.Source}, exprs, cols, distinct) selectExprs := unionSelects(lhsExprs) return &Route{ unaryOperator: newUnaryOp(union), @@ -241,7 +242,7 @@ func compactUnion(u *Union) *ApplyResult { } var newSources []Operator - var newSelects []sqlparser.SelectExprs + var newSelects [][]sqlparser.SelectExpr merged := false for idx, source := range u.Sources { diff --git a/go/vt/vtgate/planbuilder/operators/update.go b/go/vt/vtgate/planbuilder/operators/update.go index 0fa0d10d9c7..759500a8dc8 100644 --- a/go/vt/vtgate/planbuilder/operators/update.go +++ b/go/vt/vtgate/planbuilder/operators/update.go @@ -186,7 +186,7 @@ func createUpdateWithInputOp(ctx *plancontext.PlanningContext, upd *sqlparser.Up colsList = append(colsList, from.cols) uList = append(uList, from.updList) for _, col := range from.cols { - selectStmt.SelectExprs = append(selectStmt.SelectExprs, aeWrap(col)) + selectStmt.AddSelectExpr(aeWrap(col)) } return from.op }) @@ -889,7 +889,7 @@ func createFkVerifyOpForParentFKForUpdate(ctx *plancontext.PlanningContext, upda whereCond = &sqlparser.AndExpr{Left: whereCond, Right: prefixColNames(ctx, childTbl, updStmt.Where.Expr)} } return createSelectionOp(ctx, - sqlparser.SelectExprs{sqlparser.NewAliasedExpr(sqlparser.NewIntLiteral("1"), "")}, + []sqlparser.SelectExpr{sqlparser.NewAliasedExpr(sqlparser.NewIntLiteral("1"), "")}, []sqlparser.TableExpr{ sqlparser.NewJoinTableExpr( childTblExpr, @@ -973,7 +973,7 @@ func createFkVerifyOpForChildFKForUpdate(ctx *plancontext.PlanningContext, updat } return createSelectionOp(ctx, - sqlparser.SelectExprs{sqlparser.NewAliasedExpr(sqlparser.NewIntLiteral("1"), "")}, + []sqlparser.SelectExpr{sqlparser.NewAliasedExpr(sqlparser.NewIntLiteral("1"), "")}, []sqlparser.TableExpr{ sqlparser.NewJoinTableExpr( parentTblExpr, @@ -1056,7 +1056,7 @@ func buildChangedVindexesValues( } // Checks done, let's actually add the expressions and the vindex map - selExprs = append(selExprs, aeWrap(sqlparser.AndExpressions(compExprs...))) + selExprs.Exprs = append(selExprs.Exprs, aeWrap(sqlparser.AndExpressions(compExprs...))) changedVindexes[vindex.Name] = &engine.VindexValues{ EvalExprMap: vindexValueMap, Offset: offset, @@ -1076,16 +1076,16 @@ func buildChangedVindexesValues( return changedVindexes, ovq, subQueriesArgOnChangedVindex } -func initialQuery(ksidCols []sqlparser.IdentifierCI, table *vindexes.BaseTable) (sqlparser.SelectExprs, int) { - var selExprs sqlparser.SelectExprs +func initialQuery(ksidCols []sqlparser.IdentifierCI, table *vindexes.BaseTable) (*sqlparser.SelectExprs, int) { + selExprs := new(sqlparser.SelectExprs) offset := 0 for _, col := range ksidCols { - selExprs = append(selExprs, aeWrap(sqlparser.NewColName(col.String()))) + selExprs.Exprs = append(selExprs.Exprs, aeWrap(sqlparser.NewColName(col.String()))) offset++ } for _, cv := range table.Owned { for _, column := range cv.Columns { - selExprs = append(selExprs, aeWrap(sqlparser.NewColName(column.String()))) + selExprs.Exprs = append(selExprs.Exprs, aeWrap(sqlparser.NewColName(column.String()))) offset++ } } diff --git a/go/vt/vtgate/planbuilder/operators/utils_test.go b/go/vt/vtgate/planbuilder/operators/utils_test.go index 035a273e964..babf6c91afb 100644 --- a/go/vt/vtgate/planbuilder/operators/utils_test.go +++ b/go/vt/vtgate/planbuilder/operators/utils_test.go @@ -73,8 +73,7 @@ func (f *fakeOp) GetColumns(ctx *plancontext.PlanningContext) []*sqlparser.Alias panic("implement me") } -func (f *fakeOp) GetSelectExprs(ctx *plancontext.PlanningContext) sqlparser.SelectExprs { - // TODO implement me +func (f *fakeOp) GetSelectExprs(ctx *plancontext.PlanningContext) []sqlparser.SelectExpr { panic("implement me") } diff --git a/go/vt/vtgate/planbuilder/operators/vindex.go b/go/vt/vtgate/planbuilder/operators/vindex.go index cb0719b815f..753cf5cb3cd 100644 --- a/go/vt/vtgate/planbuilder/operators/vindex.go +++ b/go/vt/vtgate/planbuilder/operators/vindex.go @@ -100,7 +100,7 @@ func (v *Vindex) GetColumns(*plancontext.PlanningContext) []*sqlparser.AliasedEx return slice.Map(v.Columns, colNameToExpr) } -func (v *Vindex) GetSelectExprs(ctx *plancontext.PlanningContext) sqlparser.SelectExprs { +func (v *Vindex) GetSelectExprs(ctx *plancontext.PlanningContext) []sqlparser.SelectExpr { return transformColumnsToSelectExprs(ctx, v) } diff --git a/go/vt/vtgate/planbuilder/plan_test.go b/go/vt/vtgate/planbuilder/plan_test.go index 8a8d55279a6..b1731561dd4 100644 --- a/go/vt/vtgate/planbuilder/plan_test.go +++ b/go/vt/vtgate/planbuilder/plan_test.go @@ -229,17 +229,16 @@ func (s *planTestSuite) setFks(vschema *vindexes.VSchema) { _ = vschema.AddForeignKey("unsharded_fk_allow", "u_multicol_tbl2", createFkDefinition([]string{"cola", "colb"}, "u_multicol_tbl1", []string{"cola", "colb"}, sqlparser.SetNull, sqlparser.SetNull)) _ = vschema.AddForeignKey("unsharded_fk_allow", "u_multicol_tbl3", createFkDefinition([]string{"cola", "colb"}, "u_multicol_tbl2", []string{"cola", "colb"}, sqlparser.Cascade, sqlparser.Cascade)) - _ = vschema.AddUniqueKey("unsharded_fk_allow", "u_tbl9", sqlparser.Exprs{sqlparser.NewColName("col9")}) - _ = vschema.AddUniqueKey("unsharded_fk_allow", "u_tbl9", sqlparser.Exprs{&sqlparser.BinaryExpr{Operator: sqlparser.MultOp, Left: sqlparser.NewColName("col9"), Right: sqlparser.NewColName("foo")}}) - _ = vschema.AddUniqueKey("unsharded_fk_allow", "u_tbl9", sqlparser.Exprs{sqlparser.NewColName("col9"), sqlparser.NewColName("foo")}) - _ = vschema.AddUniqueKey("unsharded_fk_allow", "u_tbl9", sqlparser.Exprs{sqlparser.NewColName("foo"), sqlparser.NewColName("bar")}) - _ = vschema.AddUniqueKey("unsharded_fk_allow", "u_tbl9", sqlparser.Exprs{sqlparser.NewColName("bar"), sqlparser.NewColName("col9")}) - _ = vschema.AddUniqueKey("unsharded_fk_allow", "u_tbl8", sqlparser.Exprs{sqlparser.NewColName("col8")}) + _ = vschema.AddUniqueKey("unsharded_fk_allow", "u_tbl9", []sqlparser.Expr{sqlparser.NewColName("col9")}) + _ = vschema.AddUniqueKey("unsharded_fk_allow", "u_tbl9", []sqlparser.Expr{&sqlparser.BinaryExpr{Operator: sqlparser.MultOp, Left: sqlparser.NewColName("col9"), Right: sqlparser.NewColName("foo")}}) + _ = vschema.AddUniqueKey("unsharded_fk_allow", "u_tbl9", []sqlparser.Expr{sqlparser.NewColName("col9"), sqlparser.NewColName("foo")}) + _ = vschema.AddUniqueKey("unsharded_fk_allow", "u_tbl9", []sqlparser.Expr{sqlparser.NewColName("foo"), sqlparser.NewColName("bar")}) + _ = vschema.AddUniqueKey("unsharded_fk_allow", "u_tbl9", []sqlparser.Expr{sqlparser.NewColName("bar"), sqlparser.NewColName("col9")}) + _ = vschema.AddUniqueKey("unsharded_fk_allow", "u_tbl8", []sqlparser.Expr{sqlparser.NewColName("col8")}) s.addPKs(vschema, "unsharded_fk_allow", []string{"u_tbl1", "u_tbl2", "u_tbl3", "u_tbl4", "u_tbl5", "u_tbl6", "u_tbl7", "u_tbl8", "u_tbl9", "u_tbl10", "u_tbl11", "u_multicol_tbl1", "u_multicol_tbl2", "u_multicol_tbl3"}) } - } func (s *planTestSuite) addPKs(vschema *vindexes.VSchema, ks string, tbls []string) { diff --git a/go/vt/vtgate/planbuilder/planner_test.go b/go/vt/vtgate/planbuilder/planner_test.go index bd4c520510c..7cb66e3d101 100644 --- a/go/vt/vtgate/planbuilder/planner_test.go +++ b/go/vt/vtgate/planbuilder/planner_test.go @@ -85,5 +85,5 @@ func TestBindingSubquery(t *testing.T) { } func extractExpr(in *sqlparser.Select, idx int) sqlparser.Expr { - return in.SelectExprs[idx].(*sqlparser.AliasedExpr).Expr + return in.SelectExprs.Exprs[idx].(*sqlparser.AliasedExpr).Expr } diff --git a/go/vt/vtgate/planbuilder/route.go b/go/vt/vtgate/planbuilder/route.go index e320df14416..74a13284e81 100644 --- a/go/vt/vtgate/planbuilder/route.go +++ b/go/vt/vtgate/planbuilder/route.go @@ -73,12 +73,8 @@ func prepareTheAST(sel sqlparser.SelectStatement) { _ = sqlparser.Walk(func(node sqlparser.SQLNode) (bool, error) { switch node := node.(type) { case *sqlparser.Select: - if len(node.SelectExprs) == 0 { - node.SelectExprs = []sqlparser.SelectExpr{ - &sqlparser.AliasedExpr{ - Expr: sqlparser.NewIntLiteral("1"), - }, - } + if node.GetColumnCount() == 0 { + node.AddSelectExpr(&sqlparser.AliasedExpr{Expr: sqlparser.NewIntLiteral("1")}) } case *sqlparser.ComparisonExpr: // 42 = colName -> colName = 42 diff --git a/go/vt/vtgate/planbuilder/select.go b/go/vt/vtgate/planbuilder/select.go index 409343f2760..d7fbf59ac13 100644 --- a/go/vt/vtgate/planbuilder/select.go +++ b/go/vt/vtgate/planbuilder/select.go @@ -139,19 +139,20 @@ func buildSQLCalcFoundRowsPlan( sel2.OrderBy = nil sel2.Limit = nil - countStartExpr := []sqlparser.SelectExpr{&sqlparser.AliasedExpr{ - Expr: &sqlparser.CountStar{}, - }} + countStar := &sqlparser.AliasedExpr{Expr: &sqlparser.CountStar{}} + selectExprs := &sqlparser.SelectExprs{ + Exprs: []sqlparser.SelectExpr{countStar}, + } if sel2.GroupBy == nil && sel2.Having == nil { // if there is no grouping, we can use the same query and // just replace the SELECT sub-clause to have a single count(*) - sel2.SelectExprs = countStartExpr + sel2.SetSelectExprs(countStar) } else { // when there is grouping, we have to move the original query into a derived table. // select id, sum(12) from user group by id => // select count(*) from (select id, sum(12) from user group by id) t sel3 := &sqlparser.Select{ - SelectExprs: countStartExpr, + SelectExprs: selectExprs, From: []sqlparser.TableExpr{ &sqlparser.AliasedTableExpr{ Expr: &sqlparser.DerivedTable{Select: sel2}, @@ -292,10 +293,12 @@ func handleDualSelects(sel *sqlparser.Select, vschema plancontext.VSchema) (engi return nil, nil } - exprs := make([]evalengine.Expr, len(sel.SelectExprs)) - cols := make([]string, len(sel.SelectExprs)) + columns := sel.GetColumns() + size := len(columns) + exprs := make([]evalengine.Expr, size) + cols := make([]string, size) var lockFunctions []*engine.LockFunc - for i, e := range sel.SelectExprs { + for i, e := range columns { expr, ok := e.(*sqlparser.AliasedExpr) if !ok { return nil, nil diff --git a/go/vt/vtgate/planbuilder/system_variables.go b/go/vt/vtgate/planbuilder/system_variables.go index 8ef968a2ac8..e4713e877de 100644 --- a/go/vt/vtgate/planbuilder/system_variables.go +++ b/go/vt/vtgate/planbuilder/system_variables.go @@ -60,7 +60,7 @@ func (pc *sysvarPlanCache) parseAndBuildDefaultValue(sysvar sysvars.SystemVariab panic(fmt.Sprintf("bug in set plan init - default value for %s not parsable: %s", sysvar.Name, sysvar.Default)) } sel := stmt.(*sqlparser.Select) - aliasedExpr := sel.SelectExprs[0].(*sqlparser.AliasedExpr) + aliasedExpr := sel.GetColumns()[0].(*sqlparser.AliasedExpr) def, err := evalengine.Translate(aliasedExpr.Expr, &evalengine.Config{ Collation: pc.env.CollationEnv().DefaultConnectionCharset(), Environment: pc.env, diff --git a/go/vt/vtgate/semantics/analyzer.go b/go/vt/vtgate/semantics/analyzer.go index c4e7dc55866..46de35323ad 100644 --- a/go/vt/vtgate/semantics/analyzer.go +++ b/go/vt/vtgate/semantics/analyzer.go @@ -149,7 +149,7 @@ func (a *analyzer) newSemTable( Direct: ExprDependencies{}, ColumnEqualities: map[columnName][]sqlparser.Expr{}, ExpandedColumns: map[sqlparser.TableName][]*sqlparser.ColName{}, - columns: map[*sqlparser.Union]sqlparser.SelectExprs{}, + columns: map[*sqlparser.Union][]sqlparser.SelectExpr{}, StatementIDs: a.scoper.statementIDs, QuerySignature: a.sig, childForeignKeysInvolved: map[TableSet][]vindexes.ChildFKInfo{}, @@ -159,7 +159,7 @@ func (a *analyzer) newSemTable( }, nil } - columns := map[*sqlparser.Union]sqlparser.SelectExprs{} + columns := map[*sqlparser.Union][]sqlparser.SelectExpr{} for union, info := range a.tables.unionInfo { columns[union] = info.exprs } @@ -275,7 +275,7 @@ func (a *analyzer) analyzeUp(cursor *sqlparser.Cursor) bool { return a.shouldContinue() } -func containsStar(s sqlparser.SelectExprs) bool { +func containsStar(s []sqlparser.SelectExpr) bool { for _, expr := range s { _, isStar := expr.(*sqlparser.StarExpr) if isStar { @@ -306,8 +306,10 @@ func checkUnionColumns(union *sqlparser.Union) error { return nil } - if len(secondProj) != len(firstProj) { - return &UnionColumnsDoNotMatchError{FirstProj: len(firstProj), SecondProj: len(secondProj)} + secondSize := len(secondProj) + firstSize := len(firstProj) + if secondSize != firstSize { + return &UnionColumnsDoNotMatchError{FirstProj: firstSize, SecondProj: secondSize} } return nil @@ -318,14 +320,14 @@ errors that happen when we are evaluating SELECT expressions are saved until we if we can merge everything into a single route or not */ func (a *analyzer) enterProjection(cursor *sqlparser.Cursor) { - _, ok := cursor.Node().(sqlparser.SelectExprs) + _, ok := cursor.Node().(*sqlparser.SelectExprs) if ok && isParentSelect(cursor) { a.inProjection++ } } func (a *analyzer) leaveProjection(cursor *sqlparser.Cursor) { - _, ok := cursor.Node().(sqlparser.SelectExprs) + _, ok := cursor.Node().(*sqlparser.SelectExprs) if ok && isParentSelect(cursor) { a.inProjection-- } diff --git a/go/vt/vtgate/semantics/analyzer_test.go b/go/vt/vtgate/semantics/analyzer_test.go index c7f24e6c73c..72b9ad83eb4 100644 --- a/go/vt/vtgate/semantics/analyzer_test.go +++ b/go/vt/vtgate/semantics/analyzer_test.go @@ -41,7 +41,7 @@ var ( ) func extract(in *sqlparser.Select, idx int) sqlparser.Expr { - return in.SelectExprs[idx].(*sqlparser.AliasedExpr).Expr + return in.SelectExprs.Exprs[idx].(*sqlparser.AliasedExpr).Expr } func TestBindingSingleTablePositive(t *testing.T) { @@ -575,7 +575,7 @@ func TestScopeForSubqueries(t *testing.T) { sel, _ := stmt.(*sqlparser.Select) // extract the first expression from the subquery (which should be the second expression in the outer query) - sel2 := sel.SelectExprs[1].(*sqlparser.AliasedExpr).Expr.(*sqlparser.Subquery).Select.(*sqlparser.Select) + sel2 := extract(sel, 1).(*sqlparser.Subquery).Select.(*sqlparser.Select) exp := extract(sel2, 0) s1 := semTable.RecursiveDeps(exp) require.NoError(t, semTable.NotSingleRouteErr) @@ -1458,7 +1458,7 @@ func TestScopingSubQueryJoinClause(t *testing.T) { require.NoError(t, err) require.NoError(t, st.NotUnshardedErr) - tb := st.DirectDeps(parse.(*sqlparser.Select).SelectExprs[0].(*sqlparser.AliasedExpr).Expr.(*sqlparser.Subquery).Select.(*sqlparser.Select).From[0].(*sqlparser.JoinTableExpr).Condition.On) + tb := st.DirectDeps(extract(parse.(*sqlparser.Select), 0).(*sqlparser.Subquery).Select.(*sqlparser.Select).From[0].(*sqlparser.JoinTableExpr).Condition.On) require.Equal(t, 3, tb.NumberOfTables()) } diff --git a/go/vt/vtgate/semantics/binder.go b/go/vt/vtgate/semantics/binder.go index 78148f4bb1f..b59b50159b7 100644 --- a/go/vt/vtgate/semantics/binder.go +++ b/go/vt/vtgate/semantics/binder.go @@ -365,7 +365,7 @@ func (b *binder) resolveColumnInHaving(colName *sqlparser.ColName, current *scop // searchInSelectExpressions searches for the ColName among the SELECT and GROUP BY expressions // It used dependency information to match the columns func (b *binder) searchInSelectExpressions(colName *sqlparser.ColName, deps dependency, stmt *sqlparser.Select) dependency { - for _, selectExpr := range stmt.SelectExprs { + for _, selectExpr := range stmt.GetColumns() { ae, ok := selectExpr.(*sqlparser.AliasedExpr) if !ok { continue diff --git a/go/vt/vtgate/semantics/check_invalid.go b/go/vt/vtgate/semantics/check_invalid.go index 6509f5f5ee8..e2519208caa 100644 --- a/go/vt/vtgate/semantics/check_invalid.go +++ b/go/vt/vtgate/semantics/check_invalid.go @@ -163,8 +163,8 @@ func (a *analyzer) checkSelect(cursor *sqlparser.Cursor, node *sqlparser.Select) } errMsg := "INTO" nextVal := false - if len(node.SelectExprs) == 1 { - if _, isNextVal := node.SelectExprs[0].(*sqlparser.Nextval); isNextVal { + if node.GetColumnCount() == 1 { + if _, isNextVal := node.GetColumns()[0].(*sqlparser.Nextval); isNextVal { nextVal = true errMsg = "NEXT" } diff --git a/go/vt/vtgate/semantics/derived_table.go b/go/vt/vtgate/semantics/derived_table.go index 676679d2fa9..8a456ad7c5c 100644 --- a/go/vt/vtgate/semantics/derived_table.go +++ b/go/vt/vtgate/semantics/derived_table.go @@ -43,13 +43,13 @@ type unionInfo struct { isAuthoritative bool recursive []TableSet types []evalengine.Type - exprs sqlparser.SelectExprs + exprs []sqlparser.SelectExpr } var _ TableInfo = (*DerivedTable)(nil) func createDerivedTableForExpressions( - expressions sqlparser.SelectExprs, + expressions []sqlparser.SelectExpr, cols sqlparser.Columns, tables []TableInfo, org originable, diff --git a/go/vt/vtgate/semantics/early_rewriter.go b/go/vt/vtgate/semantics/early_rewriter.go index 64426e25748..a76164c2745 100644 --- a/go/vt/vtgate/semantics/early_rewriter.go +++ b/go/vt/vtgate/semantics/early_rewriter.go @@ -45,7 +45,7 @@ type earlyRewriter struct { func (r *earlyRewriter) down(cursor *sqlparser.Cursor) error { switch node := cursor.Node().(type) { - case sqlparser.SelectExprs: + case *sqlparser.SelectExprs: return r.handleSelectExprs(cursor, node) case *sqlparser.NotExpr: rewriteNotExpr(cursor, node) @@ -225,7 +225,7 @@ func (r *earlyRewriter) handleHavingClause(node *sqlparser.Where, parent sqlpars } // handleSelectExprs expands * in SELECT expressions. -func (r *earlyRewriter) handleSelectExprs(cursor *sqlparser.Cursor, node sqlparser.SelectExprs) error { +func (r *earlyRewriter) handleSelectExprs(cursor *sqlparser.Cursor, node *sqlparser.SelectExprs) error { _, isSel := cursor.Parent().(*sqlparser.Select) if !isSel { return nil @@ -732,7 +732,7 @@ func (r *earlyRewriter) getAliasMap(sel *sqlparser.Select) (aliases map[string]e return } aliases = map[string]exprContainer{} - for _, e := range sel.SelectExprs { + for _, e := range sel.GetColumns() { ae, ok := e.(*sqlparser.AliasedExpr) if !ok { continue @@ -776,7 +776,7 @@ func (r *earlyRewriter) rewriteOrderByLiteral(node *sqlparser.Literal) (expr sql return nil, false, vterrors.Errorf(vtrpcpb.Code_INTERNAL, "error invalid statement type, expect Select, got: %T", scope.stmt) } - if num < 1 || num > len(stmt.SelectExprs) { + if num < 1 || num > stmt.GetColumnCount() { return nil, false, &ColumnNotFoundClauseError{ Column: fmt.Sprintf("%d", num), Clause: r.clause, @@ -785,13 +785,13 @@ func (r *earlyRewriter) rewriteOrderByLiteral(node *sqlparser.Literal) (expr sql // We loop like this instead of directly accessing the offset, to make sure there are no unexpanded `*` before for i := 0; i < num; i++ { - if _, ok := stmt.SelectExprs[i].(*sqlparser.AliasedExpr); !ok { - return nil, false, vterrors.Errorf(vtrpcpb.Code_UNIMPLEMENTED, "cannot use column offsets in %s when using `%s`", r.clause, sqlparser.String(stmt.SelectExprs[i])) + if _, ok := stmt.GetColumns()[i].(*sqlparser.AliasedExpr); !ok { + return nil, false, vterrors.Errorf(vtrpcpb.Code_UNIMPLEMENTED, "cannot use column offsets in %s when using `%s`", r.clause, sqlparser.String(stmt.GetColumns()[i])) } } colOffset := num - 1 - aliasedExpr, ok := stmt.SelectExprs[colOffset].(*sqlparser.AliasedExpr) + aliasedExpr, ok := stmt.GetColumns()[colOffset].(*sqlparser.AliasedExpr) if !ok { return nil, false, vterrors.Errorf(vtrpcpb.Code_INTERNAL, "don't know how to handle %s", sqlparser.String(node)) } @@ -831,18 +831,18 @@ func (r *earlyRewriter) rewriteGroupByExpr(node *sqlparser.Literal) (sqlparser.E return nil, vterrors.Errorf(vtrpcpb.Code_INTERNAL, "error invalid statement type, expect Select, got: %T", scope.stmt) } - if num < 1 || num > len(stmt.SelectExprs) { + if num < 1 || num > stmt.GetColumnCount() { return nil, vterrors.NewErrorf(vtrpcpb.Code_INVALID_ARGUMENT, vterrors.BadFieldError, "Unknown column '%d' in '%s'", num, r.clause) } // We loop like this instead of directly accessing the offset, to make sure there are no unexpanded `*` before for i := 0; i < num; i++ { - if _, ok := stmt.SelectExprs[i].(*sqlparser.AliasedExpr); !ok { - return nil, vterrors.Errorf(vtrpcpb.Code_UNIMPLEMENTED, "cannot use column offsets in %s when using `%s`", r.clause, sqlparser.String(stmt.SelectExprs[i])) + if _, ok := stmt.GetColumns()[i].(*sqlparser.AliasedExpr); !ok { + return nil, vterrors.Errorf(vtrpcpb.Code_UNIMPLEMENTED, "cannot use column offsets in %s when using `%s`", r.clause, sqlparser.String(stmt.GetColumns()[i])) } } - aliasedExpr, ok := stmt.SelectExprs[num-1].(*sqlparser.AliasedExpr) + aliasedExpr, ok := stmt.GetColumns()[num-1].(*sqlparser.AliasedExpr) if !ok { return nil, vterrors.Errorf(vtrpcpb.Code_INTERNAL, "don't know how to handle %s", sqlparser.String(node)) } @@ -876,14 +876,14 @@ func handleComparisonExpr(cursor *sqlparser.Cursor, node *sqlparser.ComparisonEx return nil } -func (r *earlyRewriter) expandStar(cursor *sqlparser.Cursor, node sqlparser.SelectExprs) error { +func (r *earlyRewriter) expandStar(cursor *sqlparser.Cursor, node *sqlparser.SelectExprs) error { currentScope := r.scoper.currentScope() - var selExprs sqlparser.SelectExprs + selExprs := new(sqlparser.SelectExprs) changed := false - for _, selectExpr := range node { + for _, selectExpr := range node.Exprs { starExpr, isStarExpr := selectExpr.(*sqlparser.StarExpr) if !isStarExpr { - selExprs = append(selExprs, selectExpr) + selExprs.Exprs = append(selExprs.Exprs, selectExpr) continue } starExpanded, colNames, err := r.expandTableColumns(starExpr, currentScope.tables, r.binder.usingJoinInfo, r.scoper.org) @@ -891,10 +891,10 @@ func (r *earlyRewriter) expandStar(cursor *sqlparser.Cursor, node sqlparser.Sele return err } if !starExpanded || colNames == nil { - selExprs = append(selExprs, selectExpr) + selExprs.Exprs = append(selExprs.Exprs, selectExpr) continue } - selExprs = append(selExprs, colNames...) + selExprs.Exprs = append(selExprs.Exprs, colNames.Exprs...) changed = true } if changed { @@ -1065,11 +1065,11 @@ func (r *earlyRewriter) expandTableColumns( tables []TableInfo, joinUsing map[TableSet]map[string]TableSet, org originable, -) (bool, sqlparser.SelectExprs, error) { +) (bool, *sqlparser.SelectExprs, error) { unknownTbl := true starExpanded := true state := &expanderState{ - colNames: []sqlparser.SelectExpr{}, + colNames: &sqlparser.SelectExprs{}, needsQualifier: len(tables) > 1, joinUsing: joinUsing, org: org, @@ -1155,7 +1155,7 @@ outer: type expanderState struct { needsQualifier bool - colNames sqlparser.SelectExprs + colNames *sqlparser.SelectExprs joinUsing map[TableSet]map[string]TableSet org originable expandedColumns map[sqlparser.TableName][]*sqlparser.ColName @@ -1171,7 +1171,7 @@ func (e *expanderState) addColumn(col ColumnInfo, tbl TableInfo, tblName sqlpars } else { colName = sqlparser.NewColName(col.Name) } - e.colNames = append(e.colNames, &sqlparser.AliasedExpr{Expr: colName, As: alias}) + e.colNames.Exprs = append(e.colNames.Exprs, &sqlparser.AliasedExpr{Expr: colName, As: alias}) e.storeExpandInfo(tbl, tblName, colName) } diff --git a/go/vt/vtgate/semantics/early_rewriter_test.go b/go/vt/vtgate/semantics/early_rewriter_test.go index 29da6ab51ee..074deb39f64 100644 --- a/go/vt/vtgate/semantics/early_rewriter_test.go +++ b/go/vt/vtgate/semantics/early_rewriter_test.go @@ -790,16 +790,17 @@ func TestSemTableDependenciesAfterExpandStar(t *testing.T) { semTable, err := Analyze(selectStatement, "", schemaInfo) require.NoError(t, err) assert.Equal(t, tcase.expSQL, sqlparser.String(selectStatement)) + exprs := selectStatement.GetColumns() if tcase.otherTbl != -1 { assert.NotEqual(t, - semTable.RecursiveDeps(selectStatement.SelectExprs[tcase.otherTbl].(*sqlparser.AliasedExpr).Expr), - semTable.RecursiveDeps(selectStatement.SelectExprs[tcase.expandedCol].(*sqlparser.AliasedExpr).Expr), + semTable.RecursiveDeps(exprs[tcase.otherTbl].(*sqlparser.AliasedExpr).Expr), + semTable.RecursiveDeps(exprs[tcase.expandedCol].(*sqlparser.AliasedExpr).Expr), ) } if tcase.sameTbl != -1 { assert.Equal(t, - semTable.RecursiveDeps(selectStatement.SelectExprs[tcase.sameTbl].(*sqlparser.AliasedExpr).Expr), - semTable.RecursiveDeps(selectStatement.SelectExprs[tcase.expandedCol].(*sqlparser.AliasedExpr).Expr), + semTable.RecursiveDeps(exprs[tcase.sameTbl].(*sqlparser.AliasedExpr).Expr), + semTable.RecursiveDeps(exprs[tcase.expandedCol].(*sqlparser.AliasedExpr).Expr), ) } }) diff --git a/go/vt/vtgate/semantics/real_table.go b/go/vt/vtgate/semantics/real_table.go index 55dd25a5064..3c6e8a5e56d 100644 --- a/go/vt/vtgate/semantics/real_table.go +++ b/go/vt/vtgate/semantics/real_table.go @@ -151,7 +151,7 @@ func (r *RealTable) authoritative() bool { } } -func extractSelectExprsFromCTE(selectExprs sqlparser.SelectExprs) []ColumnInfo { +func extractSelectExprsFromCTE(selectExprs []sqlparser.SelectExpr) []ColumnInfo { var ci []ColumnInfo for _, expr := range selectExprs { ae, ok := expr.(*sqlparser.AliasedExpr) @@ -166,7 +166,7 @@ func extractSelectExprsFromCTE(selectExprs sqlparser.SelectExprs) []ColumnInfo { return ci } -func extractColumnsFromCTE(columns sqlparser.Columns, selectExprs sqlparser.SelectExprs) []ColumnInfo { +func extractColumnsFromCTE(columns sqlparser.Columns, selectExprs []sqlparser.SelectExpr) []ColumnInfo { if len(columns) == 0 { return nil } @@ -181,7 +181,7 @@ func extractColumnsFromCTE(columns sqlparser.Columns, selectExprs sqlparser.Sele }) } -// GetExpr implements the TableInfo interface +// GetAliasedTableExpr implements the TableInfo interface func (r *RealTable) GetAliasedTableExpr() *sqlparser.AliasedTableExpr { return r.ASTNode } diff --git a/go/vt/vtgate/semantics/scoper.go b/go/vt/vtgate/semantics/scoper.go index e6df3c3a5b0..3ca950b94da 100644 --- a/go/vt/vtgate/semantics/scoper.go +++ b/go/vt/vtgate/semantics/scoper.go @@ -76,8 +76,8 @@ func (s *scoper) down(cursor *sqlparser.Cursor) error { s.pushUnionScope(node) case sqlparser.TableExpr: s.enterJoinScope(cursor) - case sqlparser.SelectExprs: - s.copySelectExprs(cursor, node) + case *sqlparser.SelectExprs: + s.copySelectExprs(cursor, node.Exprs) case sqlparser.OrderBy: return s.addColumnInfoForOrderBy(cursor, node) case *sqlparser.GroupBy: @@ -152,7 +152,7 @@ func (s *scoper) addColumnInfoForOrderBy(cursor *sqlparser.Cursor, node sqlparse return nil } -func (s *scoper) copySelectExprs(cursor *sqlparser.Cursor, node sqlparser.SelectExprs) { +func (s *scoper) copySelectExprs(cursor *sqlparser.Cursor, node []sqlparser.SelectExpr) { sel, parentIsSelect := cursor.Parent().(*sqlparser.Select) if !parentIsSelect { return diff --git a/go/vt/vtgate/semantics/semantic_table.go b/go/vt/vtgate/semantics/semantic_table.go index 0227ee04137..6a88046e2a2 100644 --- a/go/vt/vtgate/semantics/semantic_table.go +++ b/go/vt/vtgate/semantics/semantic_table.go @@ -140,7 +140,7 @@ type ( // The columns were added because of the use of `*` in the query ExpandedColumns map[sqlparser.TableName][]*sqlparser.ColName - columns map[*sqlparser.Union]sqlparser.SelectExprs + columns map[*sqlparser.Union][]sqlparser.SelectExpr comparator *sqlparser.Comparator @@ -493,10 +493,10 @@ func (st *SemTable) ForeignKeysPresent() bool { return false } -func (st *SemTable) SelectExprs(sel sqlparser.TableStatement) sqlparser.SelectExprs { +func (st *SemTable) SelectExprs(sel sqlparser.TableStatement) []sqlparser.SelectExpr { switch sel := sel.(type) { case *sqlparser.Select: - return sel.SelectExprs + return sel.GetColumns() case *sqlparser.Union: exprs, found := st.columns[sel] if found { @@ -512,8 +512,9 @@ func (st *SemTable) SelectExprs(sel sqlparser.TableStatement) sqlparser.SelectEx panic(fmt.Sprintf("BUG: unexpected select statement type %T", sel)) } -func getColumnNames(exprs sqlparser.SelectExprs) (expanded bool, selectExprs sqlparser.SelectExprs) { - expanded = true +func getColumnNames(exprs []sqlparser.SelectExpr) (bool, []sqlparser.SelectExpr) { + var selectExprs []sqlparser.SelectExpr + expanded := true for _, col := range exprs { switch col := col.(type) { case *sqlparser.AliasedExpr: @@ -524,7 +525,7 @@ func getColumnNames(exprs sqlparser.SelectExprs) (expanded bool, selectExprs sql expanded = false } } - return + return expanded, selectExprs } // CopySemanticInfo copies all semantic information we have about this SQLNode so that it also applies to the `to` node @@ -571,7 +572,7 @@ func EmptySemTable() *SemTable { Recursive: map[sqlparser.Expr]TableSet{}, Direct: map[sqlparser.Expr]TableSet{}, ColumnEqualities: map[columnName][]sqlparser.Expr{}, - columns: map[*sqlparser.Union]sqlparser.SelectExprs{}, + columns: map[*sqlparser.Union][]sqlparser.SelectExpr{}, ExprTypes: make(map[sqlparser.Expr]evalengine.Type), } } @@ -658,9 +659,9 @@ func (st *SemTable) TableInfoForExpr(expr sqlparser.Expr) (TableInfo, error) { } // AddExprs adds new select exprs to the SemTable. -func (st *SemTable) AddExprs(tbl *sqlparser.AliasedTableExpr, cols sqlparser.SelectExprs) { +func (st *SemTable) AddExprs(tbl *sqlparser.AliasedTableExpr, cols *sqlparser.SelectExprs) { tableSet := st.TableSetFor(tbl) - for _, col := range cols { + for _, col := range cols.Exprs { st.Recursive[col.(*sqlparser.AliasedExpr).Expr] = tableSet } } @@ -757,7 +758,7 @@ func (st *SemTable) CopyExprInfo(src, dest sqlparser.Expr) { var columnNotSupportedErr = vterrors.Errorf(vtrpcpb.Code_UNIMPLEMENTED, "column access not supported here") // ColumnLookup implements the TranslationLookup interface -func (st *SemTable) ColumnLookup(col *sqlparser.ColName) (int, error) { +func (st *SemTable) ColumnLookup(*sqlparser.ColName) (int, error) { return 0, columnNotSupportedErr } diff --git a/go/vt/vtgate/semantics/semantic_table_test.go b/go/vt/vtgate/semantics/semantic_table_test.go index 19f586d6190..3400b196fac 100644 --- a/go/vt/vtgate/semantics/semantic_table_test.go +++ b/go/vt/vtgate/semantics/semantic_table_test.go @@ -50,7 +50,7 @@ func TestBindingAndExprEquality(t *testing.T) { require.NoError(t, err) st, err := Analyze(parse, "db", fakeSchemaInfoTest()) require.NoError(t, err) - exprs := parse.(*sqlparser.Select).SelectExprs + exprs := parse.(*sqlparser.Select).GetColumns() a := exprs[0].(*sqlparser.AliasedExpr).Expr b := exprs[1].(*sqlparser.AliasedExpr).Expr assert.Equal(t, st.EqualsExpr(a, b), test.equal) diff --git a/go/vt/vtgate/semantics/table_collector.go b/go/vt/vtgate/semantics/table_collector.go index e35165f600d..d2740afaee9 100644 --- a/go/vt/vtgate/semantics/table_collector.go +++ b/go/vt/vtgate/semantics/table_collector.go @@ -174,7 +174,7 @@ func (tc *tableCollector) visitUnion(union *sqlparser.Union) error { collations := tc.org.collationEnv() err = sqlparser.VisitAllSelects(union, func(s *sqlparser.Select, idx int) error { - for i, expr := range s.SelectExprs { + for i, expr := range s.GetColumns() { ae, ok := expr.(*sqlparser.AliasedExpr) if !ok { continue @@ -450,11 +450,11 @@ func (tc *tableCollector) addSelectDerivedTable( alias sqlparser.IdentifierCS, ) error { tables := tc.scoper.wScope[sel] - size := len(sel.SelectExprs) + size := sel.GetColumnCount() deps := make([]TableSet, size) types := make([]evalengine.Type, size) expanded := true - for i, expr := range sel.SelectExprs { + for i, expr := range sel.GetColumns() { ae, ok := expr.(*sqlparser.AliasedExpr) if !ok { expanded = false @@ -463,7 +463,7 @@ func (tc *tableCollector) addSelectDerivedTable( _, deps[i], types[i] = tc.org.depsForExpr(ae.Expr) } - tableInfo := createDerivedTableForExpressions(sel.SelectExprs, columns, tables.tables, tc.org, expanded, deps, types) + tableInfo := createDerivedTableForExpressions(sel.GetColumns(), columns, tables.tables, tc.org, expanded, deps, types) if err := tableInfo.checkForDuplicates(); err != nil { return err } diff --git a/go/vt/vtgate/semantics/typer_test.go b/go/vt/vtgate/semantics/typer_test.go index 1ec642b8168..bfb8cb1119e 100644 --- a/go/vt/vtgate/semantics/typer_test.go +++ b/go/vt/vtgate/semantics/typer_test.go @@ -50,7 +50,8 @@ func TestNormalizerAndSemanticAnalysisIntegration(t *testing.T) { st, err := Analyze(out.AST, "d", fakeSchemaInfo()) require.NoError(t, err) - bv := out.AST.(*sqlparser.Select).SelectExprs[0].(*sqlparser.AliasedExpr).Expr.(*sqlparser.Argument) + + bv := extract(out.AST.(*sqlparser.Select), 0).(*sqlparser.Argument) typ, found := st.ExprTypes[bv] require.True(t, found, "bindvar was not typed") require.Equal(t, test.typ, typ.Type().String()) diff --git a/go/vt/vtgate/semantics/vtable.go b/go/vt/vtgate/semantics/vtable.go index 94dc74cdf34..610bfa76db8 100644 --- a/go/vt/vtgate/semantics/vtable.go +++ b/go/vt/vtgate/semantics/vtable.go @@ -133,7 +133,7 @@ func (v *vTableInfo) getExprFor(s string) (sqlparser.Expr, error) { return nil, vterrors.VT03022(s, "field list") } -func createVTableInfoForExpressions(expressions sqlparser.SelectExprs, tables []TableInfo, org originable) *vTableInfo { +func createVTableInfoForExpressions(expressions []sqlparser.SelectExpr, tables []TableInfo, org originable) *vTableInfo { cols, colNames, ts, isAuthoritative := selectExprsToInfos(expressions, tables, org) return &vTableInfo{ columnNames: colNames, @@ -144,7 +144,7 @@ func createVTableInfoForExpressions(expressions sqlparser.SelectExprs, tables [] } func selectExprsToInfos( - expressions sqlparser.SelectExprs, + expressions []sqlparser.SelectExpr, tables []TableInfo, org originable, ) (cols []sqlparser.Expr, colNames []string, ts TableSet, isAuthoritative bool) { diff --git a/go/vt/vtgate/simplifier/expression_simplifier.go b/go/vt/vtgate/simplifier/expression_simplifier.go index b64402cfaac..8395fb26d17 100644 --- a/go/vt/vtgate/simplifier/expression_simplifier.go +++ b/go/vt/vtgate/simplifier/expression_simplifier.go @@ -29,7 +29,7 @@ type CheckF = func(sqlparser.Expr) bool func SimplifyExpr(in sqlparser.Expr, test CheckF) sqlparser.Expr { // since we can't rewrite the top level, wrap the expr in an Exprs object - smallestKnown := sqlparser.Exprs{sqlparser.Clone(in)} + smallestKnown := sqlparser.NewExprs(sqlparser.Clone(in)) alwaysVisit := func(node, parent sqlparser.SQLNode) bool { return true @@ -42,7 +42,7 @@ func SimplifyExpr(in sqlparser.Expr, test CheckF) sqlparser.Expr { for expr != nil { cursor.Replace(expr) - valid := test(smallestKnown[0]) + valid := test(smallestKnown.Exprs[0]) if valid { break // we will still continue trying to simplify other expressions at this level } else { @@ -59,12 +59,13 @@ func SimplifyExpr(in sqlparser.Expr, test CheckF) sqlparser.Expr { for { prevSmallest := sqlparser.Clone(smallestKnown) sqlparser.SafeRewrite(smallestKnown, alwaysVisit, up) - if sqlparser.Equals.Exprs(prevSmallest, smallestKnown) { + _ = prevSmallest + if sqlparser.Equals.RefOfExprs(prevSmallest, smallestKnown) { break } } - return smallestKnown[0] + return smallestKnown.Exprs[0] } type shrinker struct { diff --git a/go/vt/vtgate/simplifier/simplifier.go b/go/vt/vtgate/simplifier/simplifier.go index c15e2ea58d1..e37ee616be3 100644 --- a/go/vt/vtgate/simplifier/simplifier.go +++ b/go/vt/vtgate/simplifier/simplifier.go @@ -281,7 +281,7 @@ func removeTable(clone sqlparser.TableStatement, searchedTS semantics.TableSet, simplified = removeTableinJoinTableExpr(node, searchedTS, semTable, cursor, simplified) case *sqlparser.Where: simplified = removeTableinWhere(node, shouldKeepExpr, simplified) - case sqlparser.SelectExprs: + case *sqlparser.SelectExprs: simplified = removeTableinSelectExprs(node, cursor, shouldKeepExpr, simplified) case *sqlparser.GroupBy: simplified = removeTableInGroupBy(node, cursor, shouldKeepExpr, simplified) @@ -352,14 +352,14 @@ func removeTableinWhere(node *sqlparser.Where, shouldKeepExpr func(sqlparser.Exp return simplified } -func removeTableinSelectExprs(node sqlparser.SelectExprs, cursor *sqlparser.Cursor, shouldKeepExpr func(sqlparser.Expr) bool, simplified bool) bool { +func removeTableinSelectExprs(node *sqlparser.SelectExprs, cursor *sqlparser.Cursor, shouldKeepExpr func(sqlparser.Expr) bool, simplified bool) bool { _, isSel := cursor.Parent().(*sqlparser.Select) if !isSel { return simplified } - var newExprs sqlparser.SelectExprs - for _, ae := range node { + var newExprs []sqlparser.SelectExpr + for _, ae := range node.Exprs { expr, ok := ae.(*sqlparser.AliasedExpr) if !ok { newExprs = append(newExprs, ae) @@ -371,7 +371,8 @@ func removeTableinSelectExprs(node sqlparser.SelectExprs, cursor *sqlparser.Curs simplified = true } } - cursor.Replace(newExprs) + + cursor.Replace(&sqlparser.SelectExprs{Exprs: newExprs}) return simplified } @@ -435,7 +436,7 @@ func visitAllExpressionsInAST(clone sqlparser.TableStatement, visit func(express } up := func(cursor *sqlparser.Cursor) bool { switch node := cursor.Node().(type) { - case sqlparser.SelectExprs: + case *sqlparser.SelectExprs: return visitSelectExprs(node, cursor, visit) case *sqlparser.Where: return visitWhere(node, visit) @@ -455,13 +456,13 @@ func visitAllExpressionsInAST(clone sqlparser.TableStatement, visit func(express sqlparser.SafeRewrite(clone, alwaysVisitChildren, up) } -func visitSelectExprs(node sqlparser.SelectExprs, cursor *sqlparser.Cursor, visit func(expressionCursor) bool) bool { +func visitSelectExprs(node *sqlparser.SelectExprs, cursor *sqlparser.Cursor, visit func(expressionCursor) bool) bool { _, isSel := cursor.Parent().(*sqlparser.Select) if !isSel { return true } - for idx := 0; idx < len(node); idx++ { - ae := node[idx] + for idx := 0; idx < len(node.Exprs); idx++ { + ae := node.Exprs[idx] expr, ok := ae.(*sqlparser.AliasedExpr) if !ok { continue @@ -480,25 +481,23 @@ func visitSelectExprs(node sqlparser.SelectExprs, cursor *sqlparser.Cursor, visi if removed { panic("can't remove twice, silly") } - if len(node) == 1 { + if len(node.Exprs) == 1 { // can't remove the last expressions - we'd end up with an empty SELECT clause return false } - withoutElement := append(node[:idx], node[idx+1:]...) - cursor.Replace(withoutElement) - node = withoutElement + withoutElement := append(node.Exprs[:idx], node.Exprs[idx+1:]...) + node.Exprs = withoutElement removed = true return true }, /*restore*/ func() { if removed { - front := make(sqlparser.SelectExprs, idx) - copy(front, node[:idx]) - back := make(sqlparser.SelectExprs, len(node)-idx) - copy(back, node[idx:]) + front := make([]sqlparser.SelectExpr, idx) + copy(front, node.Exprs[:idx]) + back := make([]sqlparser.SelectExpr, len(node.Exprs)-idx) + copy(back, node.Exprs[idx:]) frontWithRestoredExpr := append(front, ae) - node = append(frontWithRestoredExpr, back...) - cursor.Replace(node) + node.Exprs = append(frontWithRestoredExpr, back...) removed = false return } diff --git a/go/vt/vtgate/vindexes/foreign_keys.go b/go/vt/vtgate/vindexes/foreign_keys.go index e9f8c986d10..46399b6576c 100644 --- a/go/vt/vtgate/vindexes/foreign_keys.go +++ b/go/vt/vtgate/vindexes/foreign_keys.go @@ -162,7 +162,7 @@ func (vschema *VSchema) AddPrimaryKey(ksname, tblName string, cols []string) err } // AddUniqueKey is for testing only. -func (vschema *VSchema) AddUniqueKey(ksname, tblName string, exprs sqlparser.Exprs) error { +func (vschema *VSchema) AddUniqueKey(ksname, tblName string, exprs []sqlparser.Expr) error { ks, ok := vschema.Keyspaces[ksname] if !ok { return fmt.Errorf("keyspace %s not found in vschema", ksname) diff --git a/go/vt/vtgate/vindexes/vschema.go b/go/vt/vtgate/vindexes/vschema.go index 5499200768b..686c3edcb4e 100644 --- a/go/vt/vtgate/vindexes/vschema.go +++ b/go/vt/vtgate/vindexes/vschema.go @@ -154,8 +154,8 @@ type BaseTable struct { // index can be columns or expression. // For Primary key, functional indexes are not allowed, therefore it will only be columns. // MySQL error message: ERROR 3756 (HY000): The primary key cannot be a functional index - PrimaryKey sqlparser.Columns `json:"primary_key,omitempty"` - UniqueKeys []sqlparser.Exprs `json:"unique_keys,omitempty"` + PrimaryKey sqlparser.Columns `json:"primary_key,omitempty"` + UniqueKeys [][]sqlparser.Expr `json:"unique_keys,omitempty"` } // GetTableName gets the sqlparser.TableName for the vindex Table. diff --git a/go/vt/vtgate/vschema_manager.go b/go/vt/vtgate/vschema_manager.go index 7a1c5ee1d24..0fb5904f133 100644 --- a/go/vt/vtgate/vschema_manager.go +++ b/go/vt/vtgate/vschema_manager.go @@ -270,7 +270,7 @@ func (vm *VSchemaManager) updateTableInfo(vschema *vindexes.VSchema, ks *vindexe rTbl.PrimaryKey = append(rTbl.PrimaryKey, idxCol.Column) } case sqlparser.IndexTypeUnique: - var uniqueKey sqlparser.Exprs + var uniqueKey []sqlparser.Expr for _, idxCol := range idxDef.Columns { if idxCol.Expression == nil { uniqueKey = append(uniqueKey, sqlparser.NewColName(idxCol.Column.String())) diff --git a/go/vt/vtgate/vschema_manager_test.go b/go/vt/vtgate/vschema_manager_test.go index 42515d59788..9dae4f1fc5a 100644 --- a/go/vt/vtgate/vschema_manager_test.go +++ b/go/vt/vtgate/vschema_manager_test.go @@ -90,7 +90,7 @@ func TestVSchemaUpdate(t *testing.T) { Keyspace: ks, ColumnListAuthoritative: true, PrimaryKey: sqlparser.Columns{sqlparser.NewIdentifierCI("a")}, - UniqueKeys: []sqlparser.Exprs{ + UniqueKeys: [][]sqlparser.Expr{ {sqlparser.NewColName("b")}, {sqlparser.NewColName("c"), sqlparser.NewColName("d")}, }, @@ -100,7 +100,7 @@ func TestVSchemaUpdate(t *testing.T) { Keyspace: ks, ColumnListAuthoritative: true, PrimaryKey: sqlparser.Columns{sqlparser.NewIdentifierCI("a")}, - UniqueKeys: []sqlparser.Exprs{ + UniqueKeys: [][]sqlparser.Expr{ {&sqlparser.BinaryExpr{Operator: sqlparser.DivOp, Left: sqlparser.NewColName("b"), Right: sqlparser.NewIntLiteral("2")}}, {sqlparser.NewColName("c"), &sqlparser.BinaryExpr{Operator: sqlparser.PlusOp, Left: sqlparser.NewColName("d"), Right: sqlparser.NewColName("e")}}, }, @@ -524,16 +524,20 @@ func TestVSchemaViewsUpdate(t *testing.T) { vs = vschema vs.ResetCreated() } + + s1 := &sqlparser.Select{ + From: sqlparser.TableExprs{sqlparser.NewAliasedTableExpr(sqlparser.NewTableName("t1"), "")}, + } + s2 := &sqlparser.Select{ + From: sqlparser.TableExprs{sqlparser.NewAliasedTableExpr(sqlparser.NewTableName("t2"), "")}, + } + s1.AddSelectExpr(sqlparser.NewAliasedExpr(sqlparser.NewIntLiteral("1"), "")) + s2.AddSelectExpr(sqlparser.NewAliasedExpr(sqlparser.NewIntLiteral("2"), "")) vm.schema = &fakeSchema{v: map[string]sqlparser.TableStatement{ - "v1": &sqlparser.Select{ - From: sqlparser.TableExprs{sqlparser.NewAliasedTableExpr(sqlparser.NewTableName("t1"), "")}, - SelectExprs: sqlparser.SelectExprs{sqlparser.NewAliasedExpr(sqlparser.NewIntLiteral("1"), "")}, - }, - "v2": &sqlparser.Select{ - From: sqlparser.TableExprs{sqlparser.NewAliasedTableExpr(sqlparser.NewTableName("t2"), "")}, - SelectExprs: sqlparser.SelectExprs{sqlparser.NewAliasedExpr(sqlparser.NewIntLiteral("2"), "")}, - }, + "v1": s1, + "v2": s2, }} + vm.VSchemaUpdate(&vschemapb.SrvVSchema{ Keyspaces: map[string]*vschemapb.Keyspace{ "ks": {Sharded: true}, diff --git a/go/vt/vttablet/tabletmanager/vdiff/report.go b/go/vt/vttablet/tabletmanager/vdiff/report.go index b53288b3019..5c7a2593558 100644 --- a/go/vt/vttablet/tabletmanager/vdiff/report.go +++ b/go/vt/vttablet/tabletmanager/vdiff/report.go @@ -81,7 +81,7 @@ func (td *tableDiffer) genRowDiff(queryStmt string, row []sqltypes.Value, opts * addVal := func(index int, truncateAt int) { buf := sqlparser.NewTrackedBuffer(nil) - sel.SelectExprs[index].Format(buf) + sel.SelectExprs.Exprs[index].Format(buf) col := buf.String() // Let's truncate if it's really worth it to avoid losing // value for a few chars. @@ -106,7 +106,7 @@ func (td *tableDiffer) genRowDiff(queryStmt string, row []sqltypes.Value, opts * } truncateAt := int(opts.GetRowDiffColumnTruncateAt()) - for i := range sel.SelectExprs { + for i := range sel.SelectExprs.Exprs { if _, pk := pks[i]; !pk { addVal(i, truncateAt) } @@ -121,7 +121,7 @@ func (td *tableDiffer) genDebugQueryDiff(sel *sqlparser.Select, row []sqltypes.V if onlyPks { for i, pkI := range td.tablePlan.selectPks { - pk := sel.SelectExprs[pkI] + pk := sel.GetColumns()[pkI] pk.Format(buf) if i != len(td.tablePlan.selectPks)-1 { buf.Myprintf(", ") @@ -134,7 +134,7 @@ func (td *tableDiffer) genDebugQueryDiff(sel *sqlparser.Select, row []sqltypes.V buf.Myprintf(sqlparser.ToString(sel.From)) buf.Myprintf(" where ") for i, pkI := range td.tablePlan.selectPks { - sel.SelectExprs[pkI].Format(buf) + sel.SelectExprs.Exprs[pkI].Format(buf) buf.Myprintf("=") row[pkI].EncodeSQL(buf) if i != len(td.tablePlan.selectPks)-1 { diff --git a/go/vt/vttablet/tabletmanager/vdiff/table_differ.go b/go/vt/vttablet/tabletmanager/vdiff/table_differ.go index 1ebeab8ed8d..1904a8e97a5 100644 --- a/go/vt/vttablet/tabletmanager/vdiff/table_differ.go +++ b/go/vt/vttablet/tabletmanager/vdiff/table_differ.go @@ -863,12 +863,12 @@ func (td *tableDiffer) lastPKFromRow(row []sqltypes.Value) *tabletmanagerdatapb. // VReplication workflow would have converted the datetime columns expecting the // source to have been in the SourceTimeZone and target in TargetTimeZone. We need // to do the reverse conversion in VDiff before the comparison. -func (td *tableDiffer) adjustForSourceTimeZone(targetSelectExprs sqlparser.SelectExprs, fields map[string]querypb.Type) sqlparser.SelectExprs { +func (td *tableDiffer) adjustForSourceTimeZone(targetSelectExprs []sqlparser.SelectExpr, fields map[string]querypb.Type) []sqlparser.SelectExpr { if td.wd.ct.sourceTimeZone == "" { return targetSelectExprs } log.Infof("source time zone specified: %s", td.wd.ct.sourceTimeZone) - var newSelectExprs sqlparser.SelectExprs + var newSelectExprs []sqlparser.SelectExpr var modified bool for _, expr := range targetSelectExprs { converted := false @@ -879,14 +879,11 @@ func (td *tableDiffer) adjustForSourceTimeZone(targetSelectExprs sqlparser.Selec colName := colAs.Name.Lowered() fieldType := fields[colName] if fieldType == querypb.Type_DATETIME { - convertTZFuncExpr = &sqlparser.FuncExpr{ - Name: sqlparser.NewIdentifierCI("convert_tz"), - Exprs: sqlparser.Exprs{ - selExpr.Expr, - sqlparser.NewStrLiteral(td.wd.ct.targetTimeZone), - sqlparser.NewStrLiteral(td.wd.ct.sourceTimeZone), - }, - } + convertTZFuncExpr = sqlparser.NewFuncExpr("convert_tz", + selExpr.Expr, + sqlparser.NewStrLiteral(td.wd.ct.targetTimeZone), + sqlparser.NewStrLiteral(td.wd.ct.sourceTimeZone), + ) log.Infof("converting datetime column %s using convert_tz()", colName) newSelectExprs = append(newSelectExprs, &sqlparser.AliasedExpr{Expr: convertTZFuncExpr, As: colAs.Name}) converted = true diff --git a/go/vt/vttablet/tabletmanager/vdiff/table_plan.go b/go/vt/vttablet/tabletmanager/vdiff/table_plan.go index b5ea384d864..49f2713b58a 100644 --- a/go/vt/vttablet/tabletmanager/vdiff/table_plan.go +++ b/go/vt/vttablet/tabletmanager/vdiff/table_plan.go @@ -87,14 +87,14 @@ func (td *tableDiffer) buildTablePlan(dbClient binlogplayer.DBClient, dbName str targetSelect := &sqlparser.Select{} // Aggregates is the list of Aggregate functions, if any. var aggregates []*engine.AggregateParams - for _, selExpr := range sel.SelectExprs { + for _, selExpr := range sel.GetColumns() { switch selExpr := selExpr.(type) { case *sqlparser.StarExpr: // If it's a '*' expression, expand column list from the schema. for _, fld := range tp.table.Fields { aliased := &sqlparser.AliasedExpr{Expr: &sqlparser.ColName{Name: sqlparser.NewIdentifierCI(fld.Name)}} - sourceSelect.SelectExprs = append(sourceSelect.SelectExprs, aliased) - targetSelect.SelectExprs = append(targetSelect.SelectExprs, aliased) + sourceSelect.AddSelectExpr(aliased) + targetSelect.AddSelectExpr(aliased) } case *sqlparser.AliasedExpr: var targetCol *sqlparser.ColName @@ -108,8 +108,8 @@ func (td *tableDiffer) buildTablePlan(dbClient binlogplayer.DBClient, dbName str targetCol = &sqlparser.ColName{Name: selExpr.As} } // If the input was "select a as b", then source will use "a" and target will use "b". - sourceSelect.SelectExprs = append(sourceSelect.SelectExprs, selExpr) - targetSelect.SelectExprs = append(targetSelect.SelectExprs, &sqlparser.AliasedExpr{Expr: targetCol}) + sourceSelect.AddSelectExpr(selExpr) + targetSelect.AddSelectExpr(&sqlparser.AliasedExpr{Expr: targetCol}) // Check if it's an aggregate expression if expr, ok := selExpr.Expr.(sqlparser.AggrFunc); ok { @@ -121,7 +121,7 @@ func (td *tableDiffer) buildTablePlan(dbClient binlogplayer.DBClient, dbName str // but will need to be revisited when we add such support to vreplication aggregates = append(aggregates, engine.NewAggregateParam( /*opcode*/ opcode.AggregateSum, - /*offset*/ len(sourceSelect.SelectExprs)-1, + /*offset*/ sourceSelect.GetColumnCount()-1, /*alias*/ "", collationEnv), ) } @@ -135,12 +135,12 @@ func (td *tableDiffer) buildTablePlan(dbClient binlogplayer.DBClient, dbName str fields[strings.ToLower(field.Name)] = field.Type } - targetSelect.SelectExprs = td.adjustForSourceTimeZone(targetSelect.SelectExprs, fields) + targetSelect.SetSelectExprs(td.adjustForSourceTimeZone(targetSelect.GetColumns(), fields)...) // Start with adding all columns for comparison. - tp.compareCols = make([]compareColInfo, len(sourceSelect.SelectExprs)) + tp.compareCols = make([]compareColInfo, sourceSelect.GetColumnCount()) for i := range tp.compareCols { tp.compareCols[i].colIndex = i - colname, err := getColumnNameForSelectExpr(targetSelect.SelectExprs[i]) + colname, err := getColumnNameForSelectExpr(targetSelect.GetColumns()[i]) if err != nil { return nil, err } @@ -215,7 +215,7 @@ func (tp *tablePlan) findPKs(dbClient binlogplayer.DBClient, targetSelect *sqlpa var orderby sqlparser.OrderBy for _, pk := range tp.table.PrimaryKeyColumns { found := false - for i, selExpr := range targetSelect.SelectExprs { + for i, selExpr := range targetSelect.SelectExprs.Exprs { expr := selExpr.(*sqlparser.AliasedExpr).Expr colname := "" switch ct := expr.(type) { diff --git a/go/vt/vttablet/tabletmanager/vreplication/table_plan_builder.go b/go/vt/vttablet/tabletmanager/vreplication/table_plan_builder.go index b8a86b94de5..5c2b0f21dc5 100644 --- a/go/vt/vttablet/tabletmanager/vreplication/table_plan_builder.go +++ b/go/vt/vttablet/tabletmanager/vreplication/table_plan_builder.go @@ -234,10 +234,10 @@ func buildTablePlan(tableName string, rule *binlogdatapb.Rule, colInfos []*Colum Match: fromTable, } - if expr, ok := sel.SelectExprs[0].(*sqlparser.StarExpr); ok { + if expr, ok := sel.SelectExprs.Exprs[0].(*sqlparser.StarExpr); ok { // If it's a "select *", we return a partial plan, and complete // it when we get back field info from the stream. - if len(sel.SelectExprs) != 1 { + if len(sel.SelectExprs.Exprs) != 1 { return nil, planError(fmt.Errorf("unsupported mix of '*' and columns"), sqlparser.String(sel)) } if !expr.TableName.IsEmpty() { @@ -272,7 +272,7 @@ func buildTablePlan(tableName string, rule *binlogdatapb.Rule, colInfos []*Colum workflowConfig: workflowConfig, } - if err := tpb.analyzeExprs(sel.SelectExprs); err != nil { + if err := tpb.analyzeExprs(sel.SelectExprs.Exprs); err != nil { return nil, planError(err, sqlparser.String(sel)) } // It's possible that the target table does not materialize all @@ -309,11 +309,9 @@ func buildTablePlan(tableName string, rule *binlogdatapb.Rule, colInfos []*Colum // if there are no columns being selected the select expression can be empty, so we "select 1" so we have a valid // select to get a row back - if len(tpb.sendSelect.SelectExprs) == 0 { - tpb.sendSelect.SelectExprs = sqlparser.SelectExprs([]sqlparser.SelectExpr{ - &sqlparser.AliasedExpr{ - Expr: sqlparser.NewIntLiteral("1"), - }, + if tpb.sendSelect.SelectExprs == nil || len(tpb.sendSelect.SelectExprs.Exprs) == 0 { + tpb.sendSelect.AddSelectExpr(&sqlparser.AliasedExpr{ + Expr: sqlparser.NewIntLiteral("1"), }) } commentsList := []string{} @@ -413,7 +411,7 @@ func analyzeSelectFrom(query string, parser *sqlparser.Parser) (sel *sqlparser.S return sel, fromTable.String(), nil } -func (tpb *tablePlanBuilder) analyzeExprs(selExprs sqlparser.SelectExprs) error { +func (tpb *tablePlanBuilder) analyzeExprs(selExprs []sqlparser.SelectExpr) error { for _, selExpr := range selExprs { cexpr, err := tpb.analyzeExpr(selExpr) if err != nil { @@ -468,7 +466,7 @@ func (tpb *tablePlanBuilder) analyzeExpr(selExpr sqlparser.SelectExpr) (*colExpr } cexpr.expr = expr cexpr.operation = opExpr - tpb.sendSelect.SelectExprs = append(tpb.sendSelect.SelectExprs, &sqlparser.AliasedExpr{Expr: selExpr, As: as}) + tpb.sendSelect.AddSelectExpr(&sqlparser.AliasedExpr{Expr: selExpr, As: as}) cexpr.references[as.String()] = true return cexpr, nil } @@ -478,7 +476,8 @@ func (tpb *tablePlanBuilder) analyzeExpr(selExpr sqlparser.SelectExpr) (*colExpr if len(expr.Exprs) != 0 { return nil, fmt.Errorf("unsupported multiple keyspace_id expressions: %v", sqlparser.String(expr)) } - tpb.sendSelect.SelectExprs = append(tpb.sendSelect.SelectExprs, &sqlparser.AliasedExpr{Expr: aliased.Expr}) + + tpb.sendSelect.AddSelectExpr(&sqlparser.AliasedExpr{Expr: aliased.Expr}) // The vstreamer responds with "keyspace_id" as the field name for this request. cexpr.expr = &sqlparser.ColName{Name: sqlparser.NewIdentifierCI("keyspace_id")} return cexpr, nil @@ -538,7 +537,7 @@ func (tpb *tablePlanBuilder) analyzeExpr(selExpr sqlparser.SelectExpr) (*colExpr // addCol adds the specified column to the send query // if it's not already present. func (tpb *tablePlanBuilder) addCol(ident sqlparser.IdentifierCI) { - tpb.sendSelect.SelectExprs = append(tpb.sendSelect.SelectExprs, &sqlparser.AliasedExpr{ + tpb.sendSelect.AddSelectExpr(&sqlparser.AliasedExpr{ Expr: &sqlparser.ColName{Name: ident}, }) } diff --git a/go/vt/vttablet/tabletserver/planbuilder/builder.go b/go/vt/vttablet/tabletserver/planbuilder/builder.go index 6df89f7caf8..f1a6e89416c 100644 --- a/go/vt/vttablet/tabletserver/planbuilder/builder.go +++ b/go/vt/vttablet/tabletserver/planbuilder/builder.go @@ -44,7 +44,7 @@ func analyzeSelect(env *vtenv.Environment, sel *sqlparser.Select, tables map[str } // Check if it's a NEXT VALUE statement. - if nextVal, ok := sel.SelectExprs[0].(*sqlparser.Nextval); ok { + if nextVal, ok := sel.GetColumns()[0].(*sqlparser.Nextval); ok { if plan.Table == nil || plan.Table.Type != schema.Sequence { return nil, vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "%s is not a sequence", sqlparser.ToString(sel.From)) } diff --git a/go/vt/vttablet/tabletserver/planbuilder/permission.go b/go/vt/vttablet/tabletserver/planbuilder/permission.go index 1949d6ce739..03f926e0679 100644 --- a/go/vt/vttablet/tabletserver/planbuilder/permission.go +++ b/go/vt/vttablet/tabletserver/planbuilder/permission.go @@ -38,7 +38,7 @@ func BuildPermissions(stmt sqlparser.Statement) []Permission { switch node := stmt.(type) { case *sqlparser.Select: role := tableacl.READER - if _, ok := node.SelectExprs[0].(*sqlparser.Nextval); ok { + if _, ok := node.GetColumns()[0].(*sqlparser.Nextval); ok { role = tableacl.WRITER } permissions = buildSubqueryPermissions(node, role, permissions) diff --git a/go/vt/vttablet/tabletserver/vstreamer/planbuilder.go b/go/vt/vttablet/tabletserver/vstreamer/planbuilder.go index e5115afe6d3..1293efa3112 100644 --- a/go/vt/vttablet/tabletserver/vstreamer/planbuilder.go +++ b/go/vt/vttablet/tabletserver/vstreamer/planbuilder.go @@ -465,7 +465,7 @@ func buildTablePlan(env *vtenv.Environment, ti *Table, vschema *localVSchema, qu log.Errorf("%s", err.Error()) return nil, err } - if err := plan.analyzeExprs(vschema, sel.SelectExprs); err != nil { + if err := plan.analyzeExprs(vschema, sel.GetColumns()); err != nil { log.Errorf("%s", err.Error()) return nil, err } @@ -670,7 +670,7 @@ func splitAndExpression(filters []sqlparser.Expr, node sqlparser.Expr) []sqlpars return append(filters, node) } -func (plan *Plan) analyzeExprs(vschema *localVSchema, selExprs sqlparser.SelectExprs) error { +func (plan *Plan) analyzeExprs(vschema *localVSchema, selExprs []sqlparser.SelectExpr) error { if _, ok := selExprs[0].(*sqlparser.StarExpr); !ok { for _, expr := range selExprs { cExpr, err := plan.analyzeExpr(vschema, expr) @@ -681,7 +681,7 @@ func (plan *Plan) analyzeExprs(vschema *localVSchema, selExprs sqlparser.SelectE } } else { if len(selExprs) != 1 { - return fmt.Errorf("unsupported: %v", sqlparser.String(selExprs)) + return fmt.Errorf("unsupported: %v", sqlparser.SliceString(selExprs)) } plan.ColExprs = make([]ColExpr, len(plan.Table.Fields)) for i, col := range plan.Table.Fields { @@ -838,7 +838,7 @@ func (plan *Plan) analyzeExpr(vschema *localVSchema, selExpr sqlparser.SelectExp // analyzeInKeyRange allows the following constructs: "in_keyrange('-80')", // "in_keyrange(col, 'hash', '-80')", "in_keyrange(col, 'local_vindex', '-80')", or // "in_keyrange(col, 'ks.external_vindex', '-80')". -func (plan *Plan) analyzeInKeyRange(vschema *localVSchema, exprs sqlparser.Exprs) error { +func (plan *Plan) analyzeInKeyRange(vschema *localVSchema, exprs []sqlparser.Expr) error { var colnames []sqlparser.IdentifierCI var krExpr sqlparser.Expr whereFilter := Filter{ @@ -879,7 +879,7 @@ func (plan *Plan) analyzeInKeyRange(vschema *localVSchema, exprs sqlparser.Exprs krExpr = exprs[len(exprs)-1] default: - return vterrors.Errorf(vtrpcpb.Code_INTERNAL, "[BUG] unexpected in_keyrange parameters: %v", sqlparser.String(exprs)) + return vterrors.Errorf(vtrpcpb.Code_INTERNAL, "[BUG] unexpected in_keyrange parameters: %v", sqlparser.SliceString(exprs)) } var err error whereFilter.VindexColumns, err = buildVindexColumns(plan.Table, colnames) diff --git a/go/vt/wrangler/materializer.go b/go/vt/wrangler/materializer.go index 27aaa6935be..2bf2ec824ee 100644 --- a/go/vt/wrangler/materializer.go +++ b/go/vt/wrangler/materializer.go @@ -1393,7 +1393,7 @@ func (mz *materializer) generateInserts(ctx context.Context, sourceShards []*top } mappedCols = append(mappedCols, colName) } - subExprs := make(sqlparser.Exprs, 0, len(mappedCols)+2) + subExprs := make([]sqlparser.Expr, 0, len(mappedCols)+2) for _, mappedCol := range mappedCols { subExprs = append(subExprs, mappedCol) } @@ -1412,10 +1412,7 @@ func (mz *materializer) generateInserts(ctx context.Context, sourceShards []*top } subExprs = append(subExprs, sqlparser.NewStrLiteral(vindexName)) subExprs = append(subExprs, sqlparser.NewStrLiteral("{{.keyrange}}")) - inKeyRange := &sqlparser.FuncExpr{ - Name: sqlparser.NewIdentifierCI("in_keyrange"), - Exprs: subExprs, - } + inKeyRange := sqlparser.NewFuncExpr("in_keyrange", subExprs...) if sel.Where != nil { sel.Where = &sqlparser.Where{ Type: sqlparser.WhereClause, @@ -1489,7 +1486,7 @@ func (mz *materializer) getWorkflowSubType() (binlogdatapb.VReplicationWorkflowS } func matchColInSelect(col sqlparser.IdentifierCI, sel *sqlparser.Select) (*sqlparser.ColName, error) { - for _, selExpr := range sel.SelectExprs { + for _, selExpr := range sel.GetColumns() { switch selExpr := selExpr.(type) { case *sqlparser.StarExpr: return &sqlparser.ColName{Name: col}, nil diff --git a/go/vt/wrangler/vdiff.go b/go/vt/wrangler/vdiff.go index 9991b5bd633..7c45bc2aeac 100644 --- a/go/vt/wrangler/vdiff.go +++ b/go/vt/wrangler/vdiff.go @@ -503,7 +503,7 @@ func findPKs(env *vtenv.Environment, table *tabletmanagerdatapb.TableDefinition, var orderby sqlparser.OrderBy for _, pk := range table.PrimaryKeyColumns { found := false - for i, selExpr := range targetSelect.SelectExprs { + for i, selExpr := range targetSelect.GetColumns() { expr := selExpr.(*sqlparser.AliasedExpr).Expr colname := "" switch ct := expr.(type) { @@ -603,12 +603,12 @@ func getColumnCollations(venv *vtenv.Environment, table *tabletmanagerdatapb.Tab // If SourceTimeZone is defined in the BinlogSource, the VReplication workflow would have converted the datetime // columns expecting the source to have been in the SourceTimeZone and target in TargetTimeZone. We need to do the reverse // conversion in VDiff before comparing to the source -func (df *vdiff) adjustForSourceTimeZone(targetSelectExprs sqlparser.SelectExprs, fields map[string]querypb.Type) sqlparser.SelectExprs { +func (df *vdiff) adjustForSourceTimeZone(targetSelectExprs []sqlparser.SelectExpr, fields map[string]querypb.Type) []sqlparser.SelectExpr { if df.sourceTimeZone == "" { return targetSelectExprs } log.Infof("source time zone specified: %s", df.sourceTimeZone) - var newSelectExprs sqlparser.SelectExprs + var newSelectExprs []sqlparser.SelectExpr var modified bool for _, expr := range targetSelectExprs { converted := false @@ -619,14 +619,10 @@ func (df *vdiff) adjustForSourceTimeZone(targetSelectExprs sqlparser.SelectExprs colName := colAs.Name.Lowered() fieldType := fields[colName] if fieldType == querypb.Type_DATETIME { - convertTZFuncExpr = &sqlparser.FuncExpr{ - Name: sqlparser.NewIdentifierCI("convert_tz"), - Exprs: sqlparser.Exprs{ - colAs, - sqlparser.NewStrLiteral(df.targetTimeZone), - sqlparser.NewStrLiteral(df.sourceTimeZone), - }, - } + convertTZFuncExpr = sqlparser.NewFuncExpr("convert_tz", + colAs, + sqlparser.NewStrLiteral(df.targetTimeZone), + sqlparser.NewStrLiteral(df.sourceTimeZone)) log.Infof("converting datetime column %s using convert_tz()", colName) newSelectExprs = append(newSelectExprs, &sqlparser.AliasedExpr{Expr: convertTZFuncExpr, As: colAs.Name}) converted = true @@ -679,14 +675,14 @@ func (df *vdiff) buildTablePlan(table *tabletmanagerdatapb.TableDefinition, quer targetSelect := &sqlparser.Select{} // aggregates contains the list if Aggregate functions, if any. var aggregates []*engine.AggregateParams - for _, selExpr := range sel.SelectExprs { + for _, selExpr := range sel.GetColumns() { switch selExpr := selExpr.(type) { case *sqlparser.StarExpr: // If it's a '*' expression, expand column list from the schema. for _, fld := range table.Fields { aliased := &sqlparser.AliasedExpr{Expr: &sqlparser.ColName{Name: sqlparser.NewIdentifierCI(fld.Name)}} - sourceSelect.SelectExprs = append(sourceSelect.SelectExprs, aliased) - targetSelect.SelectExprs = append(targetSelect.SelectExprs, aliased) + sourceSelect.AddSelectExpr(aliased) + targetSelect.AddSelectExpr(aliased) } case *sqlparser.AliasedExpr: var targetCol *sqlparser.ColName @@ -700,8 +696,8 @@ func (df *vdiff) buildTablePlan(table *tabletmanagerdatapb.TableDefinition, quer targetCol = &sqlparser.ColName{Name: selExpr.As} } // If the input was "select a as b", then source will use "a" and target will use "b". - sourceSelect.SelectExprs = append(sourceSelect.SelectExprs, selExpr) - targetSelect.SelectExprs = append(targetSelect.SelectExprs, &sqlparser.AliasedExpr{Expr: targetCol}) + sourceSelect.AddSelectExpr(selExpr) + targetSelect.AddSelectExpr(&sqlparser.AliasedExpr{Expr: targetCol}) // Check if it's an aggregate expression if expr, ok := selExpr.Expr.(sqlparser.AggrFunc); ok { @@ -713,7 +709,7 @@ func (df *vdiff) buildTablePlan(table *tabletmanagerdatapb.TableDefinition, quer // but will need to be revisited when we add such support to vreplication aggregates = append(aggregates, engine.NewAggregateParam( /*opcode*/ opcode.AggregateSum, - /*offset*/ len(sourceSelect.SelectExprs)-1, + /*offset*/ sourceSelect.GetColumnCount()-1, /*alias*/ "", df.env.CollationEnv())) } } @@ -727,12 +723,12 @@ func (df *vdiff) buildTablePlan(table *tabletmanagerdatapb.TableDefinition, quer fields[strings.ToLower(field.Name)] = field.Type } - targetSelect.SelectExprs = df.adjustForSourceTimeZone(targetSelect.SelectExprs, fields) + targetSelect.SelectExprs.Exprs = df.adjustForSourceTimeZone(targetSelect.SelectExprs.Exprs, fields) // Start with adding all columns for comparison. - td.compareCols = make([]compareColInfo, len(sourceSelect.SelectExprs)) + td.compareCols = make([]compareColInfo, sourceSelect.GetColumnCount()) for i := range td.compareCols { td.compareCols[i].colIndex = i - colname, err := getColumnNameForSelectExpr(targetSelect.SelectExprs[i]) + colname, err := getColumnNameForSelectExpr(targetSelect.GetColumns()[i]) if err != nil { return nil, err } @@ -1357,16 +1353,16 @@ func (td *tableDiffer) genRowDiff(queryStmt string, row []sqltypes.Value, debug, if onlyPks { for _, pkI := range td.selectPks { buf := sqlparser.NewTrackedBuffer(nil) - sel.SelectExprs[pkI].Format(buf) + sel.SelectExprs.Exprs[pkI].Format(buf) col := buf.String() drp.Row[col] = row[pkI] } return drp, nil } - for i := range sel.SelectExprs { + for i := range sel.SelectExprs.Exprs { buf := sqlparser.NewTrackedBuffer(nil) - sel.SelectExprs[i].Format(buf) + sel.SelectExprs.Exprs[i].Format(buf) col := buf.String() drp.Row[col] = row[i] } @@ -1380,7 +1376,7 @@ func (td *tableDiffer) genDebugQueryDiff(sel *sqlparser.Select, row []sqltypes.V if onlyPks { for i, pkI := range td.selectPks { - pk := sel.SelectExprs[pkI] + pk := sel.GetColumns()[pkI] pk.Format(buf) if i != len(td.selectPks)-1 { buf.Myprintf(", ") @@ -1393,7 +1389,7 @@ func (td *tableDiffer) genDebugQueryDiff(sel *sqlparser.Select, row []sqltypes.V buf.Myprintf(sqlparser.ToString(sel.From)) buf.Myprintf(" where ") for i, pkI := range td.selectPks { - sel.SelectExprs[pkI].Format(buf) + sel.SelectExprs.Exprs[pkI].Format(buf) buf.Myprintf("=") row[pkI].EncodeSQL(buf) if i != len(td.selectPks)-1 { diff --git a/go/vt/wrangler/vdiff_test.go b/go/vt/wrangler/vdiff_test.go index 44c3a22a336..4bbaed35c3f 100644 --- a/go/vt/wrangler/vdiff_test.go +++ b/go/vt/wrangler/vdiff_test.go @@ -1071,11 +1071,10 @@ func TestVDiffFindPKs(t *testing.T) { Schema: "create table t1(c1 bigint, c2 bigint, primary key(c1))", }, targetSelect: &sqlparser.Select{ - SelectExprs: sqlparser.SelectExprs{ - &sqlparser.AliasedExpr{Expr: &sqlparser.ColName{Name: sqlparser.NewIdentifierCI("c1")}}, - &sqlparser.AliasedExpr{Expr: &sqlparser.ColName{Name: sqlparser.NewIdentifierCI("c2")}}, - }, - }, + SelectExprs: &sqlparser.SelectExprs{ + Exprs: []sqlparser.SelectExpr{ + &sqlparser.AliasedExpr{Expr: &sqlparser.ColName{Name: sqlparser.NewIdentifierCI("c1")}}, + &sqlparser.AliasedExpr{Expr: &sqlparser.ColName{Name: sqlparser.NewIdentifierCI("c2")}}}}}, tdIn: &tableDiffer{ compareCols: []compareColInfo{{0, collations.Unknown, nil, false}, {1, collations.Unknown, nil, false}}, comparePKs: []compareColInfo{}, @@ -1097,12 +1096,12 @@ func TestVDiffFindPKs(t *testing.T) { Schema: "create table t1(c1 bigint, c2 bigint, c3 varchar(50), c4 bigint, primary key(c1, c4))", }, targetSelect: &sqlparser.Select{ - SelectExprs: sqlparser.SelectExprs{ - &sqlparser.AliasedExpr{Expr: &sqlparser.ColName{Name: sqlparser.NewIdentifierCI("c1")}}, - &sqlparser.AliasedExpr{Expr: &sqlparser.ColName{Name: sqlparser.NewIdentifierCI("c2")}}, - &sqlparser.AliasedExpr{Expr: &sqlparser.FuncExpr{Name: sqlparser.NewIdentifierCI("c3")}}, - &sqlparser.AliasedExpr{Expr: &sqlparser.ColName{Name: sqlparser.NewIdentifierCI("c4")}}, - }, + SelectExprs: &sqlparser.SelectExprs{ + Exprs: []sqlparser.SelectExpr{ + &sqlparser.AliasedExpr{Expr: sqlparser.NewColName("c1")}, + &sqlparser.AliasedExpr{Expr: sqlparser.NewColName("c2")}, + &sqlparser.AliasedExpr{Expr: sqlparser.NewFuncExpr("c3")}, + &sqlparser.AliasedExpr{Expr: sqlparser.NewColName("c4")}}}, }, tdIn: &tableDiffer{ compareCols: []compareColInfo{{0, collations.Unknown, nil, false}, {1, collations.Unknown, nil, false}, {2, collations.Unknown, nil, false}, {3, collations.Unknown, nil, false}}, From 3669569f659c6b9850c077fc576eef4f7b613fe1 Mon Sep 17 00:00:00 2001 From: Dirkjan Bussink Date: Thu, 6 Feb 2025 09:28:55 +0100 Subject: [PATCH 5/8] Ignore execution time errors for schemadiff view analysis (#17704) Signed-off-by: Dirkjan Bussink --- go/vt/schemadiff/schema.go | 5 +++++ go/vt/schemadiff/schema_test.go | 14 ++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/go/vt/schemadiff/schema.go b/go/vt/schemadiff/schema.go index bbd1258070e..c251779061c 100644 --- a/go/vt/schemadiff/schema.go +++ b/go/vt/schemadiff/schema.go @@ -1085,6 +1085,11 @@ func (s *Schema) ValidateViewReferences() error { View: view.Name(), Column: e.Column.Name.String(), } + case *semantics.UnsupportedConstruct: + // These are error types from semantic analysis for executing queries. When we + // have a view, we don't have Vitess execute these queries but MySQL does, so + // we don't want to return errors for these. + return nil } return err } diff --git a/go/vt/schemadiff/schema_test.go b/go/vt/schemadiff/schema_test.go index 1710cec12c7..43cfcf78bdc 100644 --- a/go/vt/schemadiff/schema_test.go +++ b/go/vt/schemadiff/schema_test.go @@ -570,6 +570,20 @@ func TestInvalidSchema(t *testing.T) { `, expectErr: &DuplicateForeignKeyConstraintNameError{Table: "t2", Constraint: "const_id"}, }, + { + schema: ` +CREATE TABLE users (id INT PRIMARY KEY, name VARCHAR(255)); +CREATE VIEW user_earnings_ranking AS +SELECT + u.id AS user_id, + e.total_earnings AS total_earnings, + ROW_NUMBER() OVER ( + ORDER BY e.total_earnings DESC, u.id ASC + ) AS ranking +FROM users AS u JOIN earnings AS e ON e.user_id = u.id; +`, + expectErr: &ViewDependencyUnresolvedError{View: "user_earnings_ranking"}, + }, } for _, ts := range tt { t.Run(ts.schema, func(t *testing.T) { From e08d85c85bc6b76c04bb5da0f214c10a0bc07946 Mon Sep 17 00:00:00 2001 From: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> Date: Thu, 6 Feb 2025 10:29:23 +0200 Subject: [PATCH 6/8] `schemadiff` textual annotation fix + tests (#17630) Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> --- go/vt/schemadiff/annotations.go | 15 +- go/vt/schemadiff/diff_test.go | 234 +++++++++++++++++++++++++++++--- go/vt/schemadiff/table.go | 1 + go/vt/schemadiff/table_test.go | 142 +++++++++++++++++-- 4 files changed, 356 insertions(+), 36 deletions(-) diff --git a/go/vt/schemadiff/annotations.go b/go/vt/schemadiff/annotations.go index f17344c1085..d17b0c42a48 100644 --- a/go/vt/schemadiff/annotations.go +++ b/go/vt/schemadiff/annotations.go @@ -91,17 +91,16 @@ func (a *TextualAnnotations) Removed() (r []*AnnotatedText) { func (a *TextualAnnotations) Export() string { textLines := make([]string, 0, len(a.texts)) for _, annotatedText := range a.texts { - switch annotatedText.typ { - case AddedTextualAnnotationType: + switch { + case annotatedText.typ == AddedTextualAnnotationType: annotatedText.text = "+" + annotatedText.text - case RemovedTextualAnnotationType: + case annotatedText.typ == RemovedTextualAnnotationType: annotatedText.text = "-" + annotatedText.text + case a.hasAnyChanges: + // This text is unchanged, but indented to align with changes + annotatedText.text = " " + annotatedText.text default: - // text unchanged - if a.hasAnyChanges { - // If there is absolutely no change, we don't add a space anywhere - annotatedText.text = " " + annotatedText.text - } + // If there is absolutely no change, we don't add a space anywhere } textLines = append(textLines, annotatedText.text) } diff --git a/go/vt/schemadiff/diff_test.go b/go/vt/schemadiff/diff_test.go index 185d233ef20..c707b6dd290 100644 --- a/go/vt/schemadiff/diff_test.go +++ b/go/vt/schemadiff/diff_test.go @@ -73,6 +73,13 @@ func TestDiffTables(t *testing.T) { action: "alter", fromName: "t", toName: "t", + annotated: []string{ + " CREATE TABLE `t` (", + " `id` int,", + "+ `i` int,", + "+ `b` tinyint(1),", + " PRIMARY KEY (`id`)", + " )"}, }, { name: "alter columns from tinyint(1) to boolean", @@ -93,6 +100,14 @@ func TestDiffTables(t *testing.T) { action: "alter", fromName: "t", toName: "t", + annotated: []string{ + " CREATE TABLE `t` (", + " `id` int,", + "+ `i` int,", + "+ `b` tinyint(1) DEFAULT '1',", + " PRIMARY KEY (`id`)", + " )", + }, }, { name: "change of columns, boolean type, invalid default", @@ -103,6 +118,14 @@ func TestDiffTables(t *testing.T) { action: "alter", fromName: "t", toName: "t", + annotated: []string{ + " CREATE TABLE `t` (", + " `id` int,", + "+ `i` int,", + "+ `b` tinyint(1),", + " PRIMARY KEY (`id`)", + " )", + }, }, { name: "create", @@ -139,6 +162,14 @@ func TestDiffTables(t *testing.T) { hints: &DiffHints{ TableQualifierHint: TableQualifierDeclared, }, + annotated: []string{ + " CREATE TABLE `t1` (", + " `id` int,", + "- `name` int,", + "+ `name` bigint,", + " PRIMARY KEY (`id`)", + " )", + }, }, { name: "TableQualifierDeclared hint, from has qualifier", @@ -150,6 +181,14 @@ func TestDiffTables(t *testing.T) { hints: &DiffHints{ TableQualifierHint: TableQualifierDeclared, }, + annotated: []string{ + " CREATE TABLE `_vt`.`t1` (", + " `id` int,", + "- `name` int,", + "+ `name` bigint,", + " PRIMARY KEY (`id`)", + " )", + }, }, { name: "TableQualifierDefault, from has qualifier", @@ -158,6 +197,14 @@ func TestDiffTables(t *testing.T) { diff: "alter table _vt.t1 modify column `name` bigint", cdiff: "ALTER TABLE `_vt`.`t1` MODIFY COLUMN `name` bigint", action: "alter", + annotated: []string{ + " CREATE TABLE `_vt`.`t1` (", + " `id` int,", + "- `name` int,", + "+ `name` bigint,", + " PRIMARY KEY (`id`)", + " )", + }, }, { name: "TableQualifierDefault, both have qualifiers", @@ -166,6 +213,14 @@ func TestDiffTables(t *testing.T) { diff: "alter table _vt.t1 modify column `name` bigint", cdiff: "ALTER TABLE `_vt`.`t1` MODIFY COLUMN `name` bigint", action: "alter", + annotated: []string{ + " CREATE TABLE `_vt`.`t1` (", + " `id` int,", + "- `name` int,", + "+ `name` bigint,", + " PRIMARY KEY (`id`)", + " )", + }, }, { name: "TableQualifierDefault, create", @@ -174,6 +229,12 @@ func TestDiffTables(t *testing.T) { cdiff: "CREATE TABLE `_vt`.`t` (\n\t`id` int,\n\tPRIMARY KEY (`id`)\n)", action: "create", toName: "t", + annotated: []string{ + "+CREATE TABLE `_vt`.`t` (", + "+ `id` int,", + "+ PRIMARY KEY (`id`)", + "+)", + }, }, { name: "TableQualifierDeclared, create", @@ -185,6 +246,12 @@ func TestDiffTables(t *testing.T) { hints: &DiffHints{ TableQualifierHint: TableQualifierDeclared, }, + annotated: []string{ + "+CREATE TABLE `_vt`.`t` (", + "+ `id` int,", + "+ PRIMARY KEY (`id`)", + "+)", + }, }, { name: "TableQualifierDefault, drop", @@ -193,6 +260,12 @@ func TestDiffTables(t *testing.T) { cdiff: "DROP TABLE `_vt`.`t`", action: "drop", fromName: "t", + annotated: []string{ + "-CREATE TABLE `_vt`.`t` (", + "- `id` int,", + "- PRIMARY KEY (`id`)", + "-)", + }, }, { name: "TableQualifierDeclared, drop", @@ -204,6 +277,12 @@ func TestDiffTables(t *testing.T) { hints: &DiffHints{ TableQualifierHint: TableQualifierDeclared, }, + annotated: []string{ + "-CREATE TABLE `_vt`.`t` (", + "- `id` int,", + "- PRIMARY KEY (`id`)", + "-)", + }, }, { name: "changing table level defaults with column specific settings, ignore charset", @@ -254,6 +333,12 @@ func TestDiffTables(t *testing.T) { AlterTableAlgorithmStrategy: AlterTableAlgorithmStrategyCopy, TableCharsetCollateStrategy: TableCharsetCollateStrict, }, + annotated: []string{ + " CREATE TABLE `t` (", + " `a` varchar(64) COLLATE latin1_bin", + "-) CHARSET latin1", + " )", + }, }, { name: "changing table level defaults with column specific settings, table already normalized", @@ -267,6 +352,13 @@ func TestDiffTables(t *testing.T) { AlterTableAlgorithmStrategy: AlterTableAlgorithmStrategyCopy, TableCharsetCollateStrategy: TableCharsetCollateStrict, }, + annotated: []string{ + " CREATE TABLE `t` (", + "- `a` varchar(64)", + "-) CHARSET latin1", + "+ `a` varchar(64) CHARACTER SET latin1 COLLATE latin1_bin", + " )", + }, }, { name: "changing table level charset to default", @@ -275,6 +367,12 @@ func TestDiffTables(t *testing.T) { action: "alter", diff: "alter table t charset utf8mb4", cdiff: "ALTER TABLE `t` CHARSET utf8mb4", + annotated: []string{ + " CREATE TABLE `t` (", + " `i` int", + "-) CHARSET latin1", + " )", + }, }, { name: "no changes with normalization and utf8mb4", @@ -406,11 +504,11 @@ func TestDiffTables(t *testing.T) { require.NotNil(t, from) require.NotNil(t, to) require.NotNil(t, unified) - if ts.annotated != nil { - // Optional test for assorted scenarios. - unifiedExport := unified.Export() - assert.Equal(t, ts.annotated, strings.Split(unifiedExport, "\n")) + if ts.annotated == nil { + ts.annotated = []string{} } + unifiedExport := unified.Export() + assert.Equal(t, ts.annotated, strings.Split(unifiedExport, "\n")) }) // let's also check dq, and also validate that dq's statement is identical to d's assert.NoError(t, dqerr) @@ -556,12 +654,13 @@ func TestDiffViews(t *testing.T) { _, err = env.Parser().ParseStrictDDL(canonicalDiff) assert.NoError(t, err) } - if ts.annotated != nil { - // Optional test for assorted scenarios. - _, _, unified := d.Annotated() - unifiedExport := unified.Export() - assert.Equal(t, ts.annotated, strings.Split(unifiedExport, "\n")) + if ts.annotated == nil { + ts.annotated = []string{} } + _, _, unified := d.Annotated() + unifiedExport := unified.Export() + assert.Equal(t, ts.annotated, strings.Split(unifiedExport, "\n")) + // let's also check dq, and also validate that dq's statement is identical to d's assert.NoError(t, dqerr) require.NotNil(t, dq) @@ -606,6 +705,9 @@ func TestDiffSchemas(t *testing.T) { cdiffs: []string{ "ALTER TABLE `t` MODIFY COLUMN `v` varchar(20)", }, + annotated: []string{ + " CREATE TABLE `t` (\n \t`id` int,\n-\t`v` varchar(10),\n+\t`v` varchar(20),\n \tPRIMARY KEY (`id`)\n )", + }, }, { name: "change of table column tinyint 1 to longer", @@ -617,6 +719,9 @@ func TestDiffSchemas(t *testing.T) { cdiffs: []string{ "ALTER TABLE `t` MODIFY COLUMN `i` tinyint", }, + annotated: []string{ + " CREATE TABLE `t` (\n \t`id` int,\n-\t`i` tinyint(1),\n+\t`i` tinyint,\n \tPRIMARY KEY (`id`)\n )", + }, }, { name: "change of table column tinyint 2 to 1", @@ -628,6 +733,9 @@ func TestDiffSchemas(t *testing.T) { cdiffs: []string{ "ALTER TABLE `t` MODIFY COLUMN `i` tinyint(1)", }, + annotated: []string{ + " CREATE TABLE `t` (\n \t`id` int,\n-\t`i` tinyint,\n+\t`i` tinyint(1),\n \tPRIMARY KEY (`id`)\n )", + }, }, { name: "change of table columns, added", @@ -639,6 +747,9 @@ func TestDiffSchemas(t *testing.T) { cdiffs: []string{ "ALTER TABLE `t` ADD COLUMN `i` int", }, + annotated: []string{ + " CREATE TABLE `t` (\n \t`id` int,\n+\t`i` int,\n \tPRIMARY KEY (`id`)\n )", + }, }, { name: "change with function", @@ -650,6 +761,9 @@ func TestDiffSchemas(t *testing.T) { cdiffs: []string{ "ALTER TABLE `identifiers` ADD COLUMN `company_id` mediumint unsigned NOT NULL FIRST", }, + annotated: []string{ + " CREATE TABLE `identifiers` (\n+\t`company_id` mediumint unsigned NOT NULL,\n \t`id` binary(16) NOT NULL DEFAULT (uuid_to_bin(uuid(), true))\n )", + }, }, { name: "change within functional index", @@ -661,6 +775,9 @@ func TestDiffSchemas(t *testing.T) { cdiffs: []string{ "ALTER TABLE `t1` DROP KEY `deleted_check`, ADD UNIQUE KEY `deleted_check` (`id`, (if(`deleted_at` IS NOT NULL, 0, NULL)))", }, + annotated: []string{ + " CREATE TABLE `t1` (\n \t`id` mediumint unsigned NOT NULL,\n \t`deleted_at` timestamp NULL,\n \tPRIMARY KEY (`id`),\n-\tUNIQUE KEY `deleted_check` (`id`, (if(`deleted_at` IS NULL, 0, NULL)))\n+\tUNIQUE KEY `deleted_check` (`id`, (if(`deleted_at` IS NOT NULL, 0, NULL)))\n )", + }, }, { name: "change for a check", @@ -672,6 +789,9 @@ func TestDiffSchemas(t *testing.T) { cdiffs: []string{ "ALTER TABLE `t` DROP CHECK `Check1`, ADD CONSTRAINT `RenamedCheck1` CHECK (`test` >= 0)", }, + annotated: []string{ + " CREATE TABLE `t` (\n \t`id` int NOT NULL,\n \t`test` int NOT NULL DEFAULT '0',\n \tPRIMARY KEY (`id`),\n-\tCONSTRAINT `Check1` CHECK (`test` >= 0)\n+\tCONSTRAINT `RenamedCheck1` CHECK (`test` >= 0)\n )", + }, }, { name: "not enforce a check", @@ -683,6 +803,9 @@ func TestDiffSchemas(t *testing.T) { cdiffs: []string{ "ALTER TABLE `t` ALTER CHECK `Check1` NOT ENFORCED", }, + annotated: []string{ + " CREATE TABLE `t` (\n \t`id` int NOT NULL,\n \t`test` int NOT NULL DEFAULT '0',\n \tPRIMARY KEY (`id`),\n-\tCONSTRAINT `Check1` CHECK (`test` >= 0)\n+\tCONSTRAINT `Check1` CHECK (`test` >= 0) NOT ENFORCED\n )", + }, }, { name: "enforce a check", @@ -694,6 +817,9 @@ func TestDiffSchemas(t *testing.T) { cdiffs: []string{ "ALTER TABLE `t` ALTER CHECK `Check1` ENFORCED", }, + annotated: []string{ + " CREATE TABLE `t` (\n \t`id` int NOT NULL,\n \t`test` int NOT NULL DEFAULT '0',\n \tPRIMARY KEY (`id`),\n-\tCONSTRAINT `Check1` CHECK (`test` >= 0) NOT ENFORCED\n+\tCONSTRAINT `Check1` CHECK (`test` >= 0)\n )", + }, }, { name: "change of table columns, removed", @@ -705,6 +831,9 @@ func TestDiffSchemas(t *testing.T) { cdiffs: []string{ "ALTER TABLE `t` DROP COLUMN `i`", }, + annotated: []string{ + " CREATE TABLE `t` (\n \t`id` int,\n-\t`i` int,\n \tPRIMARY KEY (`id`)\n )", + }, }, { name: "create table", @@ -715,6 +844,9 @@ func TestDiffSchemas(t *testing.T) { cdiffs: []string{ "CREATE TABLE `t` (\n\t`id` int,\n\tPRIMARY KEY (`id`)\n)", }, + annotated: []string{ + "+CREATE TABLE `t` (\n+\t`id` int,\n+\tPRIMARY KEY (`id`)\n+)", + }, }, { name: "create table 2", @@ -775,6 +907,10 @@ func TestDiffSchemas(t *testing.T) { "DROP TABLE `t2`", "CREATE TABLE `t3` (\n\t`id` int unsigned,\n\tPRIMARY KEY (`id`)\n)", }, + annotated: []string{ + "-CREATE TABLE `t2` (\n-\t`id` int unsigned,\n-\tPRIMARY KEY (`id`)\n-)", + "+CREATE TABLE `t3` (\n+\t`id` int unsigned,\n+\tPRIMARY KEY (`id`)\n+)", + }, }, { name: "identical tables: heuristic rename", @@ -811,6 +947,14 @@ func TestDiffSchemas(t *testing.T) { "CREATE TABLE `t2b` (\n\t`id` int unsigned,\n\tPRIMARY KEY (`id`)\n)", "CREATE TABLE `t3b` (\n\t`id` int,\n\tPRIMARY KEY (`id`)\n)", }, + annotated: []string{ + "-CREATE TABLE `t3a` (\n-\t`id` smallint,\n-\tPRIMARY KEY (`id`)\n-)", + "-CREATE TABLE `t2a` (\n-\t`id` int unsigned,\n-\tPRIMARY KEY (`id`)\n-)", + "-CREATE TABLE `t1a` (\n-\t`id` int,\n-\tPRIMARY KEY (`id`)\n-)", + "+CREATE TABLE `t1b` (\n+\t`id` bigint,\n+\tPRIMARY KEY (`id`)\n+)", + "+CREATE TABLE `t2b` (\n+\t`id` int unsigned,\n+\tPRIMARY KEY (`id`)\n+)", + "+CREATE TABLE `t3b` (\n+\t`id` int,\n+\tPRIMARY KEY (`id`)\n+)", + }, }, { name: "identical tables: multiple heuristic rename", @@ -829,6 +973,12 @@ func TestDiffSchemas(t *testing.T) { "RENAME TABLE `t1a` TO `t3b`", }, tableRename: TableRenameHeuristicStatement, + annotated: []string{ + "-CREATE TABLE `t3a` (\n-\t`id` smallint,\n-\tPRIMARY KEY (`id`)\n-)", + "+CREATE TABLE `t1b` (\n+\t`id` bigint,\n+\tPRIMARY KEY (`id`)\n+)", + "-CREATE TABLE `t2a` (\n-\t`id` int unsigned,\n-\tPRIMARY KEY (`id`)\n-)\n+CREATE TABLE `t2b` (\n+\t`id` int unsigned,\n+\tPRIMARY KEY (`id`)\n+)", + "-CREATE TABLE `t1a` (\n-\t`id` int,\n-\tPRIMARY KEY (`id`)\n-)\n+CREATE TABLE `t3b` (\n+\t`id` int,\n+\tPRIMARY KEY (`id`)\n+)", + }, }, { name: "tables with irregular names", @@ -842,6 +992,10 @@ func TestDiffSchemas(t *testing.T) { "ALTER TABLE `t.2` MODIFY COLUMN `id` bigint", "ALTER TABLE `t3` MODIFY COLUMN `i.d` int unsigned", }, + annotated: []string{ + " CREATE TABLE `t.2` (\n-\t`id` int,\n+\t`id` bigint,\n \tPRIMARY KEY (`id`)\n )", + " CREATE TABLE `t3` (\n-\t`i.d` int,\n+\t`i.d` int unsigned,\n \tPRIMARY KEY (`i.d`)\n )", + }, }, // Foreign keys { @@ -857,6 +1011,11 @@ func TestDiffSchemas(t *testing.T) { "CREATE TABLE `t4` (\n\t`id` int,\n\t`i` int,\n\tPRIMARY KEY (`id`),\n\tKEY `f4` (`i`),\n\tCONSTRAINT `f4` FOREIGN KEY (`i`) REFERENCES `t7` (`id`)\n)", "CREATE TABLE `t5` (\n\t`id` int,\n\t`i` int,\n\tPRIMARY KEY (`id`),\n\tKEY `f5` (`i`),\n\tCONSTRAINT `f5` FOREIGN KEY (`i`) REFERENCES `t7` (`id`)\n)", }, + annotated: []string{ + "+CREATE TABLE `t7` (\n+\t`id` int,\n+\tPRIMARY KEY (`id`)\n+)", + "+CREATE TABLE `t4` (\n+\t`id` int,\n+\t`i` int,\n+\tPRIMARY KEY (`id`),\n+\tKEY `f4` (`i`),\n+\tCONSTRAINT `f4` FOREIGN KEY (`i`) REFERENCES `t7` (`id`)\n+)", + "+CREATE TABLE `t5` (\n+\t`id` int,\n+\t`i` int,\n+\tPRIMARY KEY (`id`),\n+\tKEY `f5` (`i`),\n+\tCONSTRAINT `f5` FOREIGN KEY (`i`) REFERENCES `t7` (`id`)\n+)", + }, }, { name: "create tables with foreign keys, with invalid fk reference", @@ -896,6 +1055,10 @@ func TestDiffSchemas(t *testing.T) { "CREATE TABLE `t12` (\n\t`id` int,\n\t`i` int,\n\tPRIMARY KEY (`id`),\n\tKEY `f1201c` (`i`),\n\tCONSTRAINT `f1201c` FOREIGN KEY (`i`) REFERENCES `t11` (`id`) ON DELETE SET NULL\n)", }, fkStrategy: ForeignKeyCheckStrategyIgnore, + annotated: []string{ + "+CREATE TABLE `t11` (\n+\t`id` int,\n+\t`i` int,\n+\tPRIMARY KEY (`id`),\n+\tKEY `f1101c` (`i`),\n+\tCONSTRAINT `f1101c` FOREIGN KEY (`i`) REFERENCES `t12` (`id`) ON DELETE RESTRICT\n+)", + "+CREATE TABLE `t12` (\n+\t`id` int,\n+\t`i` int,\n+\tPRIMARY KEY (`id`),\n+\tKEY `f1201c` (`i`),\n+\tCONSTRAINT `f1201c` FOREIGN KEY (`i`) REFERENCES `t11` (`id`) ON DELETE SET NULL\n+)", + }, }, { name: "drop tables with foreign keys, expect specific order", @@ -910,6 +1073,11 @@ func TestDiffSchemas(t *testing.T) { "DROP TABLE `t4`", "DROP TABLE `t7`", }, + annotated: []string{ + "-CREATE TABLE `t5` (\n-\t`id` int,\n-\t`i` int,\n-\tPRIMARY KEY (`id`),\n-\tKEY `f5` (`i`),\n-\tCONSTRAINT `f5` FOREIGN KEY (`i`) REFERENCES `t7` (`id`)\n-)", + "-CREATE TABLE `t4` (\n-\t`id` int,\n-\t`i` int,\n-\tPRIMARY KEY (`id`),\n-\tKEY `f4` (`i`),\n-\tCONSTRAINT `f4` FOREIGN KEY (`i`) REFERENCES `t7` (`id`)\n-)", + "-CREATE TABLE `t7` (\n-\t`id` int,\n-\tPRIMARY KEY (`id`)\n-)", + }, }, { name: "rename index used by foreign keys", @@ -921,6 +1089,9 @@ func TestDiffSchemas(t *testing.T) { cdiffs: []string{ "ALTER TABLE `t` RENAME INDEX `i_idx` TO `i_alternative`", }, + annotated: []string{ + " CREATE TABLE `t` (\n \t`id` int,\n \t`i` int,\n \tPRIMARY KEY (`id`),\n-\tKEY `i_idx` (`i`),\n+\tKEY `i_alternative` (`i`),\n \tCONSTRAINT `f` FOREIGN KEY (`i`) REFERENCES `parent` (`id`)\n )", + }, }, // Views { @@ -938,6 +1109,9 @@ func TestDiffSchemas(t *testing.T) { cdiffs: []string{ "ALTER VIEW `v1` AS SELECT `id` FROM `t`", }, + annotated: []string{ + "-CREATE VIEW `v1` AS SELECT * FROM `t`\n+CREATE VIEW `v1` AS SELECT `id` FROM `t`", + }, }, { name: "drop view", @@ -949,6 +1123,9 @@ func TestDiffSchemas(t *testing.T) { cdiffs: []string{ "DROP VIEW `v1`", }, + annotated: []string{ + "-CREATE VIEW `v1` AS SELECT * FROM `t`", + }, }, { name: "create view", @@ -960,6 +1137,9 @@ func TestDiffSchemas(t *testing.T) { cdiffs: []string{ "CREATE VIEW `v1` AS SELECT `id` FROM `t`", }, + annotated: []string{ + "+CREATE VIEW `v1` AS SELECT `id` FROM `t`", + }, }, { name: "create view: unresolved dependencies", @@ -979,6 +1159,10 @@ func TestDiffSchemas(t *testing.T) { "DROP TABLE `v1`", "CREATE VIEW `v1` AS SELECT * FROM `t`", }, + annotated: []string{ + "-CREATE TABLE `v1` (\n-\t`id` int\n-)", + "+CREATE VIEW `v1` AS SELECT * FROM `t`", + }, }, { name: "convert view to table", @@ -992,6 +1176,10 @@ func TestDiffSchemas(t *testing.T) { "DROP VIEW `v1`", "CREATE TABLE `v1` (\n\t`id` int\n)", }, + annotated: []string{ + "-CREATE VIEW `v1` AS SELECT * FROM `t`", + "+CREATE TABLE `v1` (\n+\t`id` int\n+)", + }, }, { name: "unsupported statement", @@ -1019,6 +1207,14 @@ func TestDiffSchemas(t *testing.T) { "CREATE VIEW `v0` AS SELECT * FROM `v2`, `t2`", "CREATE TABLE `t4` (\n\t`id` int,\n\tPRIMARY KEY (`id`)\n)", }, + annotated: []string{ + "-CREATE VIEW `v1` AS SELECT * FROM `t1`", + "-CREATE TABLE `t1` (\n-\t`id` int,\n-\tPRIMARY KEY (`id`)\n-)", + " CREATE TABLE `t2` (\n-\t`id` int,\n+\t`id` bigint,\n \tPRIMARY KEY (`id`)\n )", + "-CREATE VIEW `v2` AS SELECT * FROM `t2`\n+CREATE VIEW `v2` AS SELECT `id` FROM `t2`", + "+CREATE VIEW `v0` AS SELECT * FROM `v2`, `t2`", + "+CREATE TABLE `t4` (\n+\t`id` int,\n+\tPRIMARY KEY (`id`)\n+)", + }, }, { // Making sure schemadiff distinguishes between VIEWs with different casing @@ -1035,6 +1231,11 @@ func TestDiffSchemas(t *testing.T) { "DROP VIEW `V1`", "DROP TABLE `t`", }, + annotated: []string{ + "-CREATE VIEW `v1` AS SELECT * FROM `t`", + "-CREATE VIEW `V1` AS SELECT * FROM `t`", + "-CREATE TABLE `t` (\n-\t`id` int,\n-\tPRIMARY KEY (`id`)\n-)", + }, }, } env := NewTestEnv() @@ -1093,14 +1294,13 @@ func TestDiffSchemas(t *testing.T) { assert.Equal(t, dTo.Name(), clonedTo.Name()) } } - - if ts.annotated != nil { - // Optional test for assorted scenarios. - if assert.Equalf(t, len(diffs), len(ts.annotated), "%+v", cstatements) { - for i, d := range diffs { - _, _, unified := d.Annotated() - assert.Equal(t, ts.annotated[i], unified.Export()) - } + if ts.annotated == nil { + ts.annotated = []string{} + } + if assert.Equalf(t, len(diffs), len(ts.annotated), "%+v", cstatements) { + for i, d := range diffs { + _, _, unified := d.Annotated() + assert.Equal(t, ts.annotated[i], unified.Export()) } } diff --git a/go/vt/schemadiff/table.go b/go/vt/schemadiff/table.go index e9bb35cb3bd..88f8e7d4ce8 100644 --- a/go/vt/schemadiff/table.go +++ b/go/vt/schemadiff/table.go @@ -1689,6 +1689,7 @@ func (c *CreateTableEntity) diffKeys(alterTable *sqlparser.AlterTable, NewName: t2Key.Info.Name, } alterTable.AlterOptions = append(alterTable.AlterOptions, renameIndex) + annotations.MarkAdded(sqlparser.CanonicalString(t2Key)) convertedToRename = true } } diff --git a/go/vt/schemadiff/table_test.go b/go/vt/schemadiff/table_test.go index c1d8d8c241e..9446dc9462b 100644 --- a/go/vt/schemadiff/table_test.go +++ b/go/vt/schemadiff/table_test.go @@ -829,6 +829,10 @@ func TestCreateTableDiff(t *testing.T) { to: "create table t2 (`id` int primary key, i int, key i2_alternative (`i`, id), key i_idx ( i ) )", diff: "alter table t1 rename index i2_idx to i2_alternative", cdiff: "ALTER TABLE `t1` RENAME INDEX `i2_idx` TO `i2_alternative`", + textdiffs: []string{ + "- KEY `i2_idx` (`i`, `id`)", + "+ KEY `i2_alternative` (`i`, `id`)", + }, }, { name: "reordered and renamed keys", @@ -836,6 +840,12 @@ func TestCreateTableDiff(t *testing.T) { to: "create table t2 (`id` int primary key, i int, key i2_alternative (`i`, id), key i_alternative ( i ) )", diff: "alter table t1 rename index i2_idx to i2_alternative, rename index i_idx to i_alternative", cdiff: "ALTER TABLE `t1` RENAME INDEX `i2_idx` TO `i2_alternative`, RENAME INDEX `i_idx` TO `i_alternative`", + textdiffs: []string{ + "- KEY `i_idx` (`i`)", + "- KEY `i2_idx` (`i`, `id`)", + "+ KEY `i_alternative` (`i`)", + "+ KEY `i2_alternative` (`i`, `id`)", + }, }, { name: "multiple similar keys, one rename", @@ -843,6 +853,10 @@ func TestCreateTableDiff(t *testing.T) { to: "create table t2 (`id` int primary key, i int, key i_idx(i), key i2_alternative(i))", diff: "alter table t1 rename index i2_idx to i2_alternative", cdiff: "ALTER TABLE `t1` RENAME INDEX `i2_idx` TO `i2_alternative`", + textdiffs: []string{ + "- KEY `i2_idx` (`i`)", + "+ KEY `i2_alternative` (`i`)", + }, }, { name: "multiple similar keys, two renames", @@ -850,6 +864,12 @@ func TestCreateTableDiff(t *testing.T) { to: "create table t2 (`id` int primary key, i int, key i_alternative(i), key i2_alternative(i))", diff: "alter table t1 rename index i_idx to i_alternative, rename index i2_idx to i2_alternative", cdiff: "ALTER TABLE `t1` RENAME INDEX `i_idx` TO `i_alternative`, RENAME INDEX `i2_idx` TO `i2_alternative`", + textdiffs: []string{ + "- KEY `i_idx` (`i`)", + "- KEY `i2_idx` (`i`)", + "+ KEY `i_alternative` (`i`)", + "+ KEY `i2_alternative` (`i`)", + }, }, { name: "multiple similar keys, two renames, reorder", @@ -857,6 +877,12 @@ func TestCreateTableDiff(t *testing.T) { to: "create table t2 (`id` int primary key, i int, key i_alternative(i), key i2_alternative(i), key i0 (i, id))", diff: "alter table t1 rename index i_idx to i_alternative, rename index i2_idx to i2_alternative", cdiff: "ALTER TABLE `t1` RENAME INDEX `i_idx` TO `i_alternative`, RENAME INDEX `i2_idx` TO `i2_alternative`", + textdiffs: []string{ + "- KEY `i_idx` (`i`)", + "- KEY `i2_idx` (`i`)", + "+ KEY `i_alternative` (`i`)", + "+ KEY `i2_alternative` (`i`)", + }, }, { name: "key made visible", @@ -1866,6 +1892,9 @@ func TestCreateTableDiff(t *testing.T) { to: "create table t1 (id int primary key) ", diff: "alter table t1 row_format DEFAULT", cdiff: "ALTER TABLE `t1` ROW_FORMAT DEFAULT", + textdiffs: []string{ + "-) ROW_FORMAT COMPRESSED", + }, }, { name: "remove table option 2", @@ -1873,6 +1902,9 @@ func TestCreateTableDiff(t *testing.T) { to: "create table t1 (id int primary key) ", diff: "alter table t1 checksum 0", cdiff: "ALTER TABLE `t1` CHECKSUM 0", + textdiffs: []string{ + "-) CHECKSUM 1", + }, }, { name: "remove table option 3", @@ -1880,6 +1912,9 @@ func TestCreateTableDiff(t *testing.T) { to: "create table t1 (id int primary key) ", diff: "alter table t1 checksum 0", cdiff: "ALTER TABLE `t1` CHECKSUM 0", + textdiffs: []string{ + "-) CHECKSUM 1", + }, }, { name: "remove table option 4", @@ -1887,6 +1922,10 @@ func TestCreateTableDiff(t *testing.T) { to: "create table t2 (id int auto_increment primary key)", diff: "alter table t1 key_block_size 0 compression ''", cdiff: "ALTER TABLE `t1` KEY_BLOCK_SIZE 0 COMPRESSION ''", + textdiffs: []string{ + "-) KEY_BLOCK_SIZE 16", + "- COMPRESSION 'zlib'", + }, }, { name: "add, modify and remove table option", @@ -1894,6 +1933,12 @@ func TestCreateTableDiff(t *testing.T) { to: "create table t1 (id int primary key) row_format=compressed, engine=innodb, charset=utf8mb4", diff: "alter table t1 checksum 0 charset utf8mb4 row_format COMPRESSED", cdiff: "ALTER TABLE `t1` CHECKSUM 0 CHARSET utf8mb4 ROW_FORMAT COMPRESSED", + textdiffs: []string{ + "+) ROW_FORMAT COMPRESSED", + "- CHARSET utf8mb3,", + "- CHECKSUM 1", + "+ CHARSET utf8mb4", + }, }, { name: "ignore AUTO_INCREMENT addition", @@ -1907,6 +1952,9 @@ func TestCreateTableDiff(t *testing.T) { autoinc: AutoIncrementApplyHigher, diff: "alter table t1 auto_increment 300", cdiff: "ALTER TABLE `t1` AUTO_INCREMENT 300", + textdiffs: []string{ + "+) AUTO_INCREMENT 300", + }, }, { name: "ignore AUTO_INCREMENT removal", @@ -1931,6 +1979,10 @@ func TestCreateTableDiff(t *testing.T) { autoinc: AutoIncrementApplyHigher, diff: "alter table t1 auto_increment 300", cdiff: "ALTER TABLE `t1` AUTO_INCREMENT 300", + textdiffs: []string{ + "-) AUTO_INCREMENT 100", + "+) AUTO_INCREMENT 300", + }, }, { name: "ignore AUTO_INCREMENT decrease", @@ -1945,6 +1997,10 @@ func TestCreateTableDiff(t *testing.T) { autoinc: AutoIncrementApplyAlways, diff: "alter table t1 auto_increment 100", cdiff: "ALTER TABLE `t1` AUTO_INCREMENT 100", + textdiffs: []string{ + "-) AUTO_INCREMENT 300", + "+) AUTO_INCREMENT 100", + }, }, { name: "apply table charset", @@ -1952,6 +2008,9 @@ func TestCreateTableDiff(t *testing.T) { to: "create table t (id int, primary key(id)) DEFAULT CHARSET = utf8mb4", diff: "alter table t charset utf8mb4", cdiff: "ALTER TABLE `t` CHARSET utf8mb4", + textdiffs: []string{ + "+) CHARSET utf8mb4", + }, }, { name: "ignore empty table charset", @@ -1978,6 +2037,10 @@ func TestCreateTableDiff(t *testing.T) { charset: TableCharsetCollateIgnoreEmpty, diff: "alter table t collate utf8mb4_0900_ai_ci", cdiff: "ALTER TABLE `t` COLLATE utf8mb4_0900_ai_ci", + textdiffs: []string{ + "-) COLLATE utf8mb4_0900_bin", + "+) COLLATE utf8mb4_0900_ai_ci", + }, }, { name: "ignore empty table charset and collate in target", @@ -2003,6 +2066,10 @@ func TestCreateTableDiff(t *testing.T) { to: "create table t (id int, primary key(id)) DEFAULT CHARSET = utf8mb4", diff: "alter table t charset utf8mb4", cdiff: "ALTER TABLE `t` CHARSET utf8mb4", + textdiffs: []string{ + "-) CHARSET utf8", + "+) CHARSET utf8mb4", + }, }, { name: `change table charset and columns`, @@ -2010,6 +2077,16 @@ func TestCreateTableDiff(t *testing.T) { to: "create table t (id int primary key, t1 varchar(128) not null, t2 varchar(128) not null, t3 tinytext, t4 tinytext charset latin1) default charset=utf8mb4", diff: "alter table t modify column t1 varchar(128) not null, modify column t2 varchar(128) not null, modify column t3 tinytext, charset utf8mb4", cdiff: "ALTER TABLE `t` MODIFY COLUMN `t1` varchar(128) NOT NULL, MODIFY COLUMN `t2` varchar(128) NOT NULL, MODIFY COLUMN `t3` tinytext, CHARSET utf8mb4", + textdiffs: []string{ + "- `t1` varchar(128),", + "- `t2` varchar(128) NOT NULL,", + "- `t3` tinytext CHARACTER SET latin1,", + "+ `t1` varchar(128) NOT NULL", + "+ `t2` varchar(128) NOT NULL", + "+ `t3` tinytext", + "-) CHARSET utf8", + "+) CHARSET utf8mb4", + }, }, { name: "change table collation", @@ -2017,6 +2094,10 @@ func TestCreateTableDiff(t *testing.T) { to: "create table t (id int, primary key(id)) DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_0900_bin", diff: "alter table t collate utf8mb4_0900_bin", cdiff: "ALTER TABLE `t` COLLATE utf8mb4_0900_bin", + textdiffs: []string{ + "- COLLATE utf8mb4_0900_ai_ci", + "+ COLLATE utf8mb4_0900_bin", + }, }, { name: "change table collation with textual column", @@ -2024,6 +2105,12 @@ func TestCreateTableDiff(t *testing.T) { to: "create table t (id int, t varchar(192) not null) DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_0900_bin", diff: "alter table t modify column t varchar(192) not null, collate utf8mb4_0900_bin", cdiff: "ALTER TABLE `t` MODIFY COLUMN `t` varchar(192) NOT NULL, COLLATE utf8mb4_0900_bin", + textdiffs: []string{ + "- `t` varchar(192) NOT NULL", + "+ `t` varchar(192) NOT NULL", + "- COLLATE utf8mb4_0900_ai_ci", + "+ COLLATE utf8mb4_0900_bin", + }, }, { name: "change table collation with textual column that has collation", @@ -2031,6 +2118,10 @@ func TestCreateTableDiff(t *testing.T) { to: "create table t (id int, t varchar(192) not null collate utf8mb4_0900_bin) DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_0900_bin", diff: "alter table t collate utf8mb4_0900_bin", cdiff: "ALTER TABLE `t` COLLATE utf8mb4_0900_bin", + textdiffs: []string{ + "- COLLATE utf8mb4_0900_ai_ci", + "+ COLLATE utf8mb4_0900_bin", + }, }, { name: "ignore identical implicit charset", @@ -2073,6 +2164,10 @@ func TestCreateTableDiff(t *testing.T) { to: "create table t1 (id int unsigned primary key)", diff: "alter table t1 modify column id int unsigned", cdiff: "ALTER TABLE `t1` MODIFY COLUMN `id` int unsigned", + textdiffs: []string{ + "- `id` int,", + "+ `id` int unsigned,", + }, }, { name: "normalized ENGINE InnoDB value", @@ -2111,6 +2206,9 @@ func TestCreateTableDiff(t *testing.T) { to: "create table t1 (id int primary key) engine=memory, character set=utf8", diff: "alter table t1 engine MEMORY", cdiff: "ALTER TABLE `t1` ENGINE MEMORY", + textdiffs: []string{ + "+) ENGINE MEMORY", + }, }, { name: "normalized CHARSET value", @@ -2118,6 +2216,9 @@ func TestCreateTableDiff(t *testing.T) { to: "create table t1 (id int primary key) engine=innodb, character set=UTF8MB4", diff: "alter table t1 charset utf8mb4", cdiff: "ALTER TABLE `t1` CHARSET utf8mb4", + textdiffs: []string{ + "+ CHARSET utf8mb4", + }, }, { name: "normalized CHARSET utf8 value", @@ -2125,6 +2226,9 @@ func TestCreateTableDiff(t *testing.T) { to: "create table t1 (id int primary key) engine=innodb, character set=UTF8", diff: "alter table t1 charset utf8mb3", cdiff: "ALTER TABLE `t1` CHARSET utf8mb3", + textdiffs: []string{ + "+ CHARSET utf8mb3", + }, }, { name: "normalized COLLATE value", @@ -2132,6 +2236,9 @@ func TestCreateTableDiff(t *testing.T) { to: "create table t1 (id int primary key) engine=innodb, collate=UTF8_BIN", diff: "alter table t1 collate utf8mb3_bin", cdiff: "ALTER TABLE `t1` COLLATE utf8mb3_bin", + textdiffs: []string{ + "+ COLLATE utf8mb3_bin", + }, }, { name: "remove table comment", @@ -2160,6 +2267,9 @@ func TestCreateTableDiff(t *testing.T) { )`, diff: "alter table t4 add key index_on_company_id ((cast(json_unquote(json_extract(properties, _utf8mb4 '$.company_id')) as signed)))", cdiff: "ALTER TABLE `t4` ADD KEY `index_on_company_id` ((CAST(JSON_UNQUOTE(JSON_EXTRACT(`properties`, _utf8mb4 '$.company_id')) AS signed)))", + textdiffs: []string{ + "+ KEY `index_on_company_id` ((CAST(JSON_UNQUOTE(JSON_EXTRACT(`properties`, _utf8mb4 '$.company_id')) AS signed)))", + }, }, { // validates that CanonicalString prints 'interval 30 minute' and not ' INTERVAL 30 MINUTE', as MySQL's `SHOW CREATE TABLE` outputs lower case 'interval 30 minute' @@ -2175,6 +2285,9 @@ func TestCreateTableDiff(t *testing.T) { )`, diff: "alter table t4 add column created_at datetime(6) not null default (now() + interval 30 minute)", cdiff: "ALTER TABLE `t4` ADD COLUMN `created_at` datetime(6) NOT NULL DEFAULT (now() + INTERVAL 30 minute)", + textdiffs: []string{ + "+ `created_at` datetime(6) NOT NULL DEFAULT (now() + INTERVAL 30 minute)", + }, }, // algorithm { @@ -2184,6 +2297,9 @@ func TestCreateTableDiff(t *testing.T) { diff: "alter table t1 add column i int not null default 0, algorithm = COPY", cdiff: "ALTER TABLE `t1` ADD COLUMN `i` int NOT NULL DEFAULT 0, ALGORITHM = COPY", algorithm: AlterTableAlgorithmStrategyCopy, + textdiffs: []string{ + "+ `i` int NOT NULL DEFAULT 0", + }, }, { name: "algorithm: INPLACE", @@ -2192,6 +2308,9 @@ func TestCreateTableDiff(t *testing.T) { diff: "alter table t1 add column i int not null default 0, algorithm = INPLACE", cdiff: "ALTER TABLE `t1` ADD COLUMN `i` int NOT NULL DEFAULT 0, ALGORITHM = INPLACE", algorithm: AlterTableAlgorithmStrategyInplace, + textdiffs: []string{ + "+ `i` int NOT NULL DEFAULT 0", + }, }, { name: "algorithm: INSTANT", @@ -2200,6 +2319,9 @@ func TestCreateTableDiff(t *testing.T) { diff: "alter table t1 add column i int not null default 0, algorithm = INSTANT", cdiff: "ALTER TABLE `t1` ADD COLUMN `i` int NOT NULL DEFAULT 0, ALGORITHM = INSTANT", algorithm: AlterTableAlgorithmStrategyInstant, + textdiffs: []string{ + "+ `i` int NOT NULL DEFAULT 0", + }, }, } standardHints := DiffHints{} @@ -2362,18 +2484,16 @@ func TestCreateTableDiff(t *testing.T) { assert.NotEqual(t, eToStatementString, annotatedToString) } } - if len(ts.textdiffs) > 0 { // Still incomplete. - // For this test, we should validate the given diffs - uniqueDiffs := make(map[string]bool) - for _, textdiff := range ts.textdiffs { - uniqueDiffs[textdiff] = true - } - require.Equal(t, len(uniqueDiffs), len(ts.textdiffs)) // integrity of test - for _, textdiff := range ts.textdiffs { - assert.Containsf(t, annotatedUnifiedString, textdiff, annotatedUnifiedString) - } - assert.Equalf(t, len(annotatedUnified.Removed())+len(annotatedUnified.Added()), len(ts.textdiffs), annotatedUnifiedString) + require.NotEmpty(t, ts.textdiffs) + uniqueDiffs := make(map[string]bool) + for _, textdiff := range ts.textdiffs { + uniqueDiffs[textdiff] = true + } + require.Equal(t, len(uniqueDiffs), len(ts.textdiffs)) // integrity of test + for _, textdiff := range ts.textdiffs { + assert.Containsf(t, annotatedUnifiedString, textdiff, "unified: %s\nfrom: %s\nto: %s\nstmt: %s", annotatedUnifiedString, annotatedFromString, annotatedToString, alterEntityDiff.CanonicalStatementString()) } + assert.Equalf(t, len(annotatedUnified.Removed())+len(annotatedUnified.Added()), len(ts.textdiffs), annotatedUnifiedString) } } { From b50894f4a526bc8756de9b096123b20ff55b0f8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Taylor?= Date: Thu, 6 Feb 2025 10:33:21 +0100 Subject: [PATCH 7/8] Faster dependency copying (#17708) Signed-off-by: Andres Taylor --- go/vt/vtgate/semantics/semantic_table.go | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/go/vt/vtgate/semantics/semantic_table.go b/go/vt/vtgate/semantics/semantic_table.go index 6a88046e2a2..efe574501c1 100644 --- a/go/vt/vtgate/semantics/semantic_table.go +++ b/go/vt/vtgate/semantics/semantic_table.go @@ -190,13 +190,15 @@ var ErrNotSingleTable = vterrors.VT13001("should only be used for single tables" // CopyDependencies copies the dependencies from one expression into the other func (st *SemTable) CopyDependencies(from, to sqlparser.Expr) { - if ValidAsMapKey(to) { - st.Recursive[to] = st.RecursiveDeps(from) - st.Direct[to] = st.DirectDeps(from) - if ValidAsMapKey(from) { - if typ, found := st.ExprTypes[from]; found { - st.ExprTypes[to] = typ - } + if ValidAsMapKey(to) && ValidAsMapKey(from) { + if ts, ok := st.Recursive[from]; ok { + st.Recursive[to] = ts + } + if ts, ok := st.Direct[from]; ok { + st.Direct[to] = ts + } + if typ, found := st.ExprTypes[from]; found { + st.ExprTypes[to] = typ } } } From 1c56ca1435ce0da01b065cc606d8d2ab98291217 Mon Sep 17 00:00:00 2001 From: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> Date: Thu, 6 Feb 2025 12:28:20 +0200 Subject: [PATCH 8/8] Multi-metrics throttler: post v21 deprecations and changes (#16915) Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> --- go/cmd/vtctldclient/command/throttler.go | 4 - .../onlineddl/revert/onlineddl_revert_test.go | 4 +- .../throttler_topo/throttler_test.go | 37 +-- go/test/endtoend/throttler/util.go | 16 +- go/test/endtoend/vreplication/helper_test.go | 25 +- .../tabletmanagerdata/tabletmanagerdata.pb.go | 252 ++++++++---------- .../tabletmanagerdata_vtproto.pb.go | 118 -------- go/vt/vtctl/grpcvtctldserver/server.go | 10 - go/vt/vtctl/vtctl.go | 21 +- go/vt/vttablet/grpctmclient/client_test.go | 4 +- go/vt/vttablet/tabletmanager/rpc_throttler.go | 11 +- go/vt/vttablet/tabletserver/tabletserver.go | 19 +- .../tabletserver/throttle/base/recent_app.go | 4 +- go/vt/vttablet/tabletserver/throttle/check.go | 27 +- .../tabletserver/throttle/check_result.go | 49 +--- .../throttle/check_result_test.go | 76 ------ .../vttablet/tabletserver/throttle/client.go | 3 +- .../tabletserver/throttle/throttler.go | 15 +- .../tabletserver/throttle/throttler_test.go | 175 +----------- proto/tabletmanagerdata.proto | 14 +- web/vtadmin/src/proto/vtadmin.d.ts | 24 -- web/vtadmin/src/proto/vtadmin.js | 92 ------- 22 files changed, 196 insertions(+), 804 deletions(-) diff --git a/go/cmd/vtctldclient/command/throttler.go b/go/cmd/vtctldclient/command/throttler.go index da8b0763b0d..200d5f87f0b 100644 --- a/go/cmd/vtctldclient/command/throttler.go +++ b/go/cmd/vtctldclient/command/throttler.go @@ -169,10 +169,6 @@ func init() { UpdateThrottlerConfig.Flags().StringVar(&updateThrottlerConfigOptions.MetricName, "metric-name", "", "name of the metric for which we apply a new threshold (requires --threshold). If empty, the default (either 'lag' or 'custom') metric is used.") UpdateThrottlerConfig.Flags().Float64Var(&updateThrottlerConfigOptions.Threshold, "threshold", 0, "threshold for the either default check (replication lag seconds) or custom check") UpdateThrottlerConfig.Flags().StringVar(&updateThrottlerConfigOptions.CustomQuery, "custom-query", "", "custom throttler check query") - UpdateThrottlerConfig.Flags().BoolVar(&updateThrottlerConfigOptions.CheckAsCheckSelf, "check-as-check-self", false, "/throttler/check requests behave as is /throttler/check-self was called") - UpdateThrottlerConfig.Flags().BoolVar(&updateThrottlerConfigOptions.CheckAsCheckShard, "check-as-check-shard", false, "use standard behavior for /throttler/check requests") - UpdateThrottlerConfig.Flags().MarkDeprecated("check-as-check-self", "specify metric with scope in --app-metrics to apply to all checks, or use --scope in CheckThrottler for a specific check") - UpdateThrottlerConfig.Flags().MarkDeprecated("check-as-check-shard", "specify metric with scope in --app-metrics to apply to all checks, or use --scope in CheckThrottler for a specific check") UpdateThrottlerConfig.Flags().StringVar(&unthrottledAppRule.Name, "unthrottle-app", "", "an app name to unthrottle") UpdateThrottlerConfig.Flags().StringVar(&throttledAppRule.Name, "throttle-app", "", "an app name to throttle") diff --git a/go/test/endtoend/onlineddl/revert/onlineddl_revert_test.go b/go/test/endtoend/onlineddl/revert/onlineddl_revert_test.go index e052762cd13..41acd0dea4e 100644 --- a/go/test/endtoend/onlineddl/revert/onlineddl_revert_test.go +++ b/go/test/endtoend/onlineddl/revert/onlineddl_revert_test.go @@ -21,7 +21,6 @@ import ( "flag" "fmt" "math/rand/v2" - "net/http" "os" "path" "strings" @@ -33,6 +32,7 @@ import ( "vitess.io/vitess/go/mysql" "vitess.io/vitess/go/mysql/capabilities" "vitess.io/vitess/go/vt/log" + tabletmanagerdatapb "vitess.io/vitess/go/vt/proto/tabletmanagerdata" "vitess.io/vitess/go/vt/schema" "vitess.io/vitess/go/vt/vttablet/tabletserver/throttle/throttlerapp" @@ -207,7 +207,7 @@ func TestRevertSchemaChanges(t *testing.T) { require.Equal(t, 1, len(shards)) throttler.EnableLagThrottlerAndWaitForStatus(t, clusterInstance) - throttler.WaitForCheckThrottlerResult(t, clusterInstance, primaryTablet, throttlerapp.TestingName, nil, http.StatusOK, time.Minute) + throttler.WaitForCheckThrottlerResult(t, clusterInstance, primaryTablet, throttlerapp.TestingName, nil, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, time.Minute) t.Run("revertible", testRevertible) t.Run("revert", testRevert) diff --git a/go/test/endtoend/tabletmanager/throttler_topo/throttler_test.go b/go/test/endtoend/tabletmanager/throttler_topo/throttler_test.go index 48b341bf449..3b8111121fe 100644 --- a/go/test/endtoend/tabletmanager/throttler_topo/throttler_test.go +++ b/go/test/endtoend/tabletmanager/throttler_topo/throttler_test.go @@ -178,7 +178,6 @@ func vitessThrottleCheck(tablet *cluster.Vttablet, skipRequestHeartbeats bool) ( flags := &throttle.CheckFlags{ Scope: base.ShardScope, SkipRequestHeartbeats: skipRequestHeartbeats, - MultiMetricsEnabled: true, } resp, err := throttler.CheckThrottler(clusterInstance, tablet, throttlerapp.VitessName, flags) return resp, err @@ -188,7 +187,6 @@ func throttleCheck(tablet *cluster.Vttablet, skipRequestHeartbeats bool) (*vtctl flags := &throttle.CheckFlags{ Scope: base.ShardScope, SkipRequestHeartbeats: skipRequestHeartbeats, - MultiMetricsEnabled: true, } resp, err := throttler.CheckThrottler(clusterInstance, tablet, testAppName, flags) return resp, err @@ -196,8 +194,7 @@ func throttleCheck(tablet *cluster.Vttablet, skipRequestHeartbeats bool) (*vtctl func throttleCheckSelf(tablet *cluster.Vttablet) (*vtctldatapb.CheckThrottlerResponse, error) { flags := &throttle.CheckFlags{ - Scope: base.SelfScope, - MultiMetricsEnabled: true, + Scope: base.SelfScope, } resp, err := throttler.CheckThrottler(clusterInstance, tablet, testAppName, flags) return resp, err @@ -220,7 +217,7 @@ func warmUpHeartbeat(t *testing.T) tabletmanagerdatapb.CheckThrottlerResponseCod require.NoError(t, err) time.Sleep(time.Second) - return throttle.ResponseCodeFromStatus(resp.Check.ResponseCode, int(resp.Check.StatusCode)) + return resp.Check.ResponseCode } // waitForThrottleCheckStatus waits for the tablet to return the provided HTTP code in a throttle check @@ -242,7 +239,7 @@ func waitForThrottleCheckStatus(t *testing.T, tablet *cluster.Vttablet, wantCode } select { case <-ctx.Done(): - return resp.Check, false + return resp.Check, assert.EqualValues(t, wantCode, resp.Check.ResponseCode, "response: %+v", resp) case <-ticker.C: } } @@ -376,13 +373,6 @@ func TestInitialThrottler(t *testing.T) { assert.Equal(t, base.ShardScope.String(), metrics.Scope) } - if !assert.EqualValues(t, http.StatusOK, resp.Check.StatusCode, "Unexpected response from throttler: %+v", resp) { - rs, err := replicaTablet.VttabletProcess.QueryTablet("show replica status", keyspaceName, false) - assert.NoError(t, err) - t.Logf("Seconds_Behind_Source: %s", rs.Named().Row()["Seconds_Behind_Source"].ToString()) - t.Logf("throttler primary status: %+v", throttleStatus(t, primaryTablet)) - t.Logf("throttler replica status: %+v", throttleStatus(t, replicaTablet)) - } if !assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, resp.Check.ResponseCode, "Unexpected response from throttler: %+v", resp) { rs, err := replicaTablet.VttabletProcess.QueryTablet("show replica status", keyspaceName, false) assert.NoError(t, err) @@ -401,13 +391,6 @@ func TestInitialThrottler(t *testing.T) { for _, metrics := range resp.Check.Metrics { assert.Equal(t, base.ShardScope.String(), metrics.Scope) } - if !assert.EqualValues(t, http.StatusOK, resp.Check.StatusCode, "Unexpected response from throttler: %+v", resp) { - rs, err := replicaTablet.VttabletProcess.QueryTablet("show replica status", keyspaceName, false) - assert.NoError(t, err) - t.Logf("Seconds_Behind_Source: %s", rs.Named().Row()["Seconds_Behind_Source"].ToString()) - t.Logf("throttler primary status: %+v", throttleStatus(t, primaryTablet)) - t.Logf("throttler replica status: %+v", throttleStatus(t, replicaTablet)) - } if !assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, resp.Check.ResponseCode, "Unexpected response from throttler: %+v", resp) { rs, err := replicaTablet.VttabletProcess.QueryTablet("show replica status", keyspaceName, false) assert.NoError(t, err) @@ -481,13 +464,11 @@ func TestThrottlerAfterMetricsCollected(t *testing.T) { t.Run("validating primary check self", func(t *testing.T) { resp, err := throttleCheckSelf(primaryTablet) require.NoError(t, err) - assert.EqualValues(t, http.StatusOK, resp.Check.StatusCode, "Unexpected response from throttler: %+v", resp) assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, resp.Check.ResponseCode, "Unexpected response from throttler: %+v", resp) }) t.Run("validating replica check self", func(t *testing.T) { resp, err := throttleCheckSelf(replicaTablet) require.NoError(t, err) - assert.EqualValues(t, http.StatusOK, resp.Check.StatusCode, "Unexpected response from throttler: %+v", resp) assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, resp.Check.ResponseCode, "Unexpected response from throttler: %+v", resp) }) } @@ -514,7 +495,6 @@ func TestLag(t *testing.T) { t.Run("expecting throttler push back", func(t *testing.T) { resp, err := throttleCheck(primaryTablet, false) require.NoError(t, err) - assert.EqualValues(t, http.StatusTooManyRequests, resp.Check.StatusCode, "Unexpected response from throttler: %+v", resp) assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_THRESHOLD_EXCEEDED, resp.Check.ResponseCode, "Unexpected response from throttler: %+v", resp) }) t.Run("primary self-check should still be fine", func(t *testing.T) { @@ -525,10 +505,6 @@ func TestLag(t *testing.T) { assert.Equal(t, base.SelfScope.String(), metrics.Scope) } // self (on primary) is unaffected by replication lag - if !assert.EqualValues(t, http.StatusOK, resp.Check.StatusCode, "Unexpected response from throttler: %+v", resp) { - t.Logf("throttler primary status: %+v", throttleStatus(t, primaryTablet)) - t.Logf("throttler replica status: %+v", throttleStatus(t, replicaTablet)) - } if !assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, resp.Check.ResponseCode, "Unexpected response from throttler: %+v", resp) { t.Logf("throttler primary status: %+v", throttleStatus(t, primaryTablet)) t.Logf("throttler replica status: %+v", throttleStatus(t, replicaTablet)) @@ -541,7 +517,6 @@ func TestLag(t *testing.T) { for _, metrics := range resp.Check.Metrics { assert.Equal(t, base.SelfScope.String(), metrics.Scope) } - assert.EqualValues(t, http.StatusTooManyRequests, resp.Check.StatusCode, "Unexpected response from throttler: %+v", resp) assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_THRESHOLD_EXCEEDED, resp.Check.ResponseCode, "Unexpected response from throttler: %+v", resp) }) t.Run("exempting test app", func(t *testing.T) { @@ -619,13 +594,11 @@ func TestLag(t *testing.T) { resp, err := throttleCheckSelf(primaryTablet) require.NoError(t, err) // self (on primary) is unaffected by replication lag - assert.EqualValues(t, http.StatusOK, resp.Check.StatusCode, "Unexpected response from throttler: %+v", resp) assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, resp.Check.ResponseCode, "Unexpected response from throttler: %+v", resp) }) t.Run("replica self-check should be fine", func(t *testing.T) { resp, err := throttleCheckSelf(replicaTablet) require.NoError(t, err) - assert.EqualValues(t, http.StatusOK, resp.Check.StatusCode, "Unexpected response from throttler: %+v", resp) assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, resp.Check.ResponseCode, "Unexpected response from throttler: %+v", resp) }) } @@ -668,7 +641,6 @@ func TestCustomQuery(t *testing.T) { throttler.WaitForValidData(t, primaryTablet, throttlerEnabledTimeout) resp, err := throttleCheck(primaryTablet, false) require.NoError(t, err) - assert.EqualValues(t, http.StatusOK, resp.Check.StatusCode, "Unexpected response from throttler: %+v", resp) assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, resp.Check.ResponseCode, "Unexpected response from throttler: %+v", resp) }) t.Run("test threads running", func(t *testing.T) { @@ -695,7 +667,6 @@ func TestCustomQuery(t *testing.T) { { resp, err := throttleCheckSelf(primaryTablet) require.NoError(t, err) - assert.EqualValues(t, http.StatusTooManyRequests, resp.Check.StatusCode, "Unexpected response from throttler: %+v", resp) assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_THRESHOLD_EXCEEDED, resp.Check.ResponseCode, "Unexpected response from throttler: %+v", resp) } }) @@ -707,7 +678,6 @@ func TestCustomQuery(t *testing.T) { { resp, err := throttleCheckSelf(primaryTablet) require.NoError(t, err) - assert.EqualValues(t, http.StatusOK, resp.Check.StatusCode, "Unexpected response from throttler: %+v", resp) assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, resp.Check.ResponseCode, "Unexpected response from throttler: %+v", resp) } }) @@ -730,7 +700,6 @@ func TestRestoreDefaultQuery(t *testing.T) { t.Run("validating OK response from throttler with default threshold, heartbeats running", func(t *testing.T) { resp, err := throttleCheck(primaryTablet, false) require.NoError(t, err) - assert.EqualValues(t, http.StatusOK, resp.Check.StatusCode, "Unexpected response from throttler: %+v", resp) assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, resp.Check.ResponseCode, "Unexpected response from throttler: %+v", resp) }) t.Run("validating pushback response from throttler on default threshold once heartbeats go stale", func(t *testing.T) { diff --git a/go/test/endtoend/throttler/util.go b/go/test/endtoend/throttler/util.go index 162388c83e0..588efb090cc 100644 --- a/go/test/endtoend/throttler/util.go +++ b/go/test/endtoend/throttler/util.go @@ -66,8 +66,7 @@ func CheckThrottlerRaw(vtctldProcess *cluster.VtctldClientProcess, tablet *clust args = append(args, "CheckThrottler") if flags == nil { flags = &throttle.CheckFlags{ - Scope: base.SelfScope, - MultiMetricsEnabled: true, + Scope: base.SelfScope, } } if appName != "" { @@ -124,11 +123,6 @@ func UpdateThrottlerTopoConfigRaw( args = append(args, "--threshold", fmt.Sprintf("%f", opts.Threshold)) } args = append(args, "--custom-query", opts.CustomQuery) - if opts.CustomQuery != "" { - args = append(args, "--check-as-check-self") - } else { - args = append(args, "--check-as-check-shard") - } if appRule != nil { args = append(args, "--throttle-app", appRule.Name) args = append(args, "--throttle-app-duration", time.Until(protoutil.TimeFromProto(appRule.ExpiresAt).UTC()).String()) @@ -485,7 +479,7 @@ func EnableLagThrottlerAndWaitForStatus(t *testing.T, clusterInstance *cluster.L } } -func WaitForCheckThrottlerResult(t *testing.T, clusterInstance *cluster.LocalProcessCluster, tablet *cluster.Vttablet, appName throttlerapp.Name, flags *throttle.CheckFlags, expect int32, timeout time.Duration) (*vtctldatapb.CheckThrottlerResponse, error) { +func WaitForCheckThrottlerResult(t *testing.T, clusterInstance *cluster.LocalProcessCluster, tablet *cluster.Vttablet, appName throttlerapp.Name, flags *throttle.CheckFlags, expect tabletmanagerdatapb.CheckThrottlerResponseCode, timeout time.Duration) (*vtctldatapb.CheckThrottlerResponse, error) { ctx, cancel := context.WithTimeout(context.Background(), timeout) defer cancel() ticker := time.NewTicker(time.Second) @@ -493,7 +487,7 @@ func WaitForCheckThrottlerResult(t *testing.T, clusterInstance *cluster.LocalPro for { resp, err := CheckThrottler(clusterInstance, tablet, appName, flags) require.NoError(t, err) - if resp.Check.StatusCode == expect { + if resp.Check.ResponseCode == expect { return resp, nil } select { @@ -534,11 +528,11 @@ func WaitForValidData(t *testing.T, tablet *cluster.Vttablet, timeout time.Durat for { checkResp, checkErr := http.Get(checkURL) - if checkErr != nil { + if checkErr == nil { defer checkResp.Body.Close() } selfCheckResp, selfCheckErr := http.Get(selfCheckURL) - if selfCheckErr != nil { + if selfCheckErr == nil { defer selfCheckResp.Body.Close() } if checkErr == nil && selfCheckErr == nil && diff --git a/go/test/endtoend/vreplication/helper_test.go b/go/test/endtoend/vreplication/helper_test.go index 6bfce05119a..b3c55becc4a 100644 --- a/go/test/endtoend/vreplication/helper_test.go +++ b/go/test/endtoend/vreplication/helper_test.go @@ -55,6 +55,7 @@ import ( "vitess.io/vitess/go/vt/vttablet/tabletserver/throttle/throttlerapp" binlogdatapb "vitess.io/vitess/go/vt/proto/binlogdata" + tabletmanagerdatapb "vitess.io/vitess/go/vt/proto/tabletmanagerdata" topodatapb "vitess.io/vitess/go/vt/proto/topodata" ) @@ -178,16 +179,32 @@ func waitForQueryResult(t *testing.T, conn *mysql.Conn, database string, query s // waitForTabletThrottlingStatus waits for the tablet to return the provided HTTP code for // the provided app name in its self check. -func waitForTabletThrottlingStatus(t *testing.T, tablet *cluster.VttabletProcess, throttlerApp throttlerapp.Name, wantCode int64) { - var gotCode int64 +func waitForTabletThrottlingStatus(t *testing.T, tablet *cluster.VttabletProcess, throttlerApp throttlerapp.Name, wantCode int) { timer := time.NewTimer(defaultTimeout) defer timer.Stop() for { output, err := throttlerCheckSelf(tablet, throttlerApp) require.NoError(t, err) - gotCode, err = jsonparser.GetInt([]byte(output), "StatusCode") - require.NoError(t, err) + responseCode, err := jsonparser.GetInt([]byte(output), "ResponseCode") + require.NoError(t, err, "waitForTabletThrottlingStatus output: %v", output) + + var gotCode int + switch tabletmanagerdatapb.CheckThrottlerResponseCode(responseCode) { + case tabletmanagerdatapb.CheckThrottlerResponseCode_OK: + gotCode = http.StatusOK + case tabletmanagerdatapb.CheckThrottlerResponseCode_APP_DENIED: + gotCode = http.StatusExpectationFailed + case tabletmanagerdatapb.CheckThrottlerResponseCode_THRESHOLD_EXCEEDED: + gotCode = http.StatusTooManyRequests + case tabletmanagerdatapb.CheckThrottlerResponseCode_UNKNOWN_METRIC: + gotCode = http.StatusNotFound + case tabletmanagerdatapb.CheckThrottlerResponseCode_INTERNAL_ERROR: + gotCode = http.StatusInternalServerError + default: + gotCode = http.StatusInternalServerError + } + if wantCode == gotCode { // Wait for any cached check values to be cleared and the new // status value to be in effect everywhere before returning. diff --git a/go/vt/proto/tabletmanagerdata/tabletmanagerdata.pb.go b/go/vt/proto/tabletmanagerdata/tabletmanagerdata.pb.go index 93690d02140..33ba53dcbb8 100644 --- a/go/vt/proto/tabletmanagerdata/tabletmanagerdata.pb.go +++ b/go/vt/proto/tabletmanagerdata/tabletmanagerdata.pb.go @@ -7114,11 +7114,8 @@ type CheckThrottlerRequest struct { SkipRequestHeartbeats bool `protobuf:"varint,3,opt,name=skip_request_heartbeats,json=skipRequestHeartbeats,proto3" json:"skip_request_heartbeats,omitempty"` // OKIfNotExists asks the throttler to return OK even if the metric does not exist OkIfNotExists bool `protobuf:"varint,4,opt,name=ok_if_not_exists,json=okIfNotExists,proto3" json:"ok_if_not_exists,omitempty"` - // MultiMetricsEnabled is always set to "true" and is how a multi-metrics enabled replica - // throttler knows its being probed by a multi-metrics enabled primary vttablet. - MultiMetricsEnabled bool `protobuf:"varint,5,opt,name=multi_metrics_enabled,json=multiMetricsEnabled,proto3" json:"multi_metrics_enabled,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *CheckThrottlerRequest) Reset() { @@ -7179,17 +7176,8 @@ func (x *CheckThrottlerRequest) GetOkIfNotExists() bool { return false } -func (x *CheckThrottlerRequest) GetMultiMetricsEnabled() bool { - if x != nil { - return x.MultiMetricsEnabled - } - return false -} - type CheckThrottlerResponse struct { state protoimpl.MessageState `protogen:"open.v1"` - // StatusCode is HTTP compliant response code (e.g. 200 for OK) - StatusCode int32 `protobuf:"varint,1,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"` // Value is the metric value collected by the tablet Value float64 `protobuf:"fixed64,2,opt,name=value,proto3" json:"value,omitempty"` // Threshold is the throttling threshold the table was comparing the value with @@ -7244,13 +7232,6 @@ func (*CheckThrottlerResponse) Descriptor() ([]byte, []int) { return file_tabletmanagerdata_proto_rawDescGZIP(), []int{140} } -func (x *CheckThrottlerResponse) GetStatusCode() int32 { - if x != nil { - return x.StatusCode - } - return 0 -} - func (x *CheckThrottlerResponse) GetValue() float64 { if x != nil { return x.Value @@ -7796,8 +7777,6 @@ type CheckThrottlerResponse_Metric struct { state protoimpl.MessageState `protogen:"open.v1"` // Name of the metric Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // StatusCode is HTTP compliant response code (e.g. 200 for OK) - StatusCode int32 `protobuf:"varint,2,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"` // Value is the metric value collected by the tablet Value float64 `protobuf:"fixed64,3,opt,name=value,proto3" json:"value,omitempty"` // Threshold is the throttling threshold the table was comparing the value with @@ -7851,13 +7830,6 @@ func (x *CheckThrottlerResponse_Metric) GetName() string { return "" } -func (x *CheckThrottlerResponse_Metric) GetStatusCode() int32 { - if x != nil { - return x.StatusCode - } - return 0 -} - func (x *CheckThrottlerResponse_Metric) GetValue() float64 { if x != nil { return x.Value @@ -8005,9 +7977,8 @@ func (x *GetThrottlerStatusResponse_MetricHealth) GetSecondsSinceLastHealthy() i } type GetThrottlerStatusResponse_RecentApp struct { - state protoimpl.MessageState `protogen:"open.v1"` - CheckedAt *vttime.Time `protobuf:"bytes,1,opt,name=checked_at,json=checkedAt,proto3" json:"checked_at,omitempty"` - StatusCode int32 `protobuf:"varint,2,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + CheckedAt *vttime.Time `protobuf:"bytes,1,opt,name=checked_at,json=checkedAt,proto3" json:"checked_at,omitempty"` // ResponseCode is the enum representation of the response ResponseCode CheckThrottlerResponseCode `protobuf:"varint,3,opt,name=response_code,json=responseCode,proto3,enum=tabletmanagerdata.CheckThrottlerResponseCode" json:"response_code,omitempty"` unknownFields protoimpl.UnknownFields @@ -8051,13 +8022,6 @@ func (x *GetThrottlerStatusResponse_RecentApp) GetCheckedAt() *vttime.Time { return nil } -func (x *GetThrottlerStatusResponse_RecentApp) GetStatusCode() int32 { - if x != nil { - return x.StatusCode - } - return 0 -} - func (x *GetThrottlerStatusResponse_RecentApp) GetResponseCode() CheckThrottlerResponseCode { if x != nil { return x.ResponseCode @@ -9018,7 +8982,7 @@ var file_tabletmanagerdata_proto_rawDesc = string([]byte{ 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x22, 0x18, 0x0a, 0x16, 0x52, 0x65, 0x73, 0x65, 0x74, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0xdd, 0x01, 0x0a, 0x15, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, + 0x22, 0xc6, 0x01, 0x0a, 0x15, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x70, 0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x70, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x02, @@ -9028,63 +8992,59 @@ var file_tabletmanagerdata_proto_rawDesc = string([]byte{ 0x69, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x73, 0x12, 0x27, 0x0a, 0x10, 0x6f, 0x6b, 0x5f, 0x69, 0x66, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x6f, - 0x6b, 0x49, 0x66, 0x4e, 0x6f, 0x74, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x12, 0x32, 0x0a, 0x15, - 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x5f, 0x65, 0x6e, - 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x6d, 0x75, 0x6c, - 0x74, 0x69, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, - 0x22, 0x9f, 0x06, 0x0a, 0x16, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, - 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x14, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, - 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x12, 0x29, 0x0a, 0x10, 0x72, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x6c, 0x79, 0x5f, 0x63, 0x68, 0x65, - 0x63, 0x6b, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x72, 0x65, 0x63, 0x65, - 0x6e, 0x74, 0x6c, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x12, 0x50, 0x0a, 0x07, 0x6d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x74, - 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, - 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x19, 0x0a, - 0x08, 0x61, 0x70, 0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x61, 0x70, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x6d, 0x6d, - 0x61, 0x72, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, - 0x72, 0x79, 0x12, 0x52, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x63, - 0x6f, 0x64, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x74, 0x61, 0x62, 0x6c, - 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x68, + 0x6b, 0x49, 0x66, 0x4e, 0x6f, 0x74, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x4a, 0x04, 0x08, 0x05, + 0x10, 0x06, 0x52, 0x15, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x73, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, 0xf6, 0x05, 0x0a, 0x16, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x1a, 0x8b, 0x02, 0x0a, 0x06, 0x4d, 0x65, 0x74, 0x72, 0x69, - 0x63, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, - 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1c, 0x0a, 0x09, - 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, - 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, - 0x72, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, - 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, - 0x6f, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, - 0x12, 0x52, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x64, - 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, - 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x43, 0x6f, 0x64, 0x65, 0x1a, 0x6c, 0x0a, 0x0c, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x46, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, - 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, - 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x22, 0x1b, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x68, + 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x74, + 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, + 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x18, + 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x72, 0x65, 0x63, 0x65, + 0x6e, 0x74, 0x6c, 0x79, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x0f, 0x72, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x6c, 0x79, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x65, 0x64, 0x12, 0x50, 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x07, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, + 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x68, + 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x6d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x70, 0x70, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x70, 0x70, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x52, 0x0a, 0x0d, 0x72, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x2d, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x68, 0x72, 0x6f, 0x74, + 0x74, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, + 0x52, 0x0c, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x1a, 0xf0, + 0x01, 0x0a, 0x06, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, + 0x64, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x52, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, + 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, + 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x0c, 0x72, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x4a, 0x04, 0x08, 0x02, 0x10, + 0x03, 0x1a, 0x6c, 0x0a, 0x0c, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x6b, 0x65, 0x79, 0x12, 0x46, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, + 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x68, 0x72, 0x6f, + 0x74, 0x74, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x4d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x4a, + 0x04, 0x08, 0x01, 0x10, 0x02, 0x52, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x63, 0x6f, + 0x64, 0x65, 0x22, 0x1b, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, - 0xb6, 0x10, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, + 0x9b, 0x10, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, @@ -9197,61 +9157,59 @@ var file_tabletmanagerdata_proto_rawDesc = string([]byte{ 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, - 0x1a, 0xad, 0x01, 0x0a, 0x09, 0x52, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x41, 0x70, 0x70, 0x12, 0x2b, + 0x1a, 0x92, 0x01, 0x0a, 0x09, 0x52, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x41, 0x70, 0x70, 0x12, 0x2b, 0x0a, 0x0a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x76, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x54, 0x69, 0x6d, 0x65, - 0x52, 0x09, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x52, 0x0a, 0x0d, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, - 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x68, 0x72, - 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, - 0x64, 0x65, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, - 0x1a, 0x76, 0x0a, 0x0f, 0x52, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x41, 0x70, 0x70, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x4d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, - 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x68, 0x72, 0x6f, - 0x74, 0x74, 0x6c, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x41, 0x70, 0x70, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xaa, 0x01, 0x0a, 0x11, 0x43, 0x68, 0x61, - 0x6e, 0x67, 0x65, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x42, - 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x74, - 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, - 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x2e, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x74, 0x61, - 0x67, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x1a, 0x37, 0x0a, 0x09, - 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x92, 0x01, 0x0a, 0x12, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, - 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x04, - 0x74, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x74, 0x61, 0x62, - 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, - 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x2e, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x74, 0x61, 0x67, - 0x73, 0x1a, 0x37, 0x0a, 0x09, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, + 0x52, 0x09, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x41, 0x74, 0x12, 0x52, 0x0a, 0x0d, 0x72, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, + 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x68, 0x72, 0x6f, + 0x74, 0x74, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x64, + 0x65, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x4a, + 0x04, 0x08, 0x02, 0x10, 0x03, 0x1a, 0x76, 0x0a, 0x0f, 0x52, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x41, + 0x70, 0x70, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x4d, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, + 0x74, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x41, + 0x70, 0x70, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xaa, 0x01, + 0x0a, 0x11, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x42, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x2e, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x61, 0x67, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x70, 0x6c, 0x61, + 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, + 0x65, 0x1a, 0x37, 0x0a, 0x09, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x2a, 0x3e, 0x0a, 0x19, 0x54, 0x61, - 0x62, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x65, - 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x4e, 0x59, 0x10, 0x00, - 0x12, 0x0b, 0x0a, 0x07, 0x49, 0x4e, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x10, 0x01, 0x12, 0x0b, 0x0a, - 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x03, 0x2a, 0x83, 0x01, 0x0a, 0x1a, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0d, 0x0a, 0x09, 0x55, 0x4e, 0x44, - 0x45, 0x46, 0x49, 0x4e, 0x45, 0x44, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x4f, 0x4b, 0x10, 0x01, - 0x12, 0x16, 0x0a, 0x12, 0x54, 0x48, 0x52, 0x45, 0x53, 0x48, 0x4f, 0x4c, 0x44, 0x5f, 0x45, 0x58, - 0x43, 0x45, 0x45, 0x44, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x41, 0x50, 0x50, 0x5f, - 0x44, 0x45, 0x4e, 0x49, 0x45, 0x44, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x55, 0x4e, 0x4b, 0x4e, - 0x4f, 0x57, 0x4e, 0x5f, 0x4d, 0x45, 0x54, 0x52, 0x49, 0x43, 0x10, 0x04, 0x12, 0x12, 0x0a, 0x0e, - 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x05, - 0x42, 0x30, 0x5a, 0x2e, 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x69, - 0x74, 0x65, 0x73, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x76, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, - 0x74, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x92, 0x01, 0x0a, 0x12, 0x43, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x43, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x2f, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, + 0x61, 0x74, 0x61, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x1a, 0x37, 0x0a, 0x09, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x2a, + 0x3e, 0x0a, 0x19, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x07, 0x0a, 0x03, + 0x41, 0x4e, 0x59, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x49, 0x4e, 0x4f, 0x52, 0x44, 0x45, 0x52, + 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x03, 0x2a, + 0x83, 0x01, 0x0a, 0x1a, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, + 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0d, + 0x0a, 0x09, 0x55, 0x4e, 0x44, 0x45, 0x46, 0x49, 0x4e, 0x45, 0x44, 0x10, 0x00, 0x12, 0x06, 0x0a, + 0x02, 0x4f, 0x4b, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x54, 0x48, 0x52, 0x45, 0x53, 0x48, 0x4f, + 0x4c, 0x44, 0x5f, 0x45, 0x58, 0x43, 0x45, 0x45, 0x44, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0e, 0x0a, + 0x0a, 0x41, 0x50, 0x50, 0x5f, 0x44, 0x45, 0x4e, 0x49, 0x45, 0x44, 0x10, 0x03, 0x12, 0x12, 0x0a, + 0x0e, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x4d, 0x45, 0x54, 0x52, 0x49, 0x43, 0x10, + 0x04, 0x12, 0x12, 0x0a, 0x0e, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x5f, 0x45, 0x52, + 0x52, 0x4f, 0x52, 0x10, 0x05, 0x42, 0x30, 0x5a, 0x2e, 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, 0x2e, + 0x69, 0x6f, 0x2f, 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x76, 0x74, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, }) var ( diff --git a/go/vt/proto/tabletmanagerdata/tabletmanagerdata_vtproto.pb.go b/go/vt/proto/tabletmanagerdata/tabletmanagerdata_vtproto.pb.go index dc7f132ec2e..8916da22868 100644 --- a/go/vt/proto/tabletmanagerdata/tabletmanagerdata_vtproto.pb.go +++ b/go/vt/proto/tabletmanagerdata/tabletmanagerdata_vtproto.pb.go @@ -2771,7 +2771,6 @@ func (m *CheckThrottlerRequest) CloneVT() *CheckThrottlerRequest { r.Scope = m.Scope r.SkipRequestHeartbeats = m.SkipRequestHeartbeats r.OkIfNotExists = m.OkIfNotExists - r.MultiMetricsEnabled = m.MultiMetricsEnabled if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -2789,7 +2788,6 @@ func (m *CheckThrottlerResponse_Metric) CloneVT() *CheckThrottlerResponse_Metric } r := new(CheckThrottlerResponse_Metric) r.Name = m.Name - r.StatusCode = m.StatusCode r.Value = m.Value r.Threshold = m.Threshold r.Error = m.Error @@ -2812,7 +2810,6 @@ func (m *CheckThrottlerResponse) CloneVT() *CheckThrottlerResponse { return (*CheckThrottlerResponse)(nil) } r := new(CheckThrottlerResponse) - r.StatusCode = m.StatusCode r.Value = m.Value r.Threshold = m.Threshold r.Error = m.Error @@ -2897,7 +2894,6 @@ func (m *GetThrottlerStatusResponse_RecentApp) CloneVT() *GetThrottlerStatusResp } r := new(GetThrottlerStatusResponse_RecentApp) r.CheckedAt = m.CheckedAt.CloneVT() - r.StatusCode = m.StatusCode r.ResponseCode = m.ResponseCode if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) @@ -9821,16 +9817,6 @@ func (m *CheckThrottlerRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.MultiMetricsEnabled { - i-- - if m.MultiMetricsEnabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 - } if m.OkIfNotExists { i-- if m.OkIfNotExists { @@ -9936,11 +9922,6 @@ func (m *CheckThrottlerResponse_Metric) MarshalToSizedBufferVT(dAtA []byte) (int i-- dAtA[i] = 0x19 } - if m.StatusCode != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.StatusCode)) - i-- - dAtA[i] = 0x10 - } if len(m.Name) > 0 { i -= len(m.Name) copy(dAtA[i:], m.Name) @@ -10058,11 +10039,6 @@ func (m *CheckThrottlerResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error i-- dAtA[i] = 0x11 } - if m.StatusCode != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.StatusCode)) - i-- - dAtA[i] = 0x8 - } return len(dAtA) - i, nil } @@ -10228,11 +10204,6 @@ func (m *GetThrottlerStatusResponse_RecentApp) MarshalToSizedBufferVT(dAtA []byt i-- dAtA[i] = 0x18 } - if m.StatusCode != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.StatusCode)) - i-- - dAtA[i] = 0x10 - } if m.CheckedAt != nil { size, err := m.CheckedAt.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { @@ -13050,9 +13021,6 @@ func (m *CheckThrottlerRequest) SizeVT() (n int) { if m.OkIfNotExists { n += 2 } - if m.MultiMetricsEnabled { - n += 2 - } n += len(m.unknownFields) return n } @@ -13067,9 +13035,6 @@ func (m *CheckThrottlerResponse_Metric) SizeVT() (n int) { if l > 0 { n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } - if m.StatusCode != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.StatusCode)) - } if m.Value != 0 { n += 9 } @@ -13101,9 +13066,6 @@ func (m *CheckThrottlerResponse) SizeVT() (n int) { } var l int _ = l - if m.StatusCode != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.StatusCode)) - } if m.Value != 0 { n += 9 } @@ -13203,9 +13165,6 @@ func (m *GetThrottlerStatusResponse_RecentApp) SizeVT() (n int) { l = m.CheckedAt.SizeVT() n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } - if m.StatusCode != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.StatusCode)) - } if m.ResponseCode != 0 { n += 1 + protohelpers.SizeOfVarint(uint64(m.ResponseCode)) } @@ -28606,26 +28565,6 @@ func (m *CheckThrottlerRequest) UnmarshalVT(dAtA []byte) error { } } m.OkIfNotExists = bool(v != 0) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MultiMetricsEnabled", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.MultiMetricsEnabled = bool(v != 0) default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -28709,25 +28648,6 @@ func (m *CheckThrottlerResponse_Metric) UnmarshalVT(dAtA []byte) error { } m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StatusCode", wireType) - } - m.StatusCode = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StatusCode |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } case 3: if wireType != 1 { return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) @@ -28916,25 +28836,6 @@ func (m *CheckThrottlerResponse) UnmarshalVT(dAtA []byte) error { return fmt.Errorf("proto: CheckThrottlerResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StatusCode", wireType) - } - m.StatusCode = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StatusCode |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } case 2: if wireType != 1 { return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) @@ -29591,25 +29492,6 @@ func (m *GetThrottlerStatusResponse_RecentApp) UnmarshalVT(dAtA []byte) error { return err } iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StatusCode", wireType) - } - m.StatusCode = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StatusCode |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field ResponseCode", wireType) diff --git a/go/vt/vtctl/grpcvtctldserver/server.go b/go/vt/vtctl/grpcvtctldserver/server.go index ec9fd80db89..2afb508e4a6 100644 --- a/go/vt/vtctl/grpcvtctldserver/server.go +++ b/go/vt/vtctl/grpcvtctldserver/server.go @@ -737,7 +737,6 @@ func (s *VtctldServer) CheckThrottler(ctx context.Context, req *vtctldatapb.Chec Scope: req.Scope, SkipRequestHeartbeats: req.SkipRequestHeartbeats, OkIfNotExists: req.OkIfNotExists, - MultiMetricsEnabled: true, } r, err := s.tmc.CheckThrottler(ctx, ti.Tablet, tmReq) if err != nil { @@ -2058,9 +2057,6 @@ func (s *VtctldServer) UpdateThrottlerConfig(ctx context.Context, req *vtctldata if req.Enable && req.Disable { return nil, fmt.Errorf("--enable and --disable are mutually exclusive") } - if req.CheckAsCheckSelf && req.CheckAsCheckShard { - return nil, fmt.Errorf("--check-as-check-self and --check-as-check-shard are mutually exclusive") - } if req.MetricName != "" && !base.KnownMetricNames.Contains(base.MetricName(req.MetricName)) { return nil, fmt.Errorf("unknown metric name: %s", req.MetricName) @@ -2126,12 +2122,6 @@ func (s *VtctldServer) UpdateThrottlerConfig(ctx context.Context, req *vtctldata if req.Disable { throttlerConfig.Enabled = false } - if req.CheckAsCheckSelf { - throttlerConfig.CheckAsCheckSelf = true - } - if req.CheckAsCheckShard { - throttlerConfig.CheckAsCheckSelf = false - } if req.ThrottledApp != nil && req.ThrottledApp.Name != "" { timeNow := time.Now() if protoutil.TimeFromProto(req.ThrottledApp.ExpiresAt).After(timeNow) { diff --git a/go/vt/vtctl/vtctl.go b/go/vt/vtctl/vtctl.go index 975a8c98a5e..db419327799 100644 --- a/go/vt/vtctl/vtctl.go +++ b/go/vt/vtctl/vtctl.go @@ -708,7 +708,7 @@ var commands = []commandGroup{ { name: "UpdateThrottlerConfig", method: commandUpdateThrottlerConfig, - params: "[--enable|--disable] [--threshold=] [--custom-query=] [--check-as-check-self|--check-as-check-shard] [--throttle-app|unthrottle-app=] [--throttle-app-ratio=] [--throttle-app-duration=] [--throttle-app-exempt] ", + params: "[--enable|--disable] [--threshold=] [--custom-query=] [--throttle-app|unthrottle-app=] [--throttle-app-ratio=] [--throttle-app-duration=] [--throttle-app-exempt] ", help: "Update the table throttler configuration for all cells and tablets of a given keyspace", }, { @@ -3598,8 +3598,6 @@ func commandUpdateThrottlerConfig(ctx context.Context, wr *wrangler.Wrangler, su disable := subFlags.Bool("disable", false, "Disable the throttler") threshold := subFlags.Float64("threshold", 0, "threshold for the either default check (replication lag seconds) or custom check") customQuery := subFlags.String("custom-query", "", "custom throttler check query") - checkAsCheckSelf := subFlags.Bool("check-as-check-self", false, "/throttler/check requests behave as is /throttler/check-self was called") - checkAsCheckShard := subFlags.Bool("check-as-check-shard", false, "use standard behavior for /throttler/check requests") unthrottledApp := subFlags.String("unthrottle-app", "", "an app name to unthrottle") throttledApp := subFlags.String("throttle-app", "", "an app name to throttle") throttledAppRatio := subFlags.Float64("throttle-app-ratio", throttle.DefaultThrottleRatio, "ratio to throttle app (app specififed in --throttled-app)") @@ -3615,9 +3613,6 @@ func commandUpdateThrottlerConfig(ctx context.Context, wr *wrangler.Wrangler, su if *enable && *disable { return fmt.Errorf("--enable and --disable are mutually exclusive") } - if *checkAsCheckSelf && *checkAsCheckShard { - return fmt.Errorf("--check-as-check-self and --check-as-check-shard are mutually exclusive") - } if *throttledApp != "" && *unthrottledApp != "" { return fmt.Errorf("--throttle-app and --unthrottle-app are mutually exclusive") @@ -3635,14 +3630,12 @@ func commandUpdateThrottlerConfig(ctx context.Context, wr *wrangler.Wrangler, su keyspace := subFlags.Arg(0) req := &vtctldatapb.UpdateThrottlerConfigRequest{ - Keyspace: keyspace, - Enable: *enable, - Disable: *disable, - CustomQuery: *customQuery, - CustomQuerySet: customQuerySet, - Threshold: *threshold, - CheckAsCheckSelf: *checkAsCheckSelf, - CheckAsCheckShard: *checkAsCheckShard, + Keyspace: keyspace, + Enable: *enable, + Disable: *disable, + CustomQuery: *customQuery, + CustomQuerySet: customQuerySet, + Threshold: *threshold, } if *throttledApp != "" { req.ThrottledApp = &topodatapb.ThrottledAppRule{ diff --git a/go/vt/vttablet/grpctmclient/client_test.go b/go/vt/vttablet/grpctmclient/client_test.go index 2a5ae3ff6d0..9c3638461ba 100644 --- a/go/vt/vttablet/grpctmclient/client_test.go +++ b/go/vt/vttablet/grpctmclient/client_test.go @@ -76,7 +76,7 @@ func TestDialDedicatedPool(t *testing.T) { ctx, cancel := context.WithTimeout(ctx, time.Second) defer cancel() - req := &tabletmanagerdatapb.CheckThrottlerRequest{MultiMetricsEnabled: true} + req := &tabletmanagerdatapb.CheckThrottlerRequest{} _, err := client.CheckThrottler(ctx, tablet, req) assert.Error(t, err) }) @@ -141,7 +141,7 @@ func TestDialPool(t *testing.T) { ctx, cancel := context.WithTimeout(ctx, time.Second) defer cancel() - req := &tabletmanagerdatapb.CheckThrottlerRequest{MultiMetricsEnabled: true} + req := &tabletmanagerdatapb.CheckThrottlerRequest{} _, err := client.CheckThrottler(ctx, tablet, req) assert.Error(t, err) }) diff --git a/go/vt/vttablet/tabletmanager/rpc_throttler.go b/go/vt/vttablet/tabletmanager/rpc_throttler.go index 1617a5b275b..734ae0172ed 100644 --- a/go/vt/vttablet/tabletmanager/rpc_throttler.go +++ b/go/vt/vttablet/tabletmanager/rpc_throttler.go @@ -47,15 +47,13 @@ func (tm *TabletManager) CheckThrottler(ctx context.Context, req *tabletmanagerd Scope: base.Scope(req.Scope), SkipRequestHeartbeats: req.SkipRequestHeartbeats, OKIfNotExists: req.OkIfNotExists, - MultiMetricsEnabled: req.MultiMetricsEnabled, } checkResult := tm.QueryServiceControl.CheckThrottler(ctx, req.AppName, flags) if checkResult == nil { return nil, vterrors.Errorf(vtrpc.Code_INTERNAL, "nil checkResult") } resp := &tabletmanagerdatapb.CheckThrottlerResponse{ - ResponseCode: throttle.ResponseCodeFromStatus(checkResult.ResponseCode, checkResult.StatusCode), - StatusCode: int32(checkResult.StatusCode), + ResponseCode: checkResult.ResponseCode, Value: checkResult.Value, Threshold: checkResult.Threshold, Message: checkResult.Message, @@ -68,8 +66,7 @@ func (tm *TabletManager) CheckThrottler(ctx context.Context, req *tabletmanagerd resp.Metrics[name] = &tabletmanagerdatapb.CheckThrottlerResponse_Metric{ Name: name, Scope: metric.Scope, - StatusCode: int32(metric.StatusCode), - ResponseCode: throttle.ResponseCodeFromStatus(metric.ResponseCode, metric.StatusCode), + ResponseCode: metric.ResponseCode, Value: metric.Value, Threshold: metric.Threshold, Message: metric.Message, @@ -79,8 +76,7 @@ func (tm *TabletManager) CheckThrottler(ctx context.Context, req *tabletmanagerd // For backwards compatibility, when the checked tablet is of lower version, it does not return a // matrics map, but only the one metric. resp.Metrics[base.DefaultMetricName.String()] = &tabletmanagerdatapb.CheckThrottlerResponse_Metric{ - StatusCode: int32(checkResult.StatusCode), - ResponseCode: throttle.ResponseCodeFromStatus(checkResult.ResponseCode, checkResult.StatusCode), + ResponseCode: checkResult.ResponseCode, Value: checkResult.Value, Threshold: checkResult.Threshold, Message: checkResult.Message, @@ -145,7 +141,6 @@ func (tm *TabletManager) GetThrottlerStatus(ctx context.Context, req *tabletmana for _, recentApp := range status.RecentApps { resp.RecentApps[recentApp.AppName] = &tabletmanagerdatapb.GetThrottlerStatusResponse_RecentApp{ CheckedAt: protoutil.TimeToProto(recentApp.CheckedAt), - StatusCode: int32(recentApp.StatusCode), ResponseCode: recentApp.ResponseCode, } } diff --git a/go/vt/vttablet/tabletserver/tabletserver.go b/go/vt/vttablet/tabletserver/tabletserver.go index 1120e09deef..e09e04a9679 100644 --- a/go/vt/vttablet/tabletserver/tabletserver.go +++ b/go/vt/vttablet/tabletserver/tabletserver.go @@ -1917,19 +1917,32 @@ func (tsv *TabletServer) registerThrottlerCheckHandlers() { flags := &throttle.CheckFlags{ Scope: scope, SkipRequestHeartbeats: (r.URL.Query().Get("s") == "true"), - MultiMetricsEnabled: true, } metricNames := tsv.lagThrottler.MetricNames(r.URL.Query()["m"]) checkResult := tsv.lagThrottler.Check(ctx, appName, metricNames, flags) if checkResult.ResponseCode == tabletmanagerdatapb.CheckThrottlerResponseCode_UNKNOWN_METRIC && flags.OKIfNotExists { - checkResult.StatusCode = http.StatusOK // 200 checkResult.ResponseCode = tabletmanagerdatapb.CheckThrottlerResponseCode_OK } if r.Method == http.MethodGet { w.Header().Set("Content-Type", "application/json") } - w.WriteHeader(checkResult.StatusCode) + var httpStatusCode int + switch checkResult.ResponseCode { + case tabletmanagerdatapb.CheckThrottlerResponseCode_OK: + httpStatusCode = http.StatusOK + case tabletmanagerdatapb.CheckThrottlerResponseCode_APP_DENIED: + httpStatusCode = http.StatusExpectationFailed + case tabletmanagerdatapb.CheckThrottlerResponseCode_THRESHOLD_EXCEEDED: + httpStatusCode = http.StatusTooManyRequests + case tabletmanagerdatapb.CheckThrottlerResponseCode_UNKNOWN_METRIC: + httpStatusCode = http.StatusNotFound + case tabletmanagerdatapb.CheckThrottlerResponseCode_INTERNAL_ERROR: + httpStatusCode = http.StatusInternalServerError + default: + httpStatusCode = http.StatusInternalServerError + } + w.WriteHeader(httpStatusCode) if r.Method == http.MethodGet { json.NewEncoder(w).Encode(checkResult) } diff --git a/go/vt/vttablet/tabletserver/throttle/base/recent_app.go b/go/vt/vttablet/tabletserver/throttle/base/recent_app.go index 7ae2bf789af..b8756ffee5b 100644 --- a/go/vt/vttablet/tabletserver/throttle/base/recent_app.go +++ b/go/vt/vttablet/tabletserver/throttle/base/recent_app.go @@ -50,16 +50,14 @@ import ( type RecentApp struct { AppName string CheckedAt time.Time - StatusCode int ResponseCode tabletmanagerdatapb.CheckThrottlerResponseCode } // NewRecentApp creates a RecentApp -func NewRecentApp(appName string, statusCode int, responseCode tabletmanagerdatapb.CheckThrottlerResponseCode) *RecentApp { +func NewRecentApp(appName string, responseCode tabletmanagerdatapb.CheckThrottlerResponseCode) *RecentApp { result := &RecentApp{ AppName: appName, CheckedAt: time.Now(), - StatusCode: statusCode, ResponseCode: responseCode, } return result diff --git a/go/vt/vttablet/tabletserver/throttle/check.go b/go/vt/vttablet/tabletserver/throttle/check.go index d7f43d85e9d..888daeb5801 100644 --- a/go/vt/vttablet/tabletserver/throttle/check.go +++ b/go/vt/vttablet/tabletserver/throttle/check.go @@ -44,7 +44,6 @@ package throttle import ( "context" "fmt" - "net/http" "time" "vitess.io/vitess/go/stats" @@ -71,13 +70,10 @@ type CheckFlags struct { OverrideThreshold float64 OKIfNotExists bool SkipRequestHeartbeats bool - MultiMetricsEnabled bool } // selfCheckFlags have no special hints -var selfCheckFlags = &CheckFlags{ - MultiMetricsEnabled: true, -} +var selfCheckFlags = &CheckFlags{} // ThrottlerCheck provides methods for an app checking on metrics type ThrottlerCheck struct { @@ -102,42 +98,34 @@ func (check *ThrottlerCheck) checkAppMetricResult(ctx context.Context, appName s } value, err := metricResult.Get() if appName == "" { - return NewCheckResult(tabletmanagerdatapb.CheckThrottlerResponseCode_APP_DENIED, http.StatusExpectationFailed, value, threshold, "", fmt.Errorf("no app indicated")) + return NewCheckResult(tabletmanagerdatapb.CheckThrottlerResponseCode_APP_DENIED, value, threshold, "", fmt.Errorf("no app indicated")) } - var statusCode int var responseCode tabletmanagerdatapb.CheckThrottlerResponseCode - switch { case err == base.ErrAppDenied: // app specifically not allowed to get metrics - statusCode = http.StatusExpectationFailed // 417 responseCode = tabletmanagerdatapb.CheckThrottlerResponseCode_APP_DENIED case err == base.ErrNoSuchMetric: // not collected yet, or metric does not exist - statusCode = http.StatusNotFound // 404 responseCode = tabletmanagerdatapb.CheckThrottlerResponseCode_UNKNOWN_METRIC case err != nil: // any error - statusCode = http.StatusInternalServerError // 500 responseCode = tabletmanagerdatapb.CheckThrottlerResponseCode_INTERNAL_ERROR case value > threshold: // casual throttling - statusCode = http.StatusTooManyRequests // 429 responseCode = tabletmanagerdatapb.CheckThrottlerResponseCode_THRESHOLD_EXCEEDED err = base.ErrThresholdExceeded default: // all good! - statusCode = http.StatusOK // 200 responseCode = tabletmanagerdatapb.CheckThrottlerResponseCode_OK } - return NewCheckResult(responseCode, statusCode, value, threshold, matchedApp, err) + return NewCheckResult(responseCode, value, threshold, matchedApp, err) } // Check is the core function that runs when a user wants to check a metric func (check *ThrottlerCheck) Check(ctx context.Context, appName string, scope base.Scope, metricNames base.MetricNames, flags *CheckFlags) (checkResult *CheckResult) { checkResult = &CheckResult{ - StatusCode: http.StatusOK, ResponseCode: tabletmanagerdatapb.CheckThrottlerResponseCode_OK, Metrics: make(map[string]*MetricResult), } @@ -146,7 +134,6 @@ func (check *ThrottlerCheck) Check(ctx context.Context, appName string, scope ba } metricNames = metricNames.Unique() applyMetricToCheckResult := func(metricName base.MetricName, metric *MetricResult) { - checkResult.StatusCode = metric.StatusCode checkResult.ResponseCode = metric.ResponseCode checkResult.Value = metric.Value checkResult.Threshold = metric.Threshold @@ -198,7 +185,6 @@ func (check *ThrottlerCheck) Check(ctx context.Context, appName string, scope ba checkResult.RecentlyChecked = true } metric := &MetricResult{ - StatusCode: metricCheckResult.StatusCode, ResponseCode: metricCheckResult.ResponseCode, Value: metricCheckResult.Value, Threshold: metricCheckResult.Threshold, @@ -208,11 +194,8 @@ func (check *ThrottlerCheck) Check(ctx context.Context, appName string, scope ba Scope: metricScope.String(), // This reports back the actual scope used for the check } checkResult.Metrics[metricName.String()] = metric - if flags.MultiMetricsEnabled && !metricCheckResult.IsOK() && metricName != base.DefaultMetricName { + if !metricCheckResult.IsOK() && metricName != base.DefaultMetricName { // If we're checking multiple metrics, and one of them fails, we should return any of the failing metric. - // For backwards compatibility, if flags.MultiMetricsEnabled is not set, we do not report back failing - // metrics, because a v20 primary would not know how to deal with it, and is not expecting any of those - // metrics. // The only metric we ever report back is the default metric, see below. applyMetricToCheckResult(metricName, metric) } @@ -233,7 +216,7 @@ func (check *ThrottlerCheck) Check(ctx context.Context, appName string, scope ba statsThrottlerCheckAnyError.Add(1) } }(checkResult) - go check.throttler.markRecentApp(appName, checkResult.StatusCode, checkResult.ResponseCode) + go check.throttler.markRecentApp(appName, checkResult.ResponseCode) return checkResult } diff --git a/go/vt/vttablet/tabletserver/throttle/check_result.go b/go/vt/vttablet/tabletserver/throttle/check_result.go index 34532b7ce37..b26bf87e3b3 100644 --- a/go/vt/vttablet/tabletserver/throttle/check_result.go +++ b/go/vt/vttablet/tabletserver/throttle/check_result.go @@ -43,38 +43,13 @@ package throttle import ( "fmt" - "net/http" tabletmanagerdatapb "vitess.io/vitess/go/vt/proto/tabletmanagerdata" "vitess.io/vitess/go/vt/vttablet/tabletserver/throttle/base" ) -// ResponseCodeFromStatus returns a ResponseCode based on either given response code or HTTP status code. -// It is used to handle the transition period from v20 to v21 where v20 only returns HTTP status code. -// In v22 and beyond, the HTTP status code will be removed, and so will this function. -func ResponseCodeFromStatus(responseCode tabletmanagerdatapb.CheckThrottlerResponseCode, statusCode int) tabletmanagerdatapb.CheckThrottlerResponseCode { - if responseCode != tabletmanagerdatapb.CheckThrottlerResponseCode_UNDEFINED { - return responseCode - } - switch statusCode { - case http.StatusOK: - return tabletmanagerdatapb.CheckThrottlerResponseCode_OK - case http.StatusExpectationFailed: - return tabletmanagerdatapb.CheckThrottlerResponseCode_APP_DENIED - case http.StatusTooManyRequests: - return tabletmanagerdatapb.CheckThrottlerResponseCode_THRESHOLD_EXCEEDED - case http.StatusNotFound: - return tabletmanagerdatapb.CheckThrottlerResponseCode_UNKNOWN_METRIC - case http.StatusInternalServerError: - return tabletmanagerdatapb.CheckThrottlerResponseCode_INTERNAL_ERROR - default: - return tabletmanagerdatapb.CheckThrottlerResponseCode_UNDEFINED - } -} - type MetricResult struct { ResponseCode tabletmanagerdatapb.CheckThrottlerResponseCode `json:"ResponseCode"` - StatusCode int `json:"StatusCode"` Scope string `json:"Scope"` Value float64 `json:"Value"` Threshold float64 `json:"Threshold"` @@ -84,16 +59,12 @@ type MetricResult struct { } func (m *MetricResult) IsOK() bool { - if m.ResponseCode != tabletmanagerdatapb.CheckThrottlerResponseCode_UNDEFINED { - return m.ResponseCode == tabletmanagerdatapb.CheckThrottlerResponseCode_OK - } - return m.StatusCode == http.StatusOK + return m.ResponseCode == tabletmanagerdatapb.CheckThrottlerResponseCode_OK } // CheckResult is the result for an app inquiring on a metric. It also exports as JSON via the API type CheckResult struct { ResponseCode tabletmanagerdatapb.CheckThrottlerResponseCode `json:"ResponseCode"` - StatusCode int `json:"StatusCode"` Value float64 `json:"Value"` Threshold float64 `json:"Threshold"` Error error `json:"-"` @@ -106,10 +77,9 @@ type CheckResult struct { } // NewCheckResult returns a CheckResult -func NewCheckResult(responseCode tabletmanagerdatapb.CheckThrottlerResponseCode, statusCode int, value float64, threshold float64, appName string, err error) *CheckResult { +func NewCheckResult(responseCode tabletmanagerdatapb.CheckThrottlerResponseCode, value float64, threshold float64, appName string, err error) *CheckResult { result := &CheckResult{ ResponseCode: responseCode, - StatusCode: statusCode, Value: value, Threshold: threshold, AppName: appName, @@ -122,15 +92,12 @@ func NewCheckResult(responseCode tabletmanagerdatapb.CheckThrottlerResponseCode, } func (c *CheckResult) IsOK() bool { - if c.ResponseCode != tabletmanagerdatapb.CheckThrottlerResponseCode_UNDEFINED { - return c.ResponseCode == tabletmanagerdatapb.CheckThrottlerResponseCode_OK - } - return c.StatusCode == http.StatusOK + return c.ResponseCode == tabletmanagerdatapb.CheckThrottlerResponseCode_OK } // Summary returns a human-readable summary of the check result func (c *CheckResult) Summary() string { - switch ResponseCodeFromStatus(c.ResponseCode, c.StatusCode) { + switch c.ResponseCode { case tabletmanagerdatapb.CheckThrottlerResponseCode_OK: return fmt.Sprintf("%s is granted access", c.AppName) case tabletmanagerdatapb.CheckThrottlerResponseCode_APP_DENIED: @@ -149,11 +116,11 @@ func (c *CheckResult) Summary() string { } // NewErrorCheckResult returns a check result that indicates an error -func NewErrorCheckResult(responseCode tabletmanagerdatapb.CheckThrottlerResponseCode, statusCode int, err error) *CheckResult { - return NewCheckResult(responseCode, statusCode, 0, 0, "", err) +func NewErrorCheckResult(responseCode tabletmanagerdatapb.CheckThrottlerResponseCode, err error) *CheckResult { + return NewCheckResult(responseCode, 0, 0, "", err) } // NoSuchMetricCheckResult is a result returns when a metric is unknown -var NoSuchMetricCheckResult = NewErrorCheckResult(tabletmanagerdatapb.CheckThrottlerResponseCode_UNKNOWN_METRIC, http.StatusNotFound, base.ErrNoSuchMetric) +var NoSuchMetricCheckResult = NewErrorCheckResult(tabletmanagerdatapb.CheckThrottlerResponseCode_UNKNOWN_METRIC, base.ErrNoSuchMetric) -var okMetricCheckResult = NewCheckResult(tabletmanagerdatapb.CheckThrottlerResponseCode_OK, http.StatusOK, 0, 0, "", nil) +var okMetricCheckResult = NewCheckResult(tabletmanagerdatapb.CheckThrottlerResponseCode_OK, 0, 0, "", nil) diff --git a/go/vt/vttablet/tabletserver/throttle/check_result_test.go b/go/vt/vttablet/tabletserver/throttle/check_result_test.go index fdb0ee600ba..6a550666360 100644 --- a/go/vt/vttablet/tabletserver/throttle/check_result_test.go +++ b/go/vt/vttablet/tabletserver/throttle/check_result_test.go @@ -17,7 +17,6 @@ limitations under the License. package throttle import ( - "net/http" "testing" "github.com/stretchr/testify/assert" @@ -25,56 +24,6 @@ import ( tabletmanagerdatapb "vitess.io/vitess/go/vt/proto/tabletmanagerdata" ) -func TestReponseCodeFromStatus(t *testing.T) { - tcases := []struct { - responseCode tabletmanagerdatapb.CheckThrottlerResponseCode - statusCode int - expect tabletmanagerdatapb.CheckThrottlerResponseCode - }{ - { - tabletmanagerdatapb.CheckThrottlerResponseCode_UNDEFINED, - http.StatusOK, - tabletmanagerdatapb.CheckThrottlerResponseCode_OK, - }, - { - tabletmanagerdatapb.CheckThrottlerResponseCode_UNDEFINED, - http.StatusExpectationFailed, - tabletmanagerdatapb.CheckThrottlerResponseCode_APP_DENIED, - }, - { - tabletmanagerdatapb.CheckThrottlerResponseCode_UNDEFINED, - http.StatusNotFound, - tabletmanagerdatapb.CheckThrottlerResponseCode_UNKNOWN_METRIC, - }, - { - tabletmanagerdatapb.CheckThrottlerResponseCode_UNDEFINED, - http.StatusInternalServerError, - tabletmanagerdatapb.CheckThrottlerResponseCode_INTERNAL_ERROR, - }, - { - tabletmanagerdatapb.CheckThrottlerResponseCode_UNDEFINED, - http.StatusTooManyRequests, - tabletmanagerdatapb.CheckThrottlerResponseCode_THRESHOLD_EXCEEDED, - }, - { - tabletmanagerdatapb.CheckThrottlerResponseCode_THRESHOLD_EXCEEDED, - http.StatusTooManyRequests, - tabletmanagerdatapb.CheckThrottlerResponseCode_THRESHOLD_EXCEEDED, - }, - { - tabletmanagerdatapb.CheckThrottlerResponseCode_THRESHOLD_EXCEEDED, - http.StatusOK, - tabletmanagerdatapb.CheckThrottlerResponseCode_THRESHOLD_EXCEEDED, - }, - } - for _, tcase := range tcases { - t.Run("", func(t *testing.T) { - result := ResponseCodeFromStatus(tcase.responseCode, tcase.statusCode) - assert.Equal(t, tcase.expect, result) - }) - } -} - func TestCheckResultSummary(t *testing.T) { tcases := []struct { checkResult *CheckResult @@ -84,31 +33,6 @@ func TestCheckResultSummary(t *testing.T) { checkResult: &CheckResult{}, summary: "", }, - { - checkResult: &CheckResult{ - StatusCode: http.StatusOK, - AppName: "test", - }, - summary: "test is granted access", - }, - { - checkResult: &CheckResult{ - StatusCode: http.StatusTooManyRequests, - AppName: "test", - MetricName: "bugginess", - Threshold: 100, - Value: 200, - Scope: "self", - }, - summary: "test is denied access due to self/bugginess metric value 200 exceeding threshold 100", - }, - { - checkResult: &CheckResult{ - StatusCode: http.StatusExpectationFailed, - AppName: "test", - }, - summary: "test is explicitly denied access", - }, { checkResult: &CheckResult{ ResponseCode: tabletmanagerdatapb.CheckThrottlerResponseCode_OK, diff --git a/go/vt/vttablet/tabletserver/throttle/client.go b/go/vt/vttablet/tabletserver/throttle/client.go index 8549fb099b6..f0f45341a16 100644 --- a/go/vt/vttablet/tabletserver/throttle/client.go +++ b/go/vt/vttablet/tabletserver/throttle/client.go @@ -70,8 +70,7 @@ func NewBackgroundClient(throttler *Throttler, appName throttlerapp.Name, scope throttler: throttler, appName: appName, flags: CheckFlags{ - Scope: scope, - MultiMetricsEnabled: true, + Scope: scope, }, lastSuccessfulThrottle: make(map[string]int64), } diff --git a/go/vt/vttablet/tabletserver/throttle/throttler.go b/go/vt/vttablet/tabletserver/throttle/throttler.go index 839ba9d43b8..d9abf59ab4b 100644 --- a/go/vt/vttablet/tabletserver/throttle/throttler.go +++ b/go/vt/vttablet/tabletserver/throttle/throttler.go @@ -47,7 +47,6 @@ import ( "fmt" "math" "math/rand/v2" - "net/http" "strings" "sync" "sync/atomic" @@ -175,7 +174,6 @@ type Throttler struct { customMetricsQuery atomic.Value MetricsThreshold atomic.Uint64 - checkAsCheckSelf atomic.Bool metricThresholds *cache.Cache aggregatedMetrics *cache.Cache @@ -437,7 +435,6 @@ func (throttler *Throttler) applyThrottlerConfig(ctx context.Context, throttlerC // require per-metric threshold. throttler.StoreMetricsThreshold(throttlerConfig.Threshold) } - throttler.checkAsCheckSelf.Store(throttlerConfig.CheckAsCheckSelf) { // Throttled apps/rules for _, appRule := range throttlerConfig.ThrottledApps { @@ -907,7 +904,7 @@ func (throttler *Throttler) generateTabletProbeFunction(scope base.Scope, probe } metrics := make(base.ThrottleMetrics) - req := &tabletmanagerdatapb.CheckThrottlerRequest{MultiMetricsEnabled: true} // We leave AppName empty; it will default to VitessName anyway, and we can save some proto space + req := &tabletmanagerdatapb.CheckThrottlerRequest{} // We leave AppName empty; it will default to VitessName anyway, and we can save some proto space resp, gRPCErr := tmClient.CheckThrottler(ctx, probe.Tablet, req) if gRPCErr != nil { return metricsWithError(fmt.Errorf("gRPC error accessing tablet %v. Err=%v", probe.Alias, gRPCErr)) @@ -916,9 +913,6 @@ func (throttler *Throttler) generateTabletProbeFunction(scope base.Scope, probe if resp.ResponseCode == tabletmanagerdatapb.CheckThrottlerResponseCode_INTERNAL_ERROR { throttleMetric.Err = fmt.Errorf("response code: %d", resp.ResponseCode) } - if resp.StatusCode == http.StatusInternalServerError { - throttleMetric.Err = fmt.Errorf("status code: %d", resp.StatusCode) - } if resp.RecentlyChecked { // We have just probed a tablet, and it reported back that someone just recently "check"ed it. // We therefore renew the heartbeats lease. @@ -1402,8 +1396,8 @@ func (throttler *Throttler) ThrottledAppsMap() (result map[string](*base.AppThro } // markRecentApp takes note that an app has just asked about throttling, making it "recent" -func (throttler *Throttler) markRecentApp(appName string, statusCode int, responseCode tabletmanagerdatapb.CheckThrottlerResponseCode) { - recentApp := base.NewRecentApp(appName, statusCode, responseCode) +func (throttler *Throttler) markRecentApp(appName string, responseCode tabletmanagerdatapb.CheckThrottlerResponseCode) { + recentApp := base.NewRecentApp(appName, responseCode) throttler.recentApps.Set(appName, recentApp, cache.DefaultExpiration) } @@ -1540,9 +1534,6 @@ func (throttler *Throttler) Check(ctx context.Context, appName string, metricNam if flags != nil { scope = flags.Scope } - if scope == base.ShardScope && throttler.checkAsCheckSelf.Load() { - scope = base.SelfScope - } return throttler.checkScope(ctx, appName, scope, metricNames, flags) } diff --git a/go/vt/vttablet/tabletserver/throttle/throttler_test.go b/go/vt/vttablet/tabletserver/throttle/throttler_test.go index 352e641fa35..13a014b52ea 100644 --- a/go/vt/vttablet/tabletserver/throttle/throttler_test.go +++ b/go/vt/vttablet/tabletserver/throttle/throttler_test.go @@ -20,7 +20,6 @@ import ( "context" "fmt" "math" - "net/http" "sync" "sync/atomic" "testing" @@ -92,37 +91,30 @@ var ( } replicaMetrics = map[string]*MetricResult{ base.LagMetricName.String(): { - StatusCode: http.StatusOK, ResponseCode: tabletmanagerdatapb.CheckThrottlerResponseCode_OK, Value: 0.9, }, base.ThreadsRunningMetricName.String(): { - StatusCode: http.StatusOK, ResponseCode: tabletmanagerdatapb.CheckThrottlerResponseCode_OK, Value: 13, }, base.CustomMetricName.String(): { - StatusCode: http.StatusOK, ResponseCode: tabletmanagerdatapb.CheckThrottlerResponseCode_OK, Value: 14, }, base.LoadAvgMetricName.String(): { - StatusCode: http.StatusOK, ResponseCode: tabletmanagerdatapb.CheckThrottlerResponseCode_OK, Value: 5.1, }, base.HistoryListLengthMetricName.String(): { - StatusCode: http.StatusOK, ResponseCode: tabletmanagerdatapb.CheckThrottlerResponseCode_OK, Value: 6, }, base.MysqldLoadAvgMetricName.String(): { - StatusCode: http.StatusOK, ResponseCode: tabletmanagerdatapb.CheckThrottlerResponseCode_OK, Value: 0.2211, }, base.MysqldDatadirUsedRatioMetricName.String(): { - StatusCode: http.StatusOK, ResponseCode: tabletmanagerdatapb.CheckThrottlerResponseCode_OK, Value: 0.87, }, @@ -138,7 +130,6 @@ const ( type fakeTMClient struct { tmclient.TabletManagerClient appNames []string - v20 atomic.Bool // help validate v20 backwards compatibility mu sync.Mutex } @@ -148,18 +139,16 @@ func (c *fakeTMClient) Close() { func (c *fakeTMClient) CheckThrottler(ctx context.Context, tablet *topodatapb.Tablet, request *tabletmanagerdatapb.CheckThrottlerRequest) (*tabletmanagerdatapb.CheckThrottlerResponse, error) { resp := &tabletmanagerdatapb.CheckThrottlerResponse{ - StatusCode: http.StatusOK, + ResponseCode: tabletmanagerdatapb.CheckThrottlerResponseCode_OK, Value: 0.339, Threshold: 1, RecentlyChecked: false, } - if !c.v20.Load() { - resp.ResponseCode = tabletmanagerdatapb.CheckThrottlerResponseCode_OK + { resp.Metrics = make(map[string]*tabletmanagerdatapb.CheckThrottlerResponse_Metric) for name, metric := range replicaMetrics { resp.Metrics[name] = &tabletmanagerdatapb.CheckThrottlerResponse_Metric{ Name: name, - StatusCode: int32(metric.StatusCode), ResponseCode: metric.ResponseCode, Value: metric.Value, Threshold: metric.Threshold, @@ -167,6 +156,7 @@ func (c *fakeTMClient) CheckThrottler(ctx context.Context, tablet *topodatapb.Ta } } } + c.mu.Lock() defer c.mu.Unlock() c.appNames = append(c.appNames, request.AppName) @@ -455,13 +445,11 @@ func TestApplyThrottlerConfigMetricThresholds(t *testing.T) { flags := &CheckFlags{ Scope: base.SelfScope, SkipRequestHeartbeats: true, - MultiMetricsEnabled: true, } t.Run("check before apply", func(t *testing.T) { checkResult := throttler.Check(ctx, testAppName.String(), nil, flags) require.NotNil(t, checkResult) assert.EqualValues(t, 0.3, checkResult.Value) // self lag value - assert.EqualValues(t, http.StatusOK, checkResult.StatusCode) assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode) assert.Len(t, checkResult.Metrics, 1) assert.Contains(t, checkResult.Summary(), testAppName.String()+" is granted access") @@ -485,7 +473,6 @@ func TestApplyThrottlerConfigMetricThresholds(t *testing.T) { checkResult := throttler.Check(ctx, testAppName.String(), nil, flags) require.NotNil(t, checkResult) assert.EqualValues(t, 0.3, checkResult.Value, "unexpected result: %+v", checkResult) // self lag value - assert.NotEqualValues(t, http.StatusOK, checkResult.StatusCode, "unexpected result: %+v", checkResult) assert.NotEqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode, "unexpected result: %+v", checkResult) assert.Len(t, checkResult.Metrics, 1) assert.Contains(t, checkResult.Summary(), testAppName.String()+" is denied access due to self/lag metric value") @@ -510,7 +497,6 @@ func TestApplyThrottlerConfigMetricThresholds(t *testing.T) { checkResult := throttler.Check(ctx, testAppName.String(), nil, flags) require.NotNil(t, checkResult) assert.EqualValues(t, 0.3, checkResult.Value, "unexpected result: %+v", checkResult) // self lag value - assert.EqualValues(t, http.StatusOK, checkResult.StatusCode, "unexpected result: %+v", checkResult) assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode, "unexpected result: %+v", checkResult) assert.Len(t, checkResult.Metrics, 1) assert.Contains(t, checkResult.Summary(), testAppName.String()+" is granted access") @@ -557,7 +543,6 @@ func TestApplyThrottlerConfigAppCheckedMetrics(t *testing.T) { } flags := &CheckFlags{ SkipRequestHeartbeats: true, - MultiMetricsEnabled: true, } throttlerConfig := &topodatapb.ThrottlerConfig{ Enabled: true, @@ -569,7 +554,6 @@ func TestApplyThrottlerConfigAppCheckedMetrics(t *testing.T) { checkResult := throttler.Check(ctx, testAppName.String(), nil, flags) require.NotNil(t, checkResult) assert.EqualValues(t, 0.9, checkResult.Value) // shard lag value - assert.NotEqualValues(t, http.StatusOK, checkResult.StatusCode) assert.NotEqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode) assert.Len(t, checkResult.Metrics, 1) assert.Contains(t, checkResult.Summary(), testAppName.String()+" is denied access due to shard/lag metric value") @@ -585,7 +569,6 @@ func TestApplyThrottlerConfigAppCheckedMetrics(t *testing.T) { checkResult := throttler.Check(ctx, testAppName.String(), nil, flags) require.NotNil(t, checkResult) assert.EqualValues(t, 0.9, checkResult.Value) // self lag value - assert.EqualValues(t, http.StatusOK, checkResult.StatusCode) assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode) assert.Len(t, checkResult.Metrics, 1) assert.Contains(t, checkResult.Summary(), testAppName.String()+" is granted access") @@ -601,7 +584,6 @@ func TestApplyThrottlerConfigAppCheckedMetrics(t *testing.T) { checkResult := throttler.Check(ctx, testAppName.String(), nil, flags) require.NotNil(t, checkResult) assert.EqualValues(t, 0.9, checkResult.Value) // shard lag value - assert.EqualValues(t, http.StatusOK, checkResult.StatusCode) assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode) assert.Len(t, checkResult.Metrics, 1) assert.Contains(t, checkResult.Summary(), testAppName.String()+" is granted access") @@ -621,7 +603,6 @@ func TestApplyThrottlerConfigAppCheckedMetrics(t *testing.T) { checkResult := throttler.Check(ctx, testAppName.String(), nil, flags) require.NotNil(t, checkResult) assert.EqualValues(t, 2.718, checkResult.Value) // self loadavg value - assert.NotEqualValues(t, http.StatusOK, checkResult.StatusCode, "unexpected result: %+v", checkResult) assert.NotEqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode, "unexpected result: %+v", checkResult) assert.Len(t, checkResult.Metrics, 1) assert.Contains(t, checkResult.Summary(), testAppName.String()+" is denied access due to self/loadavg metric value") @@ -641,7 +622,6 @@ func TestApplyThrottlerConfigAppCheckedMetrics(t *testing.T) { checkResult := throttler.Check(ctx, testAppName.String(), nil, flags) require.NotNil(t, checkResult) assert.EqualValues(t, 5.1, checkResult.Value) // shard loadavg value - assert.NotEqualValues(t, http.StatusOK, checkResult.StatusCode, "unexpected result: %+v", checkResult) assert.NotEqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode, "unexpected result: %+v", checkResult) assert.Len(t, checkResult.Metrics, 1) assert.Contains(t, checkResult.Summary(), testAppName.String()+" is denied access due to shard/loadavg metric value") @@ -660,7 +640,6 @@ func TestApplyThrottlerConfigAppCheckedMetrics(t *testing.T) { checkResult := throttler.Check(ctx, testAppName.String(), nil, flags) require.NotNil(t, checkResult) assert.EqualValues(t, 2.718, checkResult.Value) // self loadavg value - assert.NotEqualValues(t, http.StatusOK, checkResult.StatusCode, "unexpected result: %+v", checkResult) assert.NotEqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode, "unexpected result: %+v", checkResult) assert.Equal(t, 2, len(checkResult.Metrics)) assert.Contains(t, checkResult.Summary(), testAppName.String()+" is denied access due to self/loadavg metric value") @@ -679,7 +658,6 @@ func TestApplyThrottlerConfigAppCheckedMetrics(t *testing.T) { checkResult := throttler.Check(ctx, testAppName.String(), nil, flags) require.NotNil(t, checkResult) assert.EqualValues(t, 5.1, checkResult.Value) // shard loadavg value - assert.NotEqualValues(t, http.StatusOK, checkResult.StatusCode, "unexpected result: %+v", checkResult) assert.NotEqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode, "unexpected result: %+v", checkResult) assert.Equal(t, 2, len(checkResult.Metrics)) assert.Contains(t, checkResult.Summary(), testAppName.String()+" is denied access due to shard/loadavg metric value") @@ -694,7 +672,6 @@ func TestApplyThrottlerConfigAppCheckedMetrics(t *testing.T) { checkResult := throttler.Check(ctx, testAppName.String(), nil, flags) require.NotNil(t, checkResult) assert.EqualValues(t, 0.9, checkResult.Value) // shard lag value - assert.EqualValues(t, http.StatusOK, checkResult.StatusCode, "unexpected result: %+v", checkResult) assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode, "unexpected result: %+v", checkResult) assert.Equal(t, 1, len(checkResult.Metrics), "unexpected metrics: %+v", checkResult.Metrics) assert.Contains(t, checkResult.Summary(), testAppName.String()+" is granted access") @@ -713,7 +690,6 @@ func TestApplyThrottlerConfigAppCheckedMetrics(t *testing.T) { checkResult := throttler.Check(ctx, testAppName.String(), nil, flags) require.NotNil(t, checkResult) assert.EqualValues(t, 0.9, checkResult.Value) // shard lag value - assert.EqualValues(t, http.StatusOK, checkResult.StatusCode, "unexpected result: %+v", checkResult) assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode, "unexpected result: %+v", checkResult) assert.Equal(t, 2, len(checkResult.Metrics)) assert.Contains(t, checkResult.Summary(), testAppName.String()+" is granted access") @@ -732,7 +708,6 @@ func TestApplyThrottlerConfigAppCheckedMetrics(t *testing.T) { checkResult := throttler.Check(ctx, throttlerapp.AllName.String(), nil, flags) require.NotNil(t, checkResult) assert.EqualValues(t, 2.718, checkResult.Value) // loadavg self value exceeds threshold - assert.NotEqualValues(t, http.StatusOK, checkResult.StatusCode, "unexpected result: %+v", checkResult) assert.NotEqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode, "unexpected result: %+v", checkResult) assert.Equal(t, 2, len(checkResult.Metrics)) assert.Contains(t, checkResult.Summary(), throttlerapp.AllName.String()+" is denied access due to self/loadavg metric value") @@ -748,7 +723,6 @@ func TestApplyThrottlerConfigAppCheckedMetrics(t *testing.T) { checkResult := throttler.Check(ctx, testAppName.String(), nil, flags) require.NotNil(t, checkResult) assert.EqualValues(t, 0.9, checkResult.Value) // shard lag value - assert.EqualValues(t, http.StatusOK, checkResult.StatusCode, "unexpected result: %+v", checkResult) assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode, "unexpected result: %+v", checkResult) assert.Equal(t, 2, len(checkResult.Metrics)) assert.Contains(t, checkResult.Summary(), testAppName.String()+" is granted access") @@ -763,7 +737,6 @@ func TestApplyThrottlerConfigAppCheckedMetrics(t *testing.T) { checkResult := throttler.Check(ctx, throttlerapp.OnlineDDLName.String(), nil, flags) require.NotNil(t, checkResult) assert.EqualValues(t, 2.718, checkResult.Value) // loadavg self value exceeds threshold - assert.NotEqualValues(t, http.StatusOK, checkResult.StatusCode, "unexpected result: %+v", checkResult) assert.NotEqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode, "unexpected result: %+v", checkResult) assert.Equal(t, 2, len(checkResult.Metrics)) assert.Contains(t, checkResult.Summary(), throttlerapp.AllName.String()+" is denied access due to self/loadavg metric value") @@ -775,7 +748,6 @@ func TestApplyThrottlerConfigAppCheckedMetrics(t *testing.T) { checkResult := throttler.Check(ctx, "vreplication:online-ddl:12345", nil, flags) require.NotNil(t, checkResult) assert.EqualValues(t, 2.718, checkResult.Value) // loadavg self value exceeds threshold - assert.NotEqualValues(t, http.StatusOK, checkResult.StatusCode, "unexpected result: %+v", checkResult) assert.NotEqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode, "unexpected result: %+v", checkResult) assert.Equal(t, 2, len(checkResult.Metrics)) assert.Contains(t, checkResult.Summary(), throttlerapp.AllName.String()+" is denied access due to self/loadavg metric value") @@ -786,7 +758,6 @@ func TestApplyThrottlerConfigAppCheckedMetrics(t *testing.T) { checkResult := throttler.Check(ctx, "vreplication:online-ddl:test", nil, flags) require.NotNil(t, checkResult) assert.EqualValues(t, 0.9, checkResult.Value) // shard lag value - assert.EqualValues(t, http.StatusOK, checkResult.StatusCode, "unexpected result: %+v", checkResult) assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode, "unexpected result: %+v", checkResult) assert.Equal(t, 2, len(checkResult.Metrics)) assert.Contains(t, checkResult.Summary(), testAppName.String()+" is granted access") @@ -802,7 +773,6 @@ func TestApplyThrottlerConfigAppCheckedMetrics(t *testing.T) { checkResult := throttler.Check(ctx, throttlerapp.AllName.String(), nil, flags) require.NotNil(t, checkResult) assert.EqualValues(t, 0.9, checkResult.Value) // shard lag value - assert.EqualValues(t, http.StatusOK, checkResult.StatusCode, "unexpected result: %+v", checkResult) assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode, "unexpected result: %+v", checkResult) assert.Len(t, checkResult.Metrics, 1) assert.Contains(t, checkResult.Summary(), throttlerapp.AllName.String()+" is granted access") @@ -818,7 +788,6 @@ func TestApplyThrottlerConfigAppCheckedMetrics(t *testing.T) { checkResult := throttler.Check(ctx, testAppName.String(), nil, flags) require.NotNil(t, checkResult) assert.EqualValues(t, 0.9, checkResult.Value) // shard lag value - assert.EqualValues(t, http.StatusOK, checkResult.StatusCode, "unexpected result: %+v", checkResult) assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode, "unexpected result: %+v", checkResult) assert.Equal(t, 2, len(checkResult.Metrics)) assert.Contains(t, checkResult.Summary(), testAppName.String()+" is granted access") @@ -833,7 +802,6 @@ func TestApplyThrottlerConfigAppCheckedMetrics(t *testing.T) { checkResult := throttler.Check(ctx, throttlerapp.OnlineDDLName.String(), nil, flags) require.NotNil(t, checkResult) assert.EqualValues(t, 0.9, checkResult.Value) // shard lag value - assert.EqualValues(t, http.StatusOK, checkResult.StatusCode, "unexpected result: %+v", checkResult) assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode, "unexpected result: %+v", checkResult) assert.Len(t, checkResult.Metrics, 1) assert.Contains(t, checkResult.Summary(), throttlerapp.OnlineDDLName.String()+" is granted access") @@ -851,7 +819,6 @@ func TestApplyThrottlerConfigAppCheckedMetrics(t *testing.T) { checkResult := throttler.Check(ctx, testAppName.String(), nil, flags) require.NotNil(t, checkResult) assert.EqualValues(t, 0.9, checkResult.Value) // shard lag value - assert.EqualValues(t, http.StatusOK, checkResult.StatusCode) assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode) assert.Len(t, checkResult.Metrics, 1) assert.Contains(t, checkResult.Summary(), testAppName.String()+" is granted access") @@ -1593,89 +1560,6 @@ func TestProbesWhileOperating(t *testing.T) { }) } -// TestProbesWithV20Replicas is similar to TestProbesWhileOperating, but assumes a v20 replica, which does not report any of the named metrics. -func TestProbesWithV20Replicas(t *testing.T) { - ctx := context.Background() // for development, replace with ctx := utils.LeakCheckContext(t) - ctx, cancel := context.WithCancel(ctx) - defer cancel() - - throttler := newTestThrottler() - - tmClient, ok := throttler.overrideTmClient.(*fakeTMClient) - require.True(t, ok) - assert.Empty(t, tmClient.AppNames()) - tmClient.v20.Store(true) - - t.Run("aggregated initial", func(t *testing.T) { - assert.Equal(t, 0, throttler.aggregatedMetrics.ItemCount()) - }) - - runThrottler(t, ctx, throttler, time.Minute, func(t *testing.T, ctx context.Context) { - defer cancel() // early termination - t.Run("aggregated", func(t *testing.T) { - aggr := throttler.aggregatedMetricsSnapshot() - assert.Equalf(t, 2*len(base.KnownMetricNames), len(aggr), "aggregated: %+v", aggr) // "self" and "shard", per known metric - assert.Equal(t, 2*len(base.KnownMetricNames), throttler.aggregatedMetrics.ItemCount()) // flushed upon Disable() - for aggregatedMetricName, metricResult := range aggr { - assert.NotEmpty(t, aggregatedMetricName) - scope, metricName, err := base.DisaggregateMetricName(aggregatedMetricName) - assert.NotEmpty(t, metricName) - require.NoError(t, err) - - val, metricResultErr := metricResult.Get() - expectMetricNotCollectedYet := false - switch base.Scope(scope) { - case base.SelfScope: - switch metricName { - case base.DefaultMetricName: - assert.Equalf(t, float64(0.3), val, "scope=%v, metricName=%v", scope, metricName) // same value as "lag" - case base.LagMetricName: - assert.Equalf(t, float64(0.3), val, "scope=%v, metricName=%v", scope, metricName) - case base.ThreadsRunningMetricName: - assert.Equalf(t, float64(26), val, "scope=%v, metricName=%v", scope, metricName) - case base.CustomMetricName: - assert.Equalf(t, float64(17), val, "scope=%v, metricName=%v", scope, metricName) - case base.LoadAvgMetricName: - assert.Equalf(t, float64(2.718), val, "scope=%v, metricName=%v", scope, metricName) - } - case base.ShardScope: - // Replicas will nto report named metrics, since they now assume v20 behavior. They will only - // produce the single v20 metric (which we call "default", though they don't advertise it under the name "base.DefaultMetricName") - switch metricName { - case base.DefaultMetricName: - assert.Equalf(t, float64(0.339), val, "scope=%v, metricName=%v", scope, metricName) // same value as "lag" - case base.LagMetricName: - assert.Equalf(t, float64(0.339), val, "scope=%v, metricName=%v", scope, metricName) // - default: - assert.Zero(t, val, "scope=%v, metricName=%v", scope, metricName) - expectMetricNotCollectedYet = true - } - default: - assert.Failf(t, "unknown scope", "scope=%v", scope) - } - if expectMetricNotCollectedYet { - assert.ErrorIs(t, metricResultErr, base.ErrNoResultYet) - } else { - assert.NoErrorf(t, metricResultErr, "aggregatedMetricName: %v", aggregatedMetricName) - } - } - assert.NotEmpty(t, tmClient.AppNames()) - // The throttler here emulates a PRIMARY tablet, and therefore should probe the replicas using - // the "vitess" app name. - uniqueNames := map[string]int{} - for _, appName := range tmClient.AppNames() { - uniqueNames[appName]++ - } - // PRIMARY throttler probes replicas with empty app name, which is then - // interpreted as "vitess" name. - _, ok := uniqueNames[""] - assert.Truef(t, ok, "%+v", uniqueNames) - // And that's the only app we expect to see. - assert.Equalf(t, 1, len(uniqueNames), "%+v", uniqueNames) - }) - }) -} - // TestProbesPostDisable runs the throttler for some time, and then investigates the internal throttler maps and values. func TestProbesPostDisable(t *testing.T) { ctx := context.Background() // for development, replace with ctx := utils.LeakCheckContext(t) @@ -1730,8 +1614,7 @@ func TestDormant(t *testing.T) { assert.True(t, throttler.isDormant()) assert.EqualValues(t, 1, heartbeatWriter.Requests()) // once upon Enable() flags := &CheckFlags{ - Scope: base.SelfScope, - MultiMetricsEnabled: true, + Scope: base.SelfScope, } throttler.Check(ctx, throttlerapp.VitessName.String(), nil, flags) go func() { @@ -1830,14 +1713,12 @@ func TestChecks(t *testing.T) { validateAppNames(t) t.Run("checks, self scope", func(t *testing.T) { flags := &CheckFlags{ - Scope: base.SelfScope, - MultiMetricsEnabled: true, + Scope: base.SelfScope, } t.Run("implicit names", func(t *testing.T) { checkResult := throttler.Check(ctx, testAppName.String(), nil, flags) require.NotNil(t, checkResult) assert.EqualValues(t, 0.3, checkResult.Value) // self lag value - assert.EqualValues(t, http.StatusOK, checkResult.StatusCode) assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode) assert.Equal(t, testAppName.String(), checkResult.AppName) assert.Len(t, checkResult.Metrics, 1) @@ -1846,11 +1727,6 @@ func TestChecks(t *testing.T) { checkResult := throttler.Check(ctx, testAppName.String(), base.KnownMetricNames, flags) require.NotNil(t, checkResult) assert.EqualValues(t, 0.3, checkResult.Value, "unexpected result: %+v", checkResult) // self lag value - if !assert.EqualValues(t, http.StatusOK, checkResult.StatusCode, "unexpected result: %+v", checkResult) { - for k, v := range checkResult.Metrics { - t.Logf("%s: %+v", k, v) - } - } if !assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode, "unexpected result: %+v", checkResult) { for k, v := range checkResult.Metrics { t.Logf("%s: %+v", k, v) @@ -1876,7 +1752,6 @@ func TestChecks(t *testing.T) { // "vitess" app always checks all known metrics. flags := &CheckFlags{ // scope not important for this test - MultiMetricsEnabled: true, } t.Run("implicit names, always all known", func(t *testing.T) { checkResult := throttler.Check(ctx, throttlerapp.VitessName.String(), nil, flags) @@ -1899,14 +1774,12 @@ func TestChecks(t *testing.T) { t.Run("checks, shard scope", func(t *testing.T) { flags := &CheckFlags{ - Scope: base.ShardScope, - MultiMetricsEnabled: true, + Scope: base.ShardScope, } t.Run("implicit names", func(t *testing.T) { checkResult := throttler.Check(ctx, testAppName.String(), nil, flags) require.NotNil(t, checkResult) assert.EqualValues(t, 0.9, checkResult.Value) // shard lag value - assert.NotEqualValues(t, http.StatusOK, checkResult.StatusCode) assert.NotEqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode) assert.ErrorIs(t, checkResult.Error, base.ErrThresholdExceeded) assert.Equal(t, testAppName.String(), checkResult.AppName) @@ -1916,7 +1789,6 @@ func TestChecks(t *testing.T) { checkResult := throttler.Check(ctx, testAppName.String(), base.KnownMetricNames, flags) require.NotNil(t, checkResult) assert.EqualValues(t, 0.9, checkResult.Value) // shard lag value - assert.NotEqualValues(t, http.StatusOK, checkResult.StatusCode) assert.NotEqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode) assert.ErrorIs(t, checkResult.Error, base.ErrThresholdExceeded) assert.Equal(t, testAppName.String(), checkResult.AppName) @@ -1937,13 +1809,11 @@ func TestChecks(t *testing.T) { t.Run("checks, undefined scope", func(t *testing.T) { flags := &CheckFlags{ // Leaving scope undefined, so that each metrics picks its own scope - MultiMetricsEnabled: true, } t.Run("implicit names", func(t *testing.T) { checkResult := throttler.Check(ctx, testAppName.String(), nil, flags) require.NotNil(t, checkResult) assert.EqualValues(t, 0.9, checkResult.Value) // shard lag value - assert.NotEqualValues(t, http.StatusOK, checkResult.StatusCode) assert.NotEqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode) assert.ErrorIs(t, checkResult.Error, base.ErrThresholdExceeded) assert.Len(t, checkResult.Metrics, 1) @@ -1952,7 +1822,6 @@ func TestChecks(t *testing.T) { checkResult := throttler.Check(ctx, testAppName.String(), base.KnownMetricNames, flags) require.NotNil(t, checkResult) assert.EqualValues(t, 0.9, checkResult.Value) // shard lag value - assert.NotEqualValues(t, http.StatusOK, checkResult.StatusCode) assert.NotEqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode) assert.ErrorIs(t, checkResult.Error, base.ErrThresholdExceeded) assert.Equal(t, len(base.KnownMetricNames), len(checkResult.Metrics)) @@ -1974,8 +1843,7 @@ func TestChecks(t *testing.T) { }) t.Run("checks, defined scope masks explicit scope metrics", func(t *testing.T) { flags := &CheckFlags{ - Scope: base.ShardScope, - MultiMetricsEnabled: true, + Scope: base.ShardScope, } t.Run("explicit names", func(t *testing.T) { metricNames := base.MetricNames{ @@ -1992,7 +1860,6 @@ func TestChecks(t *testing.T) { require.NotNil(t, checkResult) assert.EqualValues(t, 0.9, checkResult.Value) // shard lag value - assert.NotEqualValues(t, http.StatusOK, checkResult.StatusCode) assert.NotEqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode) assert.ErrorIs(t, checkResult.Error, base.ErrThresholdExceeded) assert.Equal(t, len(metricNames), len(checkResult.Metrics)) @@ -2012,7 +1879,6 @@ func TestChecks(t *testing.T) { t.Run("checks, undefined scope and explicit scope metrics", func(t *testing.T) { flags := &CheckFlags{ // Leaving scope undefined - MultiMetricsEnabled: true, } t.Run("explicit names", func(t *testing.T) { metricNames := base.MetricNames{ @@ -2024,7 +1890,6 @@ func TestChecks(t *testing.T) { checkResult := throttler.Check(ctx, testAppName.String(), metricNames, flags) require.NotNil(t, checkResult) assert.EqualValues(t, 0.3, checkResult.Value) // explicitly set self lag value - assert.EqualValues(t, http.StatusOK, checkResult.StatusCode) assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode) assert.Equal(t, len(metricNames), len(checkResult.Metrics)) @@ -2061,8 +1926,7 @@ func TestReplica(t *testing.T) { runThrottler(t, ctx, throttler, time.Minute, func(t *testing.T, ctx context.Context) { assert.Empty(t, tmClient.AppNames()) flags := &CheckFlags{ - Scope: base.SelfScope, - MultiMetricsEnabled: true, + Scope: base.SelfScope, } { checkResult := throttler.Check(ctx, throttlerapp.VitessName.String(), nil, flags) @@ -2087,7 +1951,6 @@ func TestReplica(t *testing.T) { checkResult := throttler.Check(ctx, throttlerapp.OnlineDDLName.String(), nil, flags) require.NotNil(t, checkResult) assert.EqualValues(t, 0.3, checkResult.Value) // self lag value - assert.EqualValues(t, http.StatusOK, checkResult.StatusCode) assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode) assert.Len(t, checkResult.Metrics, 1) select { @@ -2105,7 +1968,6 @@ func TestReplica(t *testing.T) { checkResult := throttler.Check(ctx, throttlerapp.OnlineDDLName.String(), nil, flags) require.NotNil(t, checkResult) assert.EqualValues(t, 0.3, checkResult.Value) // self lag value - assert.EqualValues(t, http.StatusOK, checkResult.StatusCode) assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode) assert.Len(t, checkResult.Metrics, 1) assert.True(t, checkResult.RecentlyChecked) @@ -2113,7 +1975,6 @@ func TestReplica(t *testing.T) { { recentApp, ok := throttler.recentAppsSnapshot()[throttlerapp.OnlineDDLName.String()] require.True(t, ok) - assert.EqualValues(t, http.StatusOK, recentApp.StatusCode) assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, recentApp.ResponseCode) } } @@ -2144,29 +2005,9 @@ func TestReplica(t *testing.T) { require.NotNil(t, checkResult) // loadavg value exceeds threshold. This will show up in the check result as an error. assert.EqualValues(t, 2.718, checkResult.Value, "unexpected result: %+v", checkResult) // self lag value - assert.NotEqualValues(t, http.StatusOK, checkResult.StatusCode, "unexpected result: %+v", checkResult) assert.NotEqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode, "unexpected result: %+v", checkResult) assert.Equal(t, len(base.KnownMetricNames), len(checkResult.Metrics)) }) - t.Run("validate v20 non-multi-metric results", func(t *testing.T) { - flags := &CheckFlags{ - Scope: base.SelfScope, - MultiMetricsEnabled: false, - } - checkResult := throttler.Check(ctx, throttlerapp.VitessName.String(), nil, flags) - require.NotNil(t, checkResult) - // loadavg value exceeds threshold. But since "MultiMetricsEnabled: false", the - // throttler, acting as a replica, assumes it's being probed by a v20 primary, and - // therefore does not report any of the multi-metric errors back. It only ever - // reports the default metric. - assert.EqualValues(t, 0.3, checkResult.Value) // self lag value - assert.EqualValues(t, http.StatusOK, checkResult.StatusCode) - assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode) - assert.EqualValues(t, 0.75, checkResult.Threshold) - // The replica will still report the multi-metrics, and that's fine. As long - // as it does not reflect any of their values in the checkResult.Value/StatusCode/Threshold/Error/Message. - assert.Equal(t, len(base.KnownMetricNames), len(checkResult.Metrics)) - }) }) t.Run("metrics", func(t *testing.T) { diff --git a/proto/tabletmanagerdata.proto b/proto/tabletmanagerdata.proto index 9ca4eb11b06..cda173ac044 100644 --- a/proto/tabletmanagerdata.proto +++ b/proto/tabletmanagerdata.proto @@ -824,9 +824,8 @@ message CheckThrottlerRequest { bool skip_request_heartbeats = 3; // OKIfNotExists asks the throttler to return OK even if the metric does not exist bool ok_if_not_exists = 4; - // MultiMetricsEnabled is always set to "true" and is how a multi-metrics enabled replica - // throttler knows its being probed by a multi-metrics enabled primary vttablet. - bool multi_metrics_enabled = 5; + reserved 5; // used to be multi_metrics_enabled, introduced in v21 for backwards compatibility, and removed in v22 + reserved "multi_metrics_enabled"; } enum CheckThrottlerResponseCode { @@ -839,8 +838,8 @@ enum CheckThrottlerResponseCode { } message CheckThrottlerResponse { - // StatusCode is HTTP compliant response code (e.g. 200 for OK) - int32 status_code = 1; + reserved 1; // was `status_code`, HTTP compliant, deprecated + reserved "status_code"; // Value is the metric value collected by the tablet double value = 2; // Threshold is the throttling threshold the table was comparing the value with @@ -856,8 +855,7 @@ message CheckThrottlerResponse { message Metric { // Name of the metric string name = 1; - // StatusCode is HTTP compliant response code (e.g. 200 for OK) - int32 status_code = 2; + reserved 2; // was `status_code`, HTTP compliant, deprecated // Value is the metric value collected by the tablet double value = 3; // Threshold is the throttling threshold the table was comparing the value with @@ -940,7 +938,7 @@ message GetThrottlerStatusResponse { message RecentApp { vttime.Time checked_at = 1; - int32 status_code = 2; + reserved 2; // was HTTP `status_code`, deprecated // ResponseCode is the enum representation of the response CheckThrottlerResponseCode response_code = 3; } diff --git a/web/vtadmin/src/proto/vtadmin.d.ts b/web/vtadmin/src/proto/vtadmin.d.ts index 2175e3508f4..527adc01326 100644 --- a/web/vtadmin/src/proto/vtadmin.d.ts +++ b/web/vtadmin/src/proto/vtadmin.d.ts @@ -35130,9 +35130,6 @@ export namespace tabletmanagerdata { /** CheckThrottlerRequest ok_if_not_exists */ ok_if_not_exists?: (boolean|null); - - /** CheckThrottlerRequest multi_metrics_enabled */ - multi_metrics_enabled?: (boolean|null); } /** Represents a CheckThrottlerRequest. */ @@ -35156,9 +35153,6 @@ export namespace tabletmanagerdata { /** CheckThrottlerRequest ok_if_not_exists. */ public ok_if_not_exists: boolean; - /** CheckThrottlerRequest multi_metrics_enabled. */ - public multi_metrics_enabled: boolean; - /** * Creates a new CheckThrottlerRequest instance using the specified properties. * @param [properties] Properties to set @@ -35250,9 +35244,6 @@ export namespace tabletmanagerdata { /** Properties of a CheckThrottlerResponse. */ interface ICheckThrottlerResponse { - /** CheckThrottlerResponse status_code */ - status_code?: (number|null); - /** CheckThrottlerResponse value */ value?: (number|null); @@ -35290,9 +35281,6 @@ export namespace tabletmanagerdata { */ constructor(properties?: tabletmanagerdata.ICheckThrottlerResponse); - /** CheckThrottlerResponse status_code. */ - public status_code: number; - /** CheckThrottlerResponse value. */ public value: number; @@ -35406,9 +35394,6 @@ export namespace tabletmanagerdata { /** Metric name */ name?: (string|null); - /** Metric status_code */ - status_code?: (number|null); - /** Metric value */ value?: (number|null); @@ -35440,9 +35425,6 @@ export namespace tabletmanagerdata { /** Metric name. */ public name: string; - /** Metric status_code. */ - public status_code: number; - /** Metric value. */ public value: number; @@ -36044,9 +36026,6 @@ export namespace tabletmanagerdata { /** RecentApp checked_at */ checked_at?: (vttime.ITime|null); - /** RecentApp status_code */ - status_code?: (number|null); - /** RecentApp response_code */ response_code?: (tabletmanagerdata.CheckThrottlerResponseCode|null); } @@ -36063,9 +36042,6 @@ export namespace tabletmanagerdata { /** RecentApp checked_at. */ public checked_at?: (vttime.ITime|null); - /** RecentApp status_code. */ - public status_code: number; - /** RecentApp response_code. */ public response_code: tabletmanagerdata.CheckThrottlerResponseCode; diff --git a/web/vtadmin/src/proto/vtadmin.js b/web/vtadmin/src/proto/vtadmin.js index 17a941acfcf..1209c59cbe9 100644 --- a/web/vtadmin/src/proto/vtadmin.js +++ b/web/vtadmin/src/proto/vtadmin.js @@ -81562,7 +81562,6 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { * @property {string|null} [scope] CheckThrottlerRequest scope * @property {boolean|null} [skip_request_heartbeats] CheckThrottlerRequest skip_request_heartbeats * @property {boolean|null} [ok_if_not_exists] CheckThrottlerRequest ok_if_not_exists - * @property {boolean|null} [multi_metrics_enabled] CheckThrottlerRequest multi_metrics_enabled */ /** @@ -81612,14 +81611,6 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { */ CheckThrottlerRequest.prototype.ok_if_not_exists = false; - /** - * CheckThrottlerRequest multi_metrics_enabled. - * @member {boolean} multi_metrics_enabled - * @memberof tabletmanagerdata.CheckThrottlerRequest - * @instance - */ - CheckThrottlerRequest.prototype.multi_metrics_enabled = false; - /** * Creates a new CheckThrottlerRequest instance using the specified properties. * @function create @@ -81652,8 +81643,6 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { writer.uint32(/* id 3, wireType 0 =*/24).bool(message.skip_request_heartbeats); if (message.ok_if_not_exists != null && Object.hasOwnProperty.call(message, "ok_if_not_exists")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.ok_if_not_exists); - if (message.multi_metrics_enabled != null && Object.hasOwnProperty.call(message, "multi_metrics_enabled")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.multi_metrics_enabled); return writer; }; @@ -81704,10 +81693,6 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { message.ok_if_not_exists = reader.bool(); break; } - case 5: { - message.multi_metrics_enabled = reader.bool(); - break; - } default: reader.skipType(tag & 7); break; @@ -81755,9 +81740,6 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { if (message.ok_if_not_exists != null && message.hasOwnProperty("ok_if_not_exists")) if (typeof message.ok_if_not_exists !== "boolean") return "ok_if_not_exists: boolean expected"; - if (message.multi_metrics_enabled != null && message.hasOwnProperty("multi_metrics_enabled")) - if (typeof message.multi_metrics_enabled !== "boolean") - return "multi_metrics_enabled: boolean expected"; return null; }; @@ -81781,8 +81763,6 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { message.skip_request_heartbeats = Boolean(object.skip_request_heartbeats); if (object.ok_if_not_exists != null) message.ok_if_not_exists = Boolean(object.ok_if_not_exists); - if (object.multi_metrics_enabled != null) - message.multi_metrics_enabled = Boolean(object.multi_metrics_enabled); return message; }; @@ -81804,7 +81784,6 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { object.scope = ""; object.skip_request_heartbeats = false; object.ok_if_not_exists = false; - object.multi_metrics_enabled = false; } if (message.app_name != null && message.hasOwnProperty("app_name")) object.app_name = message.app_name; @@ -81814,8 +81793,6 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { object.skip_request_heartbeats = message.skip_request_heartbeats; if (message.ok_if_not_exists != null && message.hasOwnProperty("ok_if_not_exists")) object.ok_if_not_exists = message.ok_if_not_exists; - if (message.multi_metrics_enabled != null && message.hasOwnProperty("multi_metrics_enabled")) - object.multi_metrics_enabled = message.multi_metrics_enabled; return object; }; @@ -81876,7 +81853,6 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { * Properties of a CheckThrottlerResponse. * @memberof tabletmanagerdata * @interface ICheckThrottlerResponse - * @property {number|null} [status_code] CheckThrottlerResponse status_code * @property {number|null} [value] CheckThrottlerResponse value * @property {number|null} [threshold] CheckThrottlerResponse threshold * @property {string|null} [error] CheckThrottlerResponse error @@ -81904,14 +81880,6 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { this[keys[i]] = properties[keys[i]]; } - /** - * CheckThrottlerResponse status_code. - * @member {number} status_code - * @memberof tabletmanagerdata.CheckThrottlerResponse - * @instance - */ - CheckThrottlerResponse.prototype.status_code = 0; - /** * CheckThrottlerResponse value. * @member {number} value @@ -82008,8 +81976,6 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { CheckThrottlerResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.status_code != null && Object.hasOwnProperty.call(message, "status_code")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.status_code); if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 2, wireType 1 =*/17).double(message.value); if (message.threshold != null && Object.hasOwnProperty.call(message, "threshold")) @@ -82065,10 +82031,6 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.status_code = reader.int32(); - break; - } case 2: { message.value = reader.double(); break; @@ -82159,9 +82121,6 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { CheckThrottlerResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.status_code != null && message.hasOwnProperty("status_code")) - if (!$util.isInteger(message.status_code)) - return "status_code: integer expected"; if (message.value != null && message.hasOwnProperty("value")) if (typeof message.value !== "number") return "value: number expected"; @@ -82220,8 +82179,6 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { if (object instanceof $root.tabletmanagerdata.CheckThrottlerResponse) return object; let message = new $root.tabletmanagerdata.CheckThrottlerResponse(); - if (object.status_code != null) - message.status_code = object.status_code | 0; if (object.value != null) message.value = Number(object.value); if (object.threshold != null) @@ -82297,7 +82254,6 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { if (options.objects || options.defaults) object.metrics = {}; if (options.defaults) { - object.status_code = 0; object.value = 0; object.threshold = 0; object.error = ""; @@ -82307,8 +82263,6 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { object.summary = ""; object.response_code = options.enums === String ? "UNDEFINED" : 0; } - if (message.status_code != null && message.hasOwnProperty("status_code")) - object.status_code = message.status_code; if (message.value != null && message.hasOwnProperty("value")) object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; if (message.threshold != null && message.hasOwnProperty("threshold")) @@ -82367,7 +82321,6 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { * @memberof tabletmanagerdata.CheckThrottlerResponse * @interface IMetric * @property {string|null} [name] Metric name - * @property {number|null} [status_code] Metric status_code * @property {number|null} [value] Metric value * @property {number|null} [threshold] Metric threshold * @property {string|null} [error] Metric error @@ -82399,14 +82352,6 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { */ Metric.prototype.name = ""; - /** - * Metric status_code. - * @member {number} status_code - * @memberof tabletmanagerdata.CheckThrottlerResponse.Metric - * @instance - */ - Metric.prototype.status_code = 0; - /** * Metric value. * @member {number} value @@ -82481,8 +82426,6 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.status_code != null && Object.hasOwnProperty.call(message, "status_code")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.status_code); if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 3, wireType 1 =*/25).double(message.value); if (message.threshold != null && Object.hasOwnProperty.call(message, "threshold")) @@ -82533,10 +82476,6 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { message.name = reader.string(); break; } - case 2: { - message.status_code = reader.int32(); - break; - } case 3: { message.value = reader.double(); break; @@ -82599,9 +82538,6 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.status_code != null && message.hasOwnProperty("status_code")) - if (!$util.isInteger(message.status_code)) - return "status_code: integer expected"; if (message.value != null && message.hasOwnProperty("value")) if (typeof message.value !== "number") return "value: number expected"; @@ -82646,8 +82582,6 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { let message = new $root.tabletmanagerdata.CheckThrottlerResponse.Metric(); if (object.name != null) message.name = String(object.name); - if (object.status_code != null) - message.status_code = object.status_code | 0; if (object.value != null) message.value = Number(object.value); if (object.threshold != null) @@ -82708,7 +82642,6 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { let object = {}; if (options.defaults) { object.name = ""; - object.status_code = 0; object.value = 0; object.threshold = 0; object.error = ""; @@ -82718,8 +82651,6 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.status_code != null && message.hasOwnProperty("status_code")) - object.status_code = message.status_code; if (message.value != null && message.hasOwnProperty("value")) object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; if (message.threshold != null && message.hasOwnProperty("threshold")) @@ -84249,7 +84180,6 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { * @memberof tabletmanagerdata.GetThrottlerStatusResponse * @interface IRecentApp * @property {vttime.ITime|null} [checked_at] RecentApp checked_at - * @property {number|null} [status_code] RecentApp status_code * @property {tabletmanagerdata.CheckThrottlerResponseCode|null} [response_code] RecentApp response_code */ @@ -84276,14 +84206,6 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { */ RecentApp.prototype.checked_at = null; - /** - * RecentApp status_code. - * @member {number} status_code - * @memberof tabletmanagerdata.GetThrottlerStatusResponse.RecentApp - * @instance - */ - RecentApp.prototype.status_code = 0; - /** * RecentApp response_code. * @member {tabletmanagerdata.CheckThrottlerResponseCode} response_code @@ -84318,8 +84240,6 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { writer = $Writer.create(); if (message.checked_at != null && Object.hasOwnProperty.call(message, "checked_at")) $root.vttime.Time.encode(message.checked_at, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.status_code != null && Object.hasOwnProperty.call(message, "status_code")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.status_code); if (message.response_code != null && Object.hasOwnProperty.call(message, "response_code")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.response_code); return writer; @@ -84360,10 +84280,6 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { message.checked_at = $root.vttime.Time.decode(reader, reader.uint32()); break; } - case 2: { - message.status_code = reader.int32(); - break; - } case 3: { message.response_code = reader.int32(); break; @@ -84408,9 +84324,6 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { if (error) return "checked_at." + error; } - if (message.status_code != null && message.hasOwnProperty("status_code")) - if (!$util.isInteger(message.status_code)) - return "status_code: integer expected"; if (message.response_code != null && message.hasOwnProperty("response_code")) switch (message.response_code) { default: @@ -84443,8 +84356,6 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { throw TypeError(".tabletmanagerdata.GetThrottlerStatusResponse.RecentApp.checked_at: object expected"); message.checked_at = $root.vttime.Time.fromObject(object.checked_at); } - if (object.status_code != null) - message.status_code = object.status_code | 0; switch (object.response_code) { default: if (typeof object.response_code === "number") { @@ -84495,13 +84406,10 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { let object = {}; if (options.defaults) { object.checked_at = null; - object.status_code = 0; object.response_code = options.enums === String ? "UNDEFINED" : 0; } if (message.checked_at != null && message.hasOwnProperty("checked_at")) object.checked_at = $root.vttime.Time.toObject(message.checked_at, options); - if (message.status_code != null && message.hasOwnProperty("status_code")) - object.status_code = message.status_code; if (message.response_code != null && message.hasOwnProperty("response_code")) object.response_code = options.enums === String ? $root.tabletmanagerdata.CheckThrottlerResponseCode[message.response_code] === undefined ? message.response_code : $root.tabletmanagerdata.CheckThrottlerResponseCode[message.response_code] : message.response_code; return object;