diff --git a/pkg/dataset/sort_merge_join.go b/pkg/dataset/sort_merge_join.go index 6b583d71..8b57abcd 100644 --- a/pkg/dataset/sort_merge_join.go +++ b/pkg/dataset/sort_merge_join.go @@ -24,7 +24,9 @@ import ( import ( "github.com/pkg/errors" + "github.com/spf13/cast" + "go.uber.org/atomic" ) diff --git a/pkg/runtime/conn_pool_test.go b/pkg/runtime/conn_pool_test.go index 6bcb273e..9769fe44 100644 --- a/pkg/runtime/conn_pool_test.go +++ b/pkg/runtime/conn_pool_test.go @@ -20,11 +20,17 @@ package runtime import ( "context" "fmt" - "github.com/arana-db/arana/pkg/mysql" - "github.com/stretchr/testify/assert" "testing" ) +import ( + "github.com/stretchr/testify/assert" +) + +import ( + "github.com/arana-db/arana/pkg/mysql" +) + func TestBackendResourcePool_Get(t *testing.T) { type args struct { ctx context.Context diff --git a/pkg/runtime/plan/dal/show_index.go b/pkg/runtime/plan/dal/show_index.go index fd9618e2..9fa3c3bf 100644 --- a/pkg/runtime/plan/dal/show_index.go +++ b/pkg/runtime/plan/dal/show_index.go @@ -63,6 +63,7 @@ func (s *ShowIndexPlan) ExecIn(ctx context.Context, conn proto.VConn) (proto.Res } db, table := s.Shards.Smallest() + toTable := s.Stmt.TableName.Suffix() s.Stmt.TableName = ast.TableName{table} if err = s.Stmt.Restore(ast.RestoreDefault, &sb, &indexes); err != nil { @@ -84,8 +85,6 @@ func (s *ShowIndexPlan) ExecIn(ctx context.Context, conn proto.VConn) (proto.Res return nil, errors.WithStack(err) } - toTable := s.Stmt.TableName.Suffix() - ds = dataset.Pipe(ds, dataset.Map(nil, func(next proto.Row) (proto.Row, error) { dest := make([]proto.Value, len(fields)) diff --git a/pkg/runtime/tx_test.go b/pkg/runtime/tx_test.go index 1d72ffd3..19832e1e 100644 --- a/pkg/runtime/tx_test.go +++ b/pkg/runtime/tx_test.go @@ -21,13 +21,20 @@ import ( "context" "database/sql" "fmt" + "testing" + "time" +) + +import ( + "github.com/stretchr/testify/assert" + + "go.uber.org/atomic" +) + +import ( "github.com/arana-db/arana/pkg/mysql" "github.com/arana-db/arana/pkg/proto" "github.com/arana-db/arana/pkg/runtime/gtid" - "github.com/stretchr/testify/assert" - "go.uber.org/atomic" - "testing" - "time" ) func Test_branchTx_CallFieldList(t *testing.T) {