diff --git a/go/vt/vtgate/sandbox_test.go b/go/vt/vtgate/sandbox_test.go index d918f4d3cb..d76b42edeb 100644 --- a/go/vt/vtgate/sandbox_test.go +++ b/go/vt/vtgate/sandbox_test.go @@ -189,7 +189,7 @@ func sandboxDialer(context interface{}, endPoint topo.EndPoint, keyspace, shard return tconn, nil } -func mapTestConn(shard string, conn TabletConn) { +func mapTestConn(shard string, conn tabletconn.TabletConn) { uid, err := getUidForShard(shard) if err != nil { panic(err) diff --git a/go/vt/vtgate/vtgate.go b/go/vt/vtgate/vtgate.go index d142c1055f..49034d6145 100644 --- a/go/vt/vtgate/vtgate.go +++ b/go/vt/vtgate/vtgate.go @@ -12,6 +12,7 @@ import ( log "github.com/golang/glog" mproto "github.com/youtube/vitess/go/mysql/proto" + "github.com/youtube/vitess/go/vt/key" "github.com/youtube/vitess/go/vt/vtgate/proto" ) @@ -116,13 +117,13 @@ func (vtg *VTGate) mapKrToShardsForStreaming(streamQuery *proto.StreamQueryKeyRa // and one shard since it cannot merge-sort the results to guarantee ordering of // response which is needed for checkpointing. The api supports supplying multiple keyranges // to make it future proof. -func (vtg *VTGate) StreamExecuteKeyRange(context *rpcproto.Context, streamQuery *proto.StreamQueryKeyRange, sendReply func(*proto.QueryResult) error) error { +func (vtg *VTGate) StreamExecuteKeyRange(context interface{}, streamQuery *proto.StreamQueryKeyRange, sendReply func(*proto.QueryResult) error) error { shards, err := vtg.mapKrToShardsForStreaming(streamQuery) if err != nil { return err } - err := vtg.scatterConn.StreamExecute( + err = vtg.scatterConn.StreamExecute( context, streamQuery.Sql, streamQuery.BindVariables, diff --git a/go/vt/vtgate/vtgate_test.go b/go/vt/vtgate/vtgate_test.go index 79af2d9877..9b0a96ded9 100644 --- a/go/vt/vtgate/vtgate_test.go +++ b/go/vt/vtgate/vtgate_test.go @@ -165,8 +165,8 @@ func TestVTGateStreamExecuteKeyRange(t *testing.T) { // Test for error condition - multiple shards sq.KeyRange = "10-40" - err = RpcVTGate.StreamExecuteKeyRange(nil, &sq, func(r interface{}) error { - qrs = append(qrs, r.(*proto.QueryResult)) + err = RpcVTGate.StreamExecuteKeyRange(nil, &sq, func(r *proto.QueryResult) error { + qrs = append(qrs, r) return nil }) if err == nil { @@ -174,8 +174,8 @@ func TestVTGateStreamExecuteKeyRange(t *testing.T) { } // Test for error condition - multiple shards, non-partial keyspace sq.KeyRange = "" - err = RpcVTGate.StreamExecuteKeyRange(nil, &sq, func(r interface{}) error { - qrs = append(qrs, r.(*proto.QueryResult)) + err = RpcVTGate.StreamExecuteKeyRange(nil, &sq, func(r *proto.QueryResult) error { + qrs = append(qrs, r) return nil }) if err == nil {