Repository: milvus-io/milvus-sdk-go
Pull request #485 (2023-06-07 11:48:23)

Use milvus-proto/go-api/v2
/kind improvement
See also milvus-io/milvus#24717

codecov[bot]: ## [Codecov](https://app.codecov.io/gh/milvus-io/milvus-sdk-go/pull/485?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io) Report
> Merging [#485](https://app.codecov.io/gh/milvus-io/milvus-sdk-go/pull/485?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io) (d42ae33) into [v2.2.x](https://app.codecov.io/gh/milvus-io/milvus-sdk-go/commit/a40e538364232ac6568563416c1fdf32cc903a2c?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io) (a40e538) will **not change** coverage.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://app.codecov.io/gh/milvus-io/milvus-sdk-go/pull/485/graphs/tree.svg?width=650&height=150&src=pr&token=WJK43PV390&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io)](https://app.codecov.io/gh/milvus-io/milvus-sdk-go/pull/485?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io)

```diff
@@           Coverage Diff           @@
##           v2.2.x     #485   +/-   ##
=======================================
  Coverage   80.74%   80.74%           
=======================================
  Files          33       33           
  Lines        2727     2727           
=======================================
  Hits         2202     2202           
  Misses        419      419           
  Partials      106      106           
```


| [Impacted Files](https://app.codecov.io/gh/milvus-io/milvus-sdk-go/pull/485?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io) | Coverage Δ | |
|---|---|---|
| [client/admin.go](https://app.codecov.io/gh/milvus-io/milvus-sdk-go/pull/485?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io#diff-Y2xpZW50L2FkbWluLmdv) | `83.33% <ø> (ø)` | |
| [client/alias.go](https://app.codecov.io/gh/milvus-io/milvus-sdk-go/pull/485?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io#diff-Y2xpZW50L2FsaWFzLmdv) | `100.00% <ø> (ø)` | |
| [client/authentication.go](https://app.codecov.io/gh/milvus-io/milvus-sdk-go/pull/485?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io#diff-Y2xpZW50L2F1dGhlbnRpY2F0aW9uLmdv) | `100.00% <ø> (ø)` | |
| [client/collection.go](https://app.codecov.io/gh/milvus-io/milvus-sdk-go/pull/485?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io#diff-Y2xpZW50L2NvbGxlY3Rpb24uZ28=) | `81.81% <ø> (ø)` | |
| [client/data.go](https://app.codecov.io/gh/milvus-io/milvus-sdk-go/pull/485?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io#diff-Y2xpZW50L2RhdGEuZ28=) | `68.85% <ø> (ø)` | |
| [client/database.go](https://app.codecov.io/gh/milvus-io/milvus-sdk-go/pull/485?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io#diff-Y2xpZW50L2RhdGFiYXNlLmdv) | `92.85% <ø> (ø)` | |
| [client/index.go](https://app.codecov.io/gh/milvus-io/milvus-sdk-go/pull/485?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io#diff-Y2xpZW50L2luZGV4Lmdv) | `77.95% <ø> (ø)` | |
| [client/insert.go](https://app.codecov.io/gh/milvus-io/milvus-sdk-go/pull/485?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io#diff-Y2xpZW50L2luc2VydC5nbw==) | `78.44% <ø> (ø)` | |
| [client/maintainance.go](https://app.codecov.io/gh/milvus-io/milvus-sdk-go/pull/485?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io#diff-Y2xpZW50L21haW50YWluYW5jZS5nbw==) | `95.55% <ø> (ø)` | |
| [client/options.go](https://app.codecov.io/gh/milvus-io/milvus-sdk-go/pull/485?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io#diff-Y2xpZW50L29wdGlvbnMuZ28=) | `62.96% <ø> (ø)` | |
| ... and [11 more](https://app.codecov.io/gh/milvus-io/milvus-sdk-go/pull/485?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io) | |

sre-ci-robot: [APPROVALNOTIFIER] This PR is **APPROVED**

This pull-request has been approved by: *<a href="https://github.com/milvus-io/milvus-sdk-go/pull/485#" title="Author self-approved">congqixia</a>*, *<a href="https://github.com/milvus-io/milvus-sdk-go/pull/485#pullrequestreview-1468869781" title="LGTM">yah01</a>*

The full list of commands accepted by this bot can be found [here](https://go.k8s.io/bot-commands?repo=milvus-io%2Fmilvus-sdk-go).

The pull request process is described [here](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process)

<details >
Needs approval from an approver in each of these files:

- ~~[OWNERS](https://github.com/milvus-io/milvus-sdk-go/blob/v2.2.x/OWNERS)~~ [congqixia]

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":[]} -->

Patch:
diff --git a/client/admin.go b/client/admin.go
index 49527de..11baf4e 100644
--- a/client/admin.go
+++ b/client/admin.go
@@ -14,7 +14,7 @@ package client
 import (
 	"context"
 
-	server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
+	server "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
 )
 
 func (c *GrpcClient) GetVersion(ctx context.Context) (string, error) {
diff --git a/client/alias.go b/client/alias.go
index 9a29fd4..c0bd410 100644
--- a/client/alias.go
+++ b/client/alias.go
@@ -19,7 +19,7 @@ package client
 import (
 	"context"
 
-	server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
+	server "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
 )
 
 // CreateAlias creates an alias for collection
diff --git a/client/authentication.go b/client/authentication.go
index fc844ac..e407529 100644
--- a/client/authentication.go
+++ b/client/authentication.go
@@ -3,7 +3,7 @@ package client
 import (
 	"context"
 
-	server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
+	server "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
 	"github.com/milvus-io/milvus-sdk-go/v2/internal/utils/crypto"
 )
 
diff --git a/client/collection.go b/client/collection.go
index a668c60..7222f2f 100644
--- a/client/collection.go
+++ b/client/collection.go
@@ -20,8 +20,8 @@ import (
 
 	"github.com/cockroachdb/errors"
 	"github.com/golang/protobuf/proto"
-	common "github.com/milvus-io/milvus-proto/go-api/commonpb"
-	server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
+	common "github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
+	server "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
 	"google.golang.org/grpc"
 	"google.golang.org/grpc/codes"
 	"google.golang.org/grpc/status"
diff --git a/client/data.go b/client/data.go
index dac5c61..32b287b 100644
--- a/client/data.go
+++ b/client/data.go
@@ -21,9 +21,9 @@ import (
 
 	"github.com/cockroachdb/errors"
 
-	common "github.com/milvus-io/milvus-proto/go-api/commonpb"
-	server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
-	schema "github.com/milvus-io/milvus-proto/go-api/schemapb"
+	common "github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
+	server "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
+	schema "github.com/milvus-io/milvus-proto/go-api/v2/schemapb"
 	"github.com/milvus-io/milvus-sdk-go/v2/entity"
 )
 
diff --git a/client/database.go b/client/database.go
index 96db83e..70e031c 100644
--- a/client/database.go
+++ b/client/database.go
@@ -19,7 +19,7 @@ package client
 import (
 	"context"
 
-	server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
+	server "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
 
 	"github.com/milvus-io/milvus-sdk-go/v2/entity"
 )
diff --git a/client/index.go b/client/index.go
index 9c8fd4c..c7c0ac0 100644
--- a/client/index.go
+++ b/client/index.go
@@ -16,8 +16,8 @@ import (
 	"fmt"
 	"time"
 
-	common "github.com/milvus-io/milvus-proto/go-api/commonpb"
-	server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
+	common "github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
+	server "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
 	"github.com/milvus-io/milvus-sdk-go/v2/entity"
 )
 
diff --git a/client/insert.go b/client/insert.go
index e015ec1..6bb279f 100644
--- a/client/insert.go
+++ b/client/insert.go
@@ -19,9 +19,9 @@ import (
 
 	"github.com/cockroachdb/errors"
 	"github.com/golang/protobuf/proto"
-	common "github.com/milvus-io/milvus-proto/go-api/commonpb"
-	server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
-	schema "github.com/milvus-io/milvus-proto/go-api/schemapb"
+	common "github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
+	server "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
+	schema "github.com/milvus-io/milvus-proto/go-api/v2/schemapb"
 
 	"github.com/milvus-io/milvus-sdk-go/v2/entity"
 )
diff --git a/client/maintainance.go b/client/maintainance.go
index 757638e..0af2735 100644
--- a/client/maintainance.go
+++ b/client/maintainance.go
@@ -20,7 +20,7 @@ import (
 	"context"
 	"time"
 
-	server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
+	server "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
 	"github.com/milvus-io/milvus-sdk-go/v2/entity"
 	"github.com/milvus-io/milvus-sdk-go/v2/internal/utils/tso"
 )
diff --git a/client/options.go b/client/options.go
index 571e0b9..2bfcf41 100644
--- a/client/options.go
+++ b/client/options.go
@@ -15,7 +15,7 @@ import (
 	"errors"
 	"fmt"
 
-	server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
+	server "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
 	"github.com/milvus-io/milvus-sdk-go/v2/entity"
 )
 
diff --git a/client/partition.go b/client/partition.go
index 0ed1762..ba34d62 100644
--- a/client/partition.go
+++ b/client/partition.go
@@ -17,8 +17,8 @@ import (
 	"fmt"
 	"time"
 
-	common "github.com/milvus-io/milvus-proto/go-api/commonpb"
-	server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
+	common "github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
+	server "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
 	"github.com/milvus-io/milvus-sdk-go/v2/entity"
 )
 
diff --git a/client/rate_limit_interceptor.go b/client/rate_limit_interceptor.go
index eeaeb4c..d59f847 100644
--- a/client/rate_limit_interceptor.go
+++ b/client/rate_limit_interceptor.go
@@ -25,8 +25,8 @@ import (
 	"google.golang.org/grpc/status"
 
 	grpc_retry "github.com/grpc-ecosystem/go-grpc-middleware/retry"
-	common "github.com/milvus-io/milvus-proto/go-api/commonpb"
-	server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
+	common "github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
+	server "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
 )
 
 // ref: https://github.com/grpc-ecosystem/go-grpc-middleware
diff --git a/client/rbac.go b/client/rbac.go
index 2dad952..70acb2a 100644
--- a/client/rbac.go
+++ b/client/rbac.go
@@ -19,8 +19,8 @@ package client
 import (
 	"context"
 
-	common "github.com/milvus-io/milvus-proto/go-api/commonpb"
-	server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
+	common "github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
+	server "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
 	"github.com/milvus-io/milvus-sdk-go/v2/entity"
 )
 
diff --git a/client/resource_group.go b/client/resource_group.go
index cb4d99f..b957d39 100644
--- a/client/resource_group.go
+++ b/client/resource_group.go
@@ -14,7 +14,7 @@ package client
 import (
 	"context"
 
-	server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
+	server "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
 	"github.com/milvus-io/milvus-sdk-go/v2/entity"
 )
 
diff --git a/client/row.go b/client/row.go
index 685a319..c1cd4bb 100644
--- a/client/row.go
+++ b/client/row.go
@@ -8,8 +8,8 @@ import (
 	"github.com/cockroachdb/errors"
 
 	"github.com/golang/protobuf/proto"
-	server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
-	schema "github.com/milvus-io/milvus-proto/go-api/schemapb"
+	server "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
+	schema "github.com/milvus-io/milvus-proto/go-api/v2/schemapb"
 	"github.com/milvus-io/milvus-sdk-go/v2/entity"
 )
 
diff --git a/entity/columns.go b/entity/columns.go
index 2a7b0c0..3cc71fb 100644
--- a/entity/columns.go
+++ b/entity/columns.go
@@ -17,7 +17,7 @@ import (
 	"math"
 
 	"github.com/cockroachdb/errors"
-	schema "github.com/milvus-io/milvus-proto/go-api/schemapb"
+	schema "github.com/milvus-io/milvus-proto/go-api/v2/schemapb"
 )
 
 //go:generate go run gen/gen.go
diff --git a/entity/columns_json.go b/entity/columns_json.go
index 8cb2226..8b03518 100644
--- a/entity/columns_json.go
+++ b/entity/columns_json.go
@@ -4,7 +4,7 @@ import (
 	"fmt"
 
 	"github.com/cockroachdb/errors"
-	schema "github.com/milvus-io/milvus-proto/go-api/schemapb"
+	schema "github.com/milvus-io/milvus-proto/go-api/v2/schemapb"
 )
 
 var _ (Column) = (*ColumnJSONBytes)(nil)
diff --git a/entity/columns_scalar_gen.go b/entity/columns_scalar_gen.go
index d375ae5..69b12e9 100755
--- a/entity/columns_scalar_gen.go
+++ b/entity/columns_scalar_gen.go
@@ -1,13 +1,13 @@
 // Code generated by go generate; DO NOT EDIT
 // This file is generated by go generate
 
-package entity 
+package entity
 
 import (
 	"fmt"
 
 	"github.com/cockroachdb/errors"
-	schema "github.com/milvus-io/milvus-proto/go-api/schemapb"
+	schema "github.com/milvus-io/milvus-proto/go-api/v2/schemapb"
 )
 
 // ColumnBool generated columns type for Bool
@@ -44,11 +44,11 @@ func (c *ColumnBool) Get(idx int) (interface{}, error) {
 // FieldData return column data mapped to schema.FieldData
 func (c *ColumnBool) FieldData() *schema.FieldData {
 	fd := &schema.FieldData{
-		Type: schema.DataType_Bool,
+		Type:      schema.DataType_Bool,
 		FieldName: c.name,
 	}
 	data := make([]bool, 0, c.Len())
-	for i := 0 ;i < c.Len(); i++ {
+	for i := 0; i < c.Len(); i++ {
 		data = append(data, bool(c.values[i]))
 	}
 	fd.Field = &schema.FieldData_Scalars{
@@ -74,7 +74,7 @@ func (c *ColumnBool) ValueByIdx(idx int) (bool, error) {
 }
 
 // AppendValue append value into column
-func(c *ColumnBool) AppendValue(i interface{}) error {
+func (c *ColumnBool) AppendValue(i interface{}) error {
 	v, ok := i.(bool)
 	if !ok {
 		return fmt.Errorf("invalid type, expected bool, got %T", i)
@@ -91,8 +91,8 @@ func (c *ColumnBool) Data() []bool {
 
 // NewColumnBool auto generated constructor
 func NewColumnBool(name string, values []bool) *ColumnBool {
-	return &ColumnBool {
-		name: name,
+	return &ColumnBool{
+		name:   name,
 		values: values,
 	}
 }
@@ -131,11 +131,11 @@ func (c *ColumnInt8) Get(idx int) (interface{}, error) {
 // FieldData return column data mapped to schema.FieldData
 func (c *ColumnInt8) FieldData() *schema.FieldData {
 	fd := &schema.FieldData{
-		Type: schema.DataType_Int8,
+		Type:      schema.DataType_Int8,
 		FieldName: c.name,
 	}
 	data := make([]int32, 0, c.Len())
-	for i := 0 ;i < c.Len(); i++ {
+	for i := 0; i < c.Len(); i++ {
 		data = append(data, int32(c.values[i]))
 	}
 	fd.Field = &schema.FieldData_Scalars{
@@ -161,7 +161,7 @@ func (c *ColumnInt8) ValueByIdx(idx int) (int8, error) {
 }
 
 // AppendValue append value into column
-func(c *ColumnInt8) AppendValue(i interface{}) error {
+func (c *ColumnInt8) AppendValue(i interface{}) error {
 	v, ok := i.(int8)
 	if !ok {
 		return fmt.Errorf("invalid type, expected int8, got %T", i)
@@ -178,8 +178,8 @@ func (c *ColumnInt8) Data() []int8 {
 
 // NewColumnInt8 auto generated constructor
 func NewColumnInt8(name string, values []int8) *ColumnInt8 {
-	return &ColumnInt8 {
-		name: name,
+	return &ColumnInt8{
+		name:   name,
 		values: values,
 	}
 }
@@ -218,11 +218,11 @@ func (c *ColumnInt16) Get(idx int) (interface{}, error) {
 // FieldData return column data mapped to schema.FieldData
 func (c *ColumnInt16) FieldData() *schema.FieldData {
 	fd := &schema.FieldData{
-		Type: schema.DataType_Int16,
+		Type:      schema.DataType_Int16,
 		FieldName: c.name,
 	}
 	data := make([]int32, 0, c.Len())
-	for i := 0 ;i < c.Len(); i++ {
+	for i := 0; i < c.Len(); i++ {
 		data = append(data, int32(c.values[i]))
 	}
 	fd.Field = &schema.FieldData_Scalars{
@@ -248,7 +248,7 @@ func (c *ColumnInt16) ValueByIdx(idx int) (int16, error) {
 }
 
 // AppendValue append value into column
-func(c *ColumnInt16) AppendValue(i interface{}) error {
+func (c *ColumnInt16) AppendValue(i interface{}) error {
 	v, ok := i.(int16)
 	if !ok {
 		return fmt.Errorf("invalid type, expected int16, got %T", i)
@@ -265,8 +265,8 @@ func (c *ColumnInt16) Data() []int16 {
 
 // NewColumnInt16 auto generated constructor
 func NewColumnInt16(name string, values []int16) *ColumnInt16 {
-	return &ColumnInt16 {
-		name: name,
+	return &ColumnInt16{
+		name:   name,
 		values: values,
 	}
 }
@@ -305,11 +305,11 @@ func (c *ColumnInt32) Get(idx int) (interface{}, error) {
 // FieldData return column data mapped to schema.FieldData
 func (c *ColumnInt32) FieldData() *schema.FieldData {
 	fd := &schema.FieldData{
-		Type: schema.DataType_Int32,
+		Type:      schema.DataType_Int32,
 		FieldName: c.name,
 	}
 	data := make([]int32, 0, c.Len())
-	for i := 0 ;i < c.Len(); i++ {
+	for i := 0; i < c.Len(); i++ {
 		data = append(data, int32(c.values[i]))
 	}
 	fd.Field = &schema.FieldData_Scalars{
@@ -335,7 +335,7 @@ func (c *ColumnInt32) ValueByIdx(idx int) (int32, error) {
 }
 
 // AppendValue append value into column
-func(c *ColumnInt32) AppendValue(i interface{}) error {
+func (c *ColumnInt32) AppendValue(i interface{}) error {
 	v, ok := i.(int32)
 	if !ok {
 		return fmt.Errorf("invalid type, expected int32, got %T", i)
@@ -352,8 +352,8 @@ func (c *ColumnInt32) Data() []int32 {
 
 // NewColumnInt32 auto generated constructor
 func NewColumnInt32(name string, values []int32) *ColumnInt32 {
-	return &ColumnInt32 {
-		name: name,
+	return &ColumnInt32{
+		name:   name,
 		values: values,
 	}
 }
@@ -392,11 +392,11 @@ func (c *ColumnInt64) Get(idx int) (interface{}, error) {
 // FieldData return column data mapped to schema.FieldData
 func (c *ColumnInt64) FieldData() *schema.FieldData {
 	fd := &schema.FieldData{
-		Type: schema.DataType_Int64,
+		Type:      schema.DataType_Int64,
 		FieldName: c.name,
 	}
 	data := make([]int64, 0, c.Len())
-	for i := 0 ;i < c.Len(); i++ {
+	for i := 0; i < c.Len(); i++ {
 		data = append(data, int64(c.values[i]))
 	}
 	fd.Field = &schema.FieldData_Scalars{
@@ -422,7 +422,7 @@ func (c *ColumnInt64) ValueByIdx(idx int) (int64, error) {
 }
 
 // AppendValue append value into column
-func(c *ColumnInt64) AppendValue(i interface{}) error {
+func (c *ColumnInt64) AppendValue(i interface{}) error {
 	v, ok := i.(int64)
 	if !ok {
 		return fmt.Errorf("invalid type, expected int64, got %T", i)
@@ -439,8 +439,8 @@ func (c *ColumnInt64) Data() []int64 {
 
 // NewColumnInt64 auto generated constructor
 func NewColumnInt64(name string, values []int64) *ColumnInt64 {
-	return &ColumnInt64 {
-		name: name,
+	return &ColumnInt64{
+		name:   name,
 		values: values,
 	}
 }
@@ -479,11 +479,11 @@ func (c *ColumnFloat) Get(idx int) (interface{}, error) {
 // FieldData return column data mapped to schema.FieldData
 func (c *ColumnFloat) FieldData() *schema.FieldData {
 	fd := &schema.FieldData{
-		Type: schema.DataType_Float,
+		Type:      schema.DataType_Float,
 		FieldName: c.name,
 	}
 	data := make([]float32, 0, c.Len())
-	for i := 0 ;i < c.Len(); i++ {
+	for i := 0; i < c.Len(); i++ {
 		data = append(data, float32(c.values[i]))
 	}
 	fd.Field = &schema.FieldData_Scalars{
@@ -509,7 +509,7 @@ func (c *ColumnFloat) ValueByIdx(idx int) (float32, error) {
 }
 
 // AppendValue append value into column
-func(c *ColumnFloat) AppendValue(i interface{}) error {
+func (c *ColumnFloat) AppendValue(i interface{}) error {
 	v, ok := i.(float32)
 	if !ok {
 		return fmt.Errorf("invalid type, expected float32, got %T", i)
@@ -526,8 +526,8 @@ func (c *ColumnFloat) Data() []float32 {
 
 // NewColumnFloat auto generated constructor
 func NewColumnFloat(name string, values []float32) *ColumnFloat {
-	return &ColumnFloat {
-		name: name,
+	return &ColumnFloat{
+		name:   name,
 		values: values,
 	}
 }
@@ -566,11 +566,11 @@ func (c *ColumnDouble) Get(idx int) (interface{}, error) {
 // FieldData return column data mapped to schema.FieldData
 func (c *ColumnDouble) FieldData() *schema.FieldData {
 	fd := &schema.FieldData{
-		Type: schema.DataType_Double,
+		Type:      schema.DataType_Double,
 		FieldName: c.name,
 	}
 	data := make([]float64, 0, c.Len())
-	for i := 0 ;i < c.Len(); i++ {
+	for i := 0; i < c.Len(); i++ {
 		data = append(data, float64(c.values[i]))
 	}
 	fd.Field = &schema.FieldData_Scalars{
@@ -596,7 +596,7 @@ func (c *ColumnDouble) ValueByIdx(idx int) (float64, error) {
 }
 
 // AppendValue append value into column
-func(c *ColumnDouble) AppendValue(i interface{}) error {
+func (c *ColumnDouble) AppendValue(i interface{}) error {
 	v, ok := i.(float64)
 	if !ok {
 		return fmt.Errorf("invalid type, expected float64, got %T", i)
@@ -613,8 +613,8 @@ func (c *ColumnDouble) Data() []float64 {
 
 // NewColumnDouble auto generated constructor
 func NewColumnDouble(name string, values []float64) *ColumnDouble {
-	return &ColumnDouble {
-		name: name,
+	return &ColumnDouble{
+		name:   name,
 		values: values,
 	}
 }
@@ -653,11 +653,11 @@ func (c *ColumnString) Get(idx int) (interface{}, error) {
 // FieldData return column data mapped to schema.FieldData
 func (c *ColumnString) FieldData() *schema.FieldData {
 	fd := &schema.FieldData{
-		Type: schema.DataType_String,
+		Type:      schema.DataType_String,
 		FieldName: c.name,
 	}
 	data := make([]string, 0, c.Len())
-	for i := 0 ;i < c.Len(); i++ {
+	for i := 0; i < c.Len(); i++ {
 		data = append(data, string(c.values[i]))
 	}
 	fd.Field = &schema.FieldData_Scalars{
@@ -683,7 +683,7 @@ func (c *ColumnString) ValueByIdx(idx int) (string, error) {
 }
 
 // AppendValue append value into column
-func(c *ColumnString) AppendValue(i interface{}) error {
+func (c *ColumnString) AppendValue(i interface{}) error {
 	v, ok := i.(string)
 	if !ok {
 		return fmt.Errorf("invalid type, expected string, got %T", i)
@@ -700,9 +700,8 @@ func (c *ColumnString) Data() []string {
 
 // NewColumnString auto generated constructor
 func NewColumnString(name string, values []string) *ColumnString {
-	return &ColumnString {
-		name: name,
+	return &ColumnString{
+		name:   name,
 		values: values,
 	}
 }
-
diff --git a/entity/columns_varchar.go b/entity/columns_varchar.go
index 6873f80..5615647 100644
--- a/entity/columns_varchar.go
+++ b/entity/columns_varchar.go
@@ -4,7 +4,7 @@ import (
 	"errors"
 	"fmt"
 
-	schema "github.com/milvus-io/milvus-proto/go-api/schemapb"
+	schema "github.com/milvus-io/milvus-proto/go-api/v2/schemapb"
 )
 
 // ColumnVarChar generated columns type for VarChar
diff --git a/entity/columns_vector_gen.go b/entity/columns_vector_gen.go
index 0a64e36..8e2bbec 100755
--- a/entity/columns_vector_gen.go
+++ b/entity/columns_vector_gen.go
@@ -1,16 +1,15 @@
 // Code generated by go generate; DO NOT EDIT
-// This file is generated by go generate 
+// This file is generated by go generate
 
-package entity 
+package entity
 
 import (
 	"fmt"
 
 	"github.com/cockroachdb/errors"
-	schema "github.com/milvus-io/milvus-proto/go-api/schemapb"
+	schema "github.com/milvus-io/milvus-proto/go-api/v2/schemapb"
 )
 
-
 // ColumnBinaryVector generated columns type for BinaryVector
 type ColumnBinaryVector struct {
 	ColumnBase
@@ -30,7 +29,7 @@ func (c *ColumnBinaryVector) Type() FieldType {
 }
 
 // Len returns column data length
-func (c * ColumnBinaryVector) Len() int {
+func (c *ColumnBinaryVector) Len() int {
 	return len(c.values)
 }
 
@@ -48,7 +47,7 @@ func (c *ColumnBinaryVector) Get(idx int) (interface{}, error) {
 }
 
 // AppendValue append value into column
-func(c *ColumnBinaryVector) AppendValue(i interface{}) error {
+func (c *ColumnBinaryVector) AppendValue(i interface{}) error {
 	v, ok := i.([]byte)
 	if !ok {
 		return fmt.Errorf("invalid type, expected []byte, got %T", i)
@@ -66,11 +65,11 @@ func (c *ColumnBinaryVector) Data() [][]byte {
 // FieldData return column data mapped to schema.FieldData
 func (c *ColumnBinaryVector) FieldData() *schema.FieldData {
 	fd := &schema.FieldData{
-		Type: schema.DataType_BinaryVector,
+		Type:      schema.DataType_BinaryVector,
 		FieldName: c.name,
 	}
 
-	data := make([]byte, 0, len(c.values)* c.dim)
+	data := make([]byte, 0, len(c.values)*c.dim)
 
 	for _, vector := range c.values {
 		data = append(data, vector...)
@@ -79,11 +78,10 @@ func (c *ColumnBinaryVector) FieldData() *schema.FieldData {
 	fd.Field = &schema.FieldData_Vectors{
 		Vectors: &schema.VectorField{
 			Dim: int64(c.dim),
-			
+
 			Data: &schema.VectorField_BinaryVector{
 				BinaryVector: data,
 			},
-			
 		},
 	}
 	return fd
@@ -91,7 +89,7 @@ func (c *ColumnBinaryVector) FieldData() *schema.FieldData {
 
 // NewColumnBinaryVector auto generated constructor
 func NewColumnBinaryVector(name string, dim int, values [][]byte) *ColumnBinaryVector {
-	return &ColumnBinaryVector {
+	return &ColumnBinaryVector{
 		name:   name,
 		dim:    dim,
 		values: values,
@@ -117,7 +115,7 @@ func (c *ColumnFloatVector) Type() FieldType {
 }
 
 // Len returns column data length
-func (c * ColumnFloatVector) Len() int {
+func (c *ColumnFloatVector) Len() int {
 	return len(c.values)
 }
 
@@ -135,7 +133,7 @@ func (c *ColumnFloatVector) Get(idx int) (interface{}, error) {
 }
 
 // AppendValue append value into column
-func(c *ColumnFloatVector) AppendValue(i interface{}) error {
+func (c *ColumnFloatVector) AppendValue(i interface{}) error {
 	v, ok := i.([]float32)
 	if !ok {
 		return fmt.Errorf("invalid type, expected []float32, got %T", i)
@@ -153,11 +151,11 @@ func (c *ColumnFloatVector) Data() [][]float32 {
 // FieldData return column data mapped to schema.FieldData
 func (c *ColumnFloatVector) FieldData() *schema.FieldData {
 	fd := &schema.FieldData{
-		Type: schema.DataType_FloatVector,
+		Type:      schema.DataType_FloatVector,
 		FieldName: c.name,
 	}
 
-	data := make([]float32, 0, len(c.values)* c.dim)
+	data := make([]float32, 0, len(c.values)*c.dim)
 
 	for _, vector := range c.values {
 		data = append(data, vector...)
@@ -166,13 +164,12 @@ func (c *ColumnFloatVector) FieldData() *schema.FieldData {
 	fd.Field = &schema.FieldData_Vectors{
 		Vectors: &schema.VectorField{
 			Dim: int64(c.dim),
-			
+
 			Data: &schema.VectorField_FloatVector{
 				FloatVector: &schema.FloatArray{
 					Data: data,
 				},
 			},
-			
 		},
 	}
 	return fd
@@ -180,10 +177,9 @@ func (c *ColumnFloatVector) FieldData() *schema.FieldData {
 
 // NewColumnFloatVector auto generated constructor
 func NewColumnFloatVector(name string, dim int, values [][]float32) *ColumnFloatVector {
-	return &ColumnFloatVector {
+	return &ColumnFloatVector{
 		name:   name,
 		dim:    dim,
 		values: values,
 	}
 }
-
diff --git a/entity/gen/gen.go b/entity/gen/gen.go
index fdc2d09..5399021 100644
--- a/entity/gen/gen.go
+++ b/entity/gen/gen.go
@@ -33,7 +33,7 @@ import (
 	"fmt"
 
 	"github.com/cockroachdb/errors"
-	schema "github.com/milvus-io/milvus-proto/go-api/schemapb"
+	schema "github.com/milvus-io/milvus-proto/go-api/v2/schemapb"
 )
 {{ range .Types }}{{with .}}
 // Column{{.TypeName}} generated columns type for {{.TypeName}}
@@ -133,7 +133,7 @@ import (
 	"fmt"
 
 	"github.com/cockroachdb/errors"
-	schema "github.com/milvus-io/milvus-proto/go-api/schemapb"
+	schema "github.com/milvus-io/milvus-proto/go-api/v2/schemapb"
 )
 
 {{ range .Types }}{{with.}}
@@ -244,7 +244,7 @@ import (
 	"time"
 
 	"github.com/stretchr/testify/assert"
-	schema "github.com/milvus-io/milvus-proto/go-api/schemapb"
+	schema "github.com/milvus-io/milvus-proto/go-api/v2/schemapb"
 )
 {{ range .Types }}{{with.}}
 func TestColumn{{.TypeName}}(t *testing.T) {
@@ -365,7 +365,7 @@ import (
 	"testing"
 	"time"
 
-	schema "github.com/milvus-io/milvus-proto/go-api/schemapb"
+	schema "github.com/milvus-io/milvus-proto/go-api/v2/schemapb"
 	"github.com/stretchr/testify/assert"
 )
 {{range .Types}}{{with .}}
diff --git a/entity/index.go b/entity/index.go
index f9da9a6..98942f8 100644
--- a/entity/index.go
+++ b/entity/index.go
@@ -11,7 +11,7 @@
 
 package entity
 
-import common "github.com/milvus-io/milvus-proto/go-api/commonpb"
+import common "github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
 
 //go:generate go run genidx/genidx.go
 
diff --git a/entity/rbac.go b/entity/rbac.go
index 0e1d14d..32819d9 100644
--- a/entity/rbac.go
+++ b/entity/rbac.go
@@ -1,6 +1,6 @@
 package entity
 
-import common "github.com/milvus-io/milvus-proto/go-api/commonpb"
+import common "github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
 
 // User is the model for RBAC user object.
 type User struct {
diff --git a/entity/schema.go b/entity/schema.go
index 8721844..ae094fc 100644
--- a/entity/schema.go
+++ b/entity/schema.go
@@ -14,8 +14,8 @@ package entity
 import (
 	"strconv"
 
-	common "github.com/milvus-io/milvus-proto/go-api/commonpb"
-	schema "github.com/milvus-io/milvus-proto/go-api/schemapb"
+	common "github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
+	schema "github.com/milvus-io/milvus-proto/go-api/v2/schemapb"
 )
 
 const (
diff --git a/entity/segment.go b/entity/segment.go
index fef5cb4..d920c80 100644
--- a/entity/segment.go
+++ b/entity/segment.go
@@ -12,7 +12,7 @@
 package entity
 
 import (
-	common "github.com/milvus-io/milvus-proto/go-api/commonpb"
+	common "github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
 )
 
 // Segment represent segment in milvus
diff --git a/go.mod b/go.mod
index 25fb597..e0435ac 100644
--- a/go.mod
+++ b/go.mod
@@ -7,7 +7,7 @@ require (
 	github.com/go-faker/faker/v4 v4.1.0
 	github.com/golang/protobuf v1.5.2
 	github.com/grpc-ecosystem/go-grpc-middleware v1.3.0
-	github.com/milvus-io/milvus-proto/go-api v0.0.0-20230522080721-2975bfe7a190
+	github.com/milvus-io/milvus-proto/go-api/v2 v2.2.10-dev.2
 	github.com/stretchr/testify v1.8.1
 	github.com/tidwall/gjson v1.14.4
 	google.golang.org/grpc v1.48.0
diff --git a/go.sum b/go.sum
index edcb2ca..912c883 100644
--- a/go.sum
+++ b/go.sum
@@ -157,8 +157,8 @@ github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27k
 github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw=
 github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8=
 github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc=
-github.com/milvus-io/milvus-proto/go-api v0.0.0-20230522080721-2975bfe7a190 h1:ZREJhOMgAvXs+K0ain51ibxAtCB8Lnn3EBZFHEykIlk=
-github.com/milvus-io/milvus-proto/go-api v0.0.0-20230522080721-2975bfe7a190/go.mod h1:148qnlmZ0Fdm1Fq+Mj/OW2uDoEP25g3mjh0vMGtkgmk=
+github.com/milvus-io/milvus-proto/go-api/v2 v2.2.10-dev.2 h1:EGmZU0N9cBXDYujCYNJT0MB2581eQvtLLXbz/By8Iiw=
+github.com/milvus-io/milvus-proto/go-api/v2 v2.2.10-dev.2/go.mod h1:1OIl0v5PQeNxIJhCvY+K55CBUOYDZevw9g9380u1Wek=
 github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
 github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
 github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
diff --git a/mocks/MilvusServiceServer.go b/mocks/MilvusServiceServer.go
index edf238a..bc6242b 100644
--- a/mocks/MilvusServiceServer.go
+++ b/mocks/MilvusServiceServer.go
@@ -5,9 +5,9 @@ package mocks
 import (
 	context "context"
 
-	commonpb "github.com/milvus-io/milvus-proto/go-api/commonpb"
+	commonpb "github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
 
-	milvuspb "github.com/milvus-io/milvus-proto/go-api/milvuspb"
+	milvuspb "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
 
 	mock "github.com/stretchr/testify/mock"
 )
@@ -1764,6 +1764,53 @@ func (_c *MilvusServiceServer_GetIndexState_Call) Return(_a0 *milvuspb.GetIndexS
 	return _c
 }
 
+// GetIndexStatistics provides a mock function with given fields: _a0, _a1
+func (_m *MilvusServiceServer) GetIndexStatistics(_a0 context.Context, _a1 *milvuspb.GetIndexStatisticsRequest) (*milvuspb.GetIndexStatisticsResponse, error) {
+	ret := _m.Called(_a0, _a1)
+
+	var r0 *milvuspb.GetIndexStatisticsResponse
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetIndexStatisticsRequest) *milvuspb.GetIndexStatisticsResponse); ok {
+		r0 = rf(_a0, _a1)
+	} else {
+		if ret.Get(0) != nil {
+			r0 = ret.Get(0).(*milvuspb.GetIndexStatisticsResponse)
+		}
+	}
+
+	var r1 error
+	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.GetIndexStatisticsRequest) error); ok {
+		r1 = rf(_a0, _a1)
+	} else {
+		r1 = ret.Error(1)
+	}
+
+	return r0, r1
+}
+
+// MilvusServiceServer_GetIndexStatistics_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetIndexStatistics'
+type MilvusServiceServer_GetIndexStatistics_Call struct {
+	*mock.Call
+}
+
+// GetIndexStatistics is a helper method to define mock.On call
+//  - _a0 context.Context
+//  - _a1 *milvuspb.GetIndexStatisticsRequest
+func (_e *MilvusServiceServer_Expecter) GetIndexStatistics(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetIndexStatistics_Call {
+	return &MilvusServiceServer_GetIndexStatistics_Call{Call: _e.mock.On("GetIndexStatistics", _a0, _a1)}
+}
+
+func (_c *MilvusServiceServer_GetIndexStatistics_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.GetIndexStatisticsRequest)) *MilvusServiceServer_GetIndexStatistics_Call {
+	_c.Call.Run(func(args mock.Arguments) {
+		run(args[0].(context.Context), args[1].(*milvuspb.GetIndexStatisticsRequest))
+	})
+	return _c
+}
+
+func (_c *MilvusServiceServer_GetIndexStatistics_Call) Return(_a0 *milvuspb.GetIndexStatisticsResponse, _a1 error) *MilvusServiceServer_GetIndexStatistics_Call {
+	_c.Call.Return(_a0, _a1)
+	return _c
+}
+
 // GetLoadState provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) GetLoadState(_a0 context.Context, _a1 *milvuspb.GetLoadStateRequest) (*milvuspb.GetLoadStateResponse, error) {
 	ret := _m.Called(_a0, _a1)


Test patch:
diff --git a/client/alias_test.go b/client/alias_test.go
index f6f77b3..c3d6396 100644
--- a/client/alias_test.go
+++ b/client/alias_test.go
@@ -21,8 +21,8 @@ import (
 	"testing"
 
 	"github.com/golang/protobuf/proto"
-	common "github.com/milvus-io/milvus-proto/go-api/commonpb"
-	server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
+	common "github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
+	server "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
 	"github.com/stretchr/testify/assert"
 )
 
diff --git a/client/authentication_test.go b/client/authentication_test.go
index 8e2478f..a6dcd3f 100644
--- a/client/authentication_test.go
+++ b/client/authentication_test.go
@@ -6,8 +6,8 @@ import (
 	"testing"
 
 	"github.com/golang/protobuf/proto"
-	common "github.com/milvus-io/milvus-proto/go-api/commonpb"
-	server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
+	common "github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
+	server "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
 	"github.com/stretchr/testify/assert"
 )
 
diff --git a/client/client_mock_test.go b/client/client_mock_test.go
index f1a5c7f..4bd8aad 100644
--- a/client/client_mock_test.go
+++ b/client/client_mock_test.go
@@ -7,9 +7,9 @@ import (
 	"sync"
 
 	"github.com/golang/protobuf/proto"
-	common "github.com/milvus-io/milvus-proto/go-api/commonpb"
-	server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
-	schema "github.com/milvus-io/milvus-proto/go-api/schemapb"
+	common "github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
+	server "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
+	schema "github.com/milvus-io/milvus-proto/go-api/v2/schemapb"
 	"github.com/stretchr/testify/mock"
 	"github.com/stretchr/testify/suite"
 	"google.golang.org/grpc"
@@ -910,6 +910,10 @@ func (m *MockServer) GetFlushAllState(_a0 context.Context, _a1 *server.GetFlushA
 	panic("not implemented")
 }
 
+func (m *MockServer) GetIndexStatistics(_a0 context.Context, _a1 *server.GetIndexStatisticsRequest) (*server.GetIndexStatisticsResponse, error) {
+	panic("not implemented")
+}
+
 func (m *MockServer) Connect(_ context.Context, _ *server.ConnectRequest) (*server.ConnectResponse, error) {
 	s, err := SuccessStatus()
 	return &server.ConnectResponse{Status: s}, err
diff --git a/client/client_test.go b/client/client_test.go
index 6a04cd4..d7e732c 100644
--- a/client/client_test.go
+++ b/client/client_test.go
@@ -11,8 +11,8 @@ import (
 	"testing"
 	"time"
 
-	common "github.com/milvus-io/milvus-proto/go-api/commonpb"
-	server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
+	common "github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
+	server "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
 	"github.com/stretchr/testify/assert"
 	"google.golang.org/grpc"
 	"google.golang.org/grpc/codes"
diff --git a/client/collection_test.go b/client/collection_test.go
index d87b59b..e0b18e9 100644
--- a/client/collection_test.go
+++ b/client/collection_test.go
@@ -9,9 +9,9 @@ import (
 	"time"
 
 	"github.com/golang/protobuf/proto"
-	common "github.com/milvus-io/milvus-proto/go-api/commonpb"
-	server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
-	schema "github.com/milvus-io/milvus-proto/go-api/schemapb"
+	common "github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
+	server "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
+	schema "github.com/milvus-io/milvus-proto/go-api/v2/schemapb"
 	"github.com/milvus-io/milvus-sdk-go/v2/entity"
 	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/mock"
diff --git a/client/data_test.go b/client/data_test.go
index 6a4e810..71f3374 100644
--- a/client/data_test.go
+++ b/client/data_test.go
@@ -20,9 +20,9 @@ import (
 	"github.com/cockroachdb/errors"
 
 	"github.com/golang/protobuf/proto"
-	common "github.com/milvus-io/milvus-proto/go-api/commonpb"
-	server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
-	schema "github.com/milvus-io/milvus-proto/go-api/schemapb"
+	common "github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
+	server "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
+	schema "github.com/milvus-io/milvus-proto/go-api/v2/schemapb"
 	"github.com/milvus-io/milvus-sdk-go/v2/entity"
 	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/mock"
diff --git a/client/database_test.go b/client/database_test.go
index 09c1f8d..cf99884 100644
--- a/client/database_test.go
+++ b/client/database_test.go
@@ -7,7 +7,7 @@ import (
 	"github.com/go-faker/faker/v4"
 	"github.com/go-faker/faker/v4/pkg/options"
 	"github.com/golang/protobuf/proto"
-	server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
+	server "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
 	"github.com/stretchr/testify/assert"
 )
 
diff --git a/client/index_test.go b/client/index_test.go
index 84d8109..b3fecb8 100644
--- a/client/index_test.go
+++ b/client/index_test.go
@@ -8,8 +8,8 @@ import (
 	"time"
 
 	"github.com/golang/protobuf/proto"
-	common "github.com/milvus-io/milvus-proto/go-api/commonpb"
-	server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
+	common "github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
+	server "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
 	"github.com/milvus-io/milvus-sdk-go/v2/entity"
 	"github.com/stretchr/testify/assert"
 )
diff --git a/client/insert_test.go b/client/insert_test.go
index dc3d02a..fc78d34 100644
--- a/client/insert_test.go
+++ b/client/insert_test.go
@@ -16,9 +16,9 @@ import (
 	"testing"
 
 	"github.com/cockroachdb/errors"
-	common "github.com/milvus-io/milvus-proto/go-api/commonpb"
-	server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
-	schema "github.com/milvus-io/milvus-proto/go-api/schemapb"
+	common "github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
+	server "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
+	schema "github.com/milvus-io/milvus-proto/go-api/v2/schemapb"
 	"github.com/milvus-io/milvus-sdk-go/v2/entity"
 	"github.com/stretchr/testify/mock"
 	"github.com/stretchr/testify/suite"
diff --git a/client/maintainance_test.go b/client/maintainance_test.go
index 1c11326..00b1a1f 100644
--- a/client/maintainance_test.go
+++ b/client/maintainance_test.go
@@ -23,8 +23,8 @@ import (
 	"time"
 
 	"github.com/golang/protobuf/proto"
-	common "github.com/milvus-io/milvus-proto/go-api/commonpb"
-	server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
+	common "github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
+	server "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
 	"github.com/milvus-io/milvus-sdk-go/v2/entity"
 	"github.com/milvus-io/milvus-sdk-go/v2/internal/utils/tso"
 	"github.com/stretchr/testify/assert"
diff --git a/client/options_test.go b/client/options_test.go
index 5938d42..dbf4c80 100644
--- a/client/options_test.go
+++ b/client/options_test.go
@@ -15,8 +15,8 @@ import (
 	"math/rand"
 	"testing"
 
-	common "github.com/milvus-io/milvus-proto/go-api/commonpb"
-	server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
+	common "github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
+	server "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
 	"github.com/milvus-io/milvus-sdk-go/v2/entity"
 	"github.com/stretchr/testify/assert"
 )
diff --git a/client/partition_test.go b/client/partition_test.go
index 27e6d06..ae97fa5 100644
--- a/client/partition_test.go
+++ b/client/partition_test.go
@@ -9,8 +9,8 @@ import (
 	"time"
 
 	"github.com/golang/protobuf/proto"
-	common "github.com/milvus-io/milvus-proto/go-api/commonpb"
-	server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
+	common "github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
+	server "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
 	"github.com/milvus-io/milvus-sdk-go/v2/entity"
 	"github.com/stretchr/testify/assert"
 )
diff --git a/client/rate_limit_interceptor_test.go b/client/rate_limit_interceptor_test.go
index 65514b0..af5a949 100644
--- a/client/rate_limit_interceptor_test.go
+++ b/client/rate_limit_interceptor_test.go
@@ -25,7 +25,7 @@ import (
 	"github.com/stretchr/testify/assert"
 	"google.golang.org/grpc"
 
-	common "github.com/milvus-io/milvus-proto/go-api/commonpb"
+	common "github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
 )
 
 var mockInvokerError error
diff --git a/client/rbac_test.go b/client/rbac_test.go
index 355f006..5674dd6 100644
--- a/client/rbac_test.go
+++ b/client/rbac_test.go
@@ -10,8 +10,8 @@ import (
 
 	tmock "github.com/stretchr/testify/mock"
 
-	common "github.com/milvus-io/milvus-proto/go-api/commonpb"
-	server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
+	common "github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
+	server "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
 )
 
 type RBACSuite struct {
diff --git a/client/resource_group_test.go b/client/resource_group_test.go
index 78bc182..ff91ea1 100644
--- a/client/resource_group_test.go
+++ b/client/resource_group_test.go
@@ -21,8 +21,8 @@ import (
 	"github.com/stretchr/testify/mock"
 	"github.com/stretchr/testify/suite"
 
-	common "github.com/milvus-io/milvus-proto/go-api/commonpb"
-	server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
+	common "github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
+	server "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
 )
 
 type ResourceGroupSuite struct {
diff --git a/client/row_test.go b/client/row_test.go
index 68ded83..89c7f20 100644
--- a/client/row_test.go
+++ b/client/row_test.go
@@ -9,9 +9,9 @@ import (
 	"github.com/cockroachdb/errors"
 
 	"github.com/golang/protobuf/proto"
-	common "github.com/milvus-io/milvus-proto/go-api/commonpb"
-	server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
-	schema "github.com/milvus-io/milvus-proto/go-api/schemapb"
+	common "github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
+	server "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
+	schema "github.com/milvus-io/milvus-proto/go-api/v2/schemapb"
 	"github.com/milvus-io/milvus-sdk-go/v2/entity"
 	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/mock"
diff --git a/entity/columns_scalar_gen_test.go b/entity/columns_scalar_gen_test.go
index 58b35f3..66280bd 100755
--- a/entity/columns_scalar_gen_test.go
+++ b/entity/columns_scalar_gen_test.go
@@ -1,7 +1,7 @@
 // Code generated by go generate; DO NOT EDIT
-// This file is generated by go generate 
+// This file is generated by go generate
 
-package entity 
+package entity
 
 import (
 	"fmt"
@@ -9,8 +9,8 @@ import (
 	"testing"
 	"time"
 
+	schema "github.com/milvus-io/milvus-proto/go-api/v2/schemapb"
 	"github.com/stretchr/testify/assert"
-	schema "github.com/milvus-io/milvus-proto/go-api/schemapb"
 )
 
 func TestColumnBool(t *testing.T) {
@@ -60,7 +60,7 @@ func TestFieldDataBoolColumn(t *testing.T) {
 	len := rand.Intn(10) + 8
 	name := fmt.Sprintf("fd_Bool_%d", rand.Int())
 	fd := &schema.FieldData{
-		Type: schema.DataType_Bool,
+		Type:      schema.DataType_Bool,
 		FieldName: name,
 	}
 
@@ -77,7 +77,7 @@ func TestFieldDataBoolColumn(t *testing.T) {
 		column, err := FieldDataColumn(fd, 0, len)
 		assert.Nil(t, err)
 		assert.NotNil(t, column)
- 
+
 		assert.Equal(t, name, column.Name())
 		assert.Equal(t, len, column.Len())
 		assert.Equal(t, FieldTypeBool, column.Type())
@@ -92,13 +92,12 @@ func TestFieldDataBoolColumn(t *testing.T) {
 		assert.NotNil(t, err)
 	})
 
-	
 	t.Run("nil data", func(t *testing.T) {
 		fd.Field = nil
 		_, err := FieldDataColumn(fd, 0, len)
 		assert.NotNil(t, err)
 	})
-	
+
 	t.Run("get all data", func(t *testing.T) {
 		fd.Field = &schema.FieldData_Scalars{
 			Scalars: &schema.ScalarField{
@@ -112,7 +111,7 @@ func TestFieldDataBoolColumn(t *testing.T) {
 		column, err := FieldDataColumn(fd, 0, -1)
 		assert.Nil(t, err)
 		assert.NotNil(t, column)
-		
+
 		assert.Equal(t, name, column.Name())
 		assert.Equal(t, len, column.Len())
 		assert.Equal(t, FieldTypeBool, column.Type())
@@ -166,7 +165,7 @@ func TestFieldDataInt8Column(t *testing.T) {
 	len := rand.Intn(10) + 8
 	name := fmt.Sprintf("fd_Int8_%d", rand.Int())
 	fd := &schema.FieldData{
-		Type: schema.DataType_Int8,
+		Type:      schema.DataType_Int8,
 		FieldName: name,
 	}
 
@@ -183,7 +182,7 @@ func TestFieldDataInt8Column(t *testing.T) {
 		column, err := FieldDataColumn(fd, 0, len)
 		assert.Nil(t, err)
 		assert.NotNil(t, column)
- 
+
 		assert.Equal(t, name, column.Name())
 		assert.Equal(t, len, column.Len())
 		assert.Equal(t, FieldTypeInt8, column.Type())
@@ -198,13 +197,12 @@ func TestFieldDataInt8Column(t *testing.T) {
 		assert.NotNil(t, err)
 	})
 
-	
 	t.Run("nil data", func(t *testing.T) {
 		fd.Field = nil
 		_, err := FieldDataColumn(fd, 0, len)
 		assert.NotNil(t, err)
 	})
-	
+
 	t.Run("get all data", func(t *testing.T) {
 		fd.Field = &schema.FieldData_Scalars{
 			Scalars: &schema.ScalarField{
@@ -218,7 +216,7 @@ func TestFieldDataInt8Column(t *testing.T) {
 		column, err := FieldDataColumn(fd, 0, -1)
 		assert.Nil(t, err)
 		assert.NotNil(t, column)
-		
+
 		assert.Equal(t, name, column.Name())
 		assert.Equal(t, len, column.Len())
 		assert.Equal(t, FieldTypeInt8, column.Type())
@@ -272,7 +270,7 @@ func TestFieldDataInt16Column(t *testing.T) {
 	len := rand.Intn(10) + 8
 	name := fmt.Sprintf("fd_Int16_%d", rand.Int())
 	fd := &schema.FieldData{
-		Type: schema.DataType_Int16,
+		Type:      schema.DataType_Int16,
 		FieldName: name,
 	}
 
@@ -289,7 +287,7 @@ func TestFieldDataInt16Column(t *testing.T) {
 		column, err := FieldDataColumn(fd, 0, len)
 		assert.Nil(t, err)
 		assert.NotNil(t, column)
- 
+
 		assert.Equal(t, name, column.Name())
 		assert.Equal(t, len, column.Len())
 		assert.Equal(t, FieldTypeInt16, column.Type())
@@ -304,13 +302,12 @@ func TestFieldDataInt16Column(t *testing.T) {
 		assert.NotNil(t, err)
 	})
 
-	
 	t.Run("nil data", func(t *testing.T) {
 		fd.Field = nil
 		_, err := FieldDataColumn(fd, 0, len)
 		assert.NotNil(t, err)
 	})
-	
+
 	t.Run("get all data", func(t *testing.T) {
 		fd.Field = &schema.FieldData_Scalars{
 			Scalars: &schema.ScalarField{
@@ -324,7 +321,7 @@ func TestFieldDataInt16Column(t *testing.T) {
 		column, err := FieldDataColumn(fd, 0, -1)
 		assert.Nil(t, err)
 		assert.NotNil(t, column)
-		
+
 		assert.Equal(t, name, column.Name())
 		assert.Equal(t, len, column.Len())
 		assert.Equal(t, FieldTypeInt16, column.Type())
@@ -378,7 +375,7 @@ func TestFieldDataInt32Column(t *testing.T) {
 	len := rand.Intn(10) + 8
 	name := fmt.Sprintf("fd_Int32_%d", rand.Int())
 	fd := &schema.FieldData{
-		Type: schema.DataType_Int32,
+		Type:      schema.DataType_Int32,
 		FieldName: name,
 	}
 
@@ -395,7 +392,7 @@ func TestFieldDataInt32Column(t *testing.T) {
 		column, err := FieldDataColumn(fd, 0, len)
 		assert.Nil(t, err)
 		assert.NotNil(t, column)
- 
+
 		assert.Equal(t, name, column.Name())
 		assert.Equal(t, len, column.Len())
 		assert.Equal(t, FieldTypeInt32, column.Type())
@@ -410,13 +407,12 @@ func TestFieldDataInt32Column(t *testing.T) {
 		assert.NotNil(t, err)
 	})
 
-	
 	t.Run("nil data", func(t *testing.T) {
 		fd.Field = nil
 		_, err := FieldDataColumn(fd, 0, len)
 		assert.NotNil(t, err)
 	})
-	
+
 	t.Run("get all data", func(t *testing.T) {
 		fd.Field = &schema.FieldData_Scalars{
 			Scalars: &schema.ScalarField{
@@ -430,7 +426,7 @@ func TestFieldDataInt32Column(t *testing.T) {
 		column, err := FieldDataColumn(fd, 0, -1)
 		assert.Nil(t, err)
 		assert.NotNil(t, column)
-		
+
 		assert.Equal(t, name, column.Name())
 		assert.Equal(t, len, column.Len())
 		assert.Equal(t, FieldTypeInt32, column.Type())
@@ -484,7 +480,7 @@ func TestFieldDataInt64Column(t *testing.T) {
 	len := rand.Intn(10) + 8
 	name := fmt.Sprintf("fd_Int64_%d", rand.Int())
 	fd := &schema.FieldData{
-		Type: schema.DataType_Int64,
+		Type:      schema.DataType_Int64,
 		FieldName: name,
 	}
 
@@ -501,7 +497,7 @@ func TestFieldDataInt64Column(t *testing.T) {
 		column, err := FieldDataColumn(fd, 0, len)
 		assert.Nil(t, err)
 		assert.NotNil(t, column)
- 
+
 		assert.Equal(t, name, column.Name())
 		assert.Equal(t, len, column.Len())
 		assert.Equal(t, FieldTypeInt64, column.Type())
@@ -516,13 +512,12 @@ func TestFieldDataInt64Column(t *testing.T) {
 		assert.NotNil(t, err)
 	})
 
-	
 	t.Run("nil data", func(t *testing.T) {
 		fd.Field = nil
 		_, err := FieldDataColumn(fd, 0, len)
 		assert.NotNil(t, err)
 	})
-	
+
 	t.Run("get all data", func(t *testing.T) {
 		fd.Field = &schema.FieldData_Scalars{
 			Scalars: &schema.ScalarField{
@@ -536,7 +531,7 @@ func TestFieldDataInt64Column(t *testing.T) {
 		column, err := FieldDataColumn(fd, 0, -1)
 		assert.Nil(t, err)
 		assert.NotNil(t, column)
-		
+
 		assert.Equal(t, name, column.Name())
 		assert.Equal(t, len, column.Len())
 		assert.Equal(t, FieldTypeInt64, column.Type())
@@ -590,7 +585,7 @@ func TestFieldDataFloatColumn(t *testing.T) {
 	len := rand.Intn(10) + 8
 	name := fmt.Sprintf("fd_Float_%d", rand.Int())
 	fd := &schema.FieldData{
-		Type: schema.DataType_Float,
+		Type:      schema.DataType_Float,
 		FieldName: name,
 	}
 
@@ -607,7 +602,7 @@ func TestFieldDataFloatColumn(t *testing.T) {
 		column, err := FieldDataColumn(fd, 0, len)
 		assert.Nil(t, err)
 		assert.NotNil(t, column)
- 
+
 		assert.Equal(t, name, column.Name())
 		assert.Equal(t, len, column.Len())
 		assert.Equal(t, FieldTypeFloat, column.Type())
@@ -622,13 +617,12 @@ func TestFieldDataFloatColumn(t *testing.T) {
 		assert.NotNil(t, err)
 	})
 
-	
 	t.Run("nil data", func(t *testing.T) {
 		fd.Field = nil
 		_, err := FieldDataColumn(fd, 0, len)
 		assert.NotNil(t, err)
 	})
-	
+
 	t.Run("get all data", func(t *testing.T) {
 		fd.Field = &schema.FieldData_Scalars{
 			Scalars: &schema.ScalarField{
@@ -642,7 +636,7 @@ func TestFieldDataFloatColumn(t *testing.T) {
 		column, err := FieldDataColumn(fd, 0, -1)
 		assert.Nil(t, err)
 		assert.NotNil(t, column)
-		
+
 		assert.Equal(t, name, column.Name())
 		assert.Equal(t, len, column.Len())
 		assert.Equal(t, FieldTypeFloat, column.Type())
@@ -696,7 +690,7 @@ func TestFieldDataDoubleColumn(t *testing.T) {
 	len := rand.Intn(10) + 8
 	name := fmt.Sprintf("fd_Double_%d", rand.Int())
 	fd := &schema.FieldData{
-		Type: schema.DataType_Double,
+		Type:      schema.DataType_Double,
 		FieldName: name,
 	}
 
@@ -713,7 +707,7 @@ func TestFieldDataDoubleColumn(t *testing.T) {
 		column, err := FieldDataColumn(fd, 0, len)
 		assert.Nil(t, err)
 		assert.NotNil(t, column)
- 
+
 		assert.Equal(t, name, column.Name())
 		assert.Equal(t, len, column.Len())
 		assert.Equal(t, FieldTypeDouble, column.Type())
@@ -728,13 +722,12 @@ func TestFieldDataDoubleColumn(t *testing.T) {
 		assert.NotNil(t, err)
 	})
 
-	
 	t.Run("nil data", func(t *testing.T) {
 		fd.Field = nil
 		_, err := FieldDataColumn(fd, 0, len)
 		assert.NotNil(t, err)
 	})
-	
+
 	t.Run("get all data", func(t *testing.T) {
 		fd.Field = &schema.FieldData_Scalars{
 			Scalars: &schema.ScalarField{
@@ -748,7 +741,7 @@ func TestFieldDataDoubleColumn(t *testing.T) {
 		column, err := FieldDataColumn(fd, 0, -1)
 		assert.Nil(t, err)
 		assert.NotNil(t, column)
-		
+
 		assert.Equal(t, name, column.Name())
 		assert.Equal(t, len, column.Len())
 		assert.Equal(t, FieldTypeDouble, column.Type())
@@ -802,7 +795,7 @@ func TestFieldDataStringColumn(t *testing.T) {
 	len := rand.Intn(10) + 8
 	name := fmt.Sprintf("fd_String_%d", rand.Int())
 	fd := &schema.FieldData{
-		Type: schema.DataType_String,
+		Type:      schema.DataType_String,
 		FieldName: name,
 	}
 
@@ -819,7 +812,7 @@ func TestFieldDataStringColumn(t *testing.T) {
 		column, err := FieldDataColumn(fd, 0, len)
 		assert.Nil(t, err)
 		assert.NotNil(t, column)
- 
+
 		assert.Equal(t, name, column.Name())
 		assert.Equal(t, len, column.Len())
 		assert.Equal(t, FieldTypeString, column.Type())
@@ -834,13 +827,12 @@ func TestFieldDataStringColumn(t *testing.T) {
 		assert.NotNil(t, err)
 	})
 
-	
 	t.Run("nil data", func(t *testing.T) {
 		fd.Field = nil
 		_, err := FieldDataColumn(fd, 0, len)
 		assert.NotNil(t, err)
 	})
-	
+
 	t.Run("get all data", func(t *testing.T) {
 		fd.Field = &schema.FieldData_Scalars{
 			Scalars: &schema.ScalarField{
@@ -854,10 +846,9 @@ func TestFieldDataStringColumn(t *testing.T) {
 		column, err := FieldDataColumn(fd, 0, -1)
 		assert.Nil(t, err)
 		assert.NotNil(t, column)
-		
+
 		assert.Equal(t, name, column.Name())
 		assert.Equal(t, len, column.Len())
 		assert.Equal(t, FieldTypeString, column.Type())
 	})
 }
-
diff --git a/entity/columns_test.go b/entity/columns_test.go
index 1975c07..833d788 100644
--- a/entity/columns_test.go
+++ b/entity/columns_test.go
@@ -6,7 +6,7 @@ import (
 	"testing"
 	"time"
 
-	schema "github.com/milvus-io/milvus-proto/go-api/schemapb"
+	schema "github.com/milvus-io/milvus-proto/go-api/v2/schemapb"
 	"github.com/stretchr/testify/assert"
 )
 
diff --git a/entity/columns_varchar_test.go b/entity/columns_varchar_test.go
index c212b72..46a8835 100644
--- a/entity/columns_varchar_test.go
+++ b/entity/columns_varchar_test.go
@@ -6,7 +6,7 @@ import (
 	"testing"
 	"time"
 
-	schema "github.com/milvus-io/milvus-proto/go-api/schemapb"
+	schema "github.com/milvus-io/milvus-proto/go-api/v2/schemapb"
 	"github.com/stretchr/testify/assert"
 )
 
diff --git a/entity/columns_vector_gen_test.go b/entity/columns_vector_gen_test.go
index 1aea399..110667f 100755
--- a/entity/columns_vector_gen_test.go
+++ b/entity/columns_vector_gen_test.go
@@ -1,7 +1,7 @@
 // Code generated by go generate; DO NOT EDIT
-// This file is generated by go generate 
+// This file is generated by go generate
 
-package entity 
+package entity
 
 import (
 	"fmt"
@@ -9,7 +9,7 @@ import (
 	"testing"
 	"time"
 
-	schema "github.com/milvus-io/milvus-proto/go-api/schemapb"
+	schema "github.com/milvus-io/milvus-proto/go-api/v2/schemapb"
 	"github.com/stretchr/testify/assert"
 )
 
@@ -19,16 +19,16 @@ func TestColumnBinaryVector(t *testing.T) {
 	columnLen := 12 + rand.Intn(10)
 	dim := ([]int{64, 128, 256, 512})[rand.Intn(4)]
 
-	v := make([][]byte,0, columnLen)
+	v := make([][]byte, 0, columnLen)
 	dlen := dim
 	dlen /= 8
-	
+
 	for i := 0; i < columnLen; i++ {
 		entry := make([]byte, dlen)
 		v = append(v, entry)
 	}
 	column := NewColumnBinaryVector(columnName, dim, v)
-	
+
 	t.Run("test meta", func(t *testing.T) {
 		ft := FieldTypeBinaryVector
 		assert.Equal(t, "BinaryVector", ft.Name())
@@ -43,13 +43,13 @@ func TestColumnBinaryVector(t *testing.T) {
 		assert.Equal(t, FieldTypeBinaryVector, column.Type())
 		assert.Equal(t, columnLen, column.Len())
 		assert.Equal(t, dim, column.Dim())
-		assert.Equal(t ,v, column.Data())
-		
+		assert.Equal(t, v, column.Data())
+
 		var ev []byte
 		err := column.AppendValue(ev)
 		assert.Equal(t, columnLen+1, column.Len())
 		assert.Nil(t, err)
-		
+
 		err = column.AppendValue(struct{}{})
 		assert.Equal(t, columnLen+1, column.Len())
 		assert.NotNil(t, err)
@@ -70,7 +70,7 @@ func TestColumnBinaryVector(t *testing.T) {
 			Type:      schema.DataType_BinaryVector,
 			FieldName: columnName,
 		}
-		_, err := FieldDataVector(fd) 
+		_, err := FieldDataVector(fd)
 		assert.Error(t, err)
 	})
 
@@ -82,16 +82,15 @@ func TestColumnFloatVector(t *testing.T) {
 	columnLen := 12 + rand.Intn(10)
 	dim := ([]int{64, 128, 256, 512})[rand.Intn(4)]
 
-	v := make([][]float32,0, columnLen)
+	v := make([][]float32, 0, columnLen)
 	dlen := dim
-	
-	
+
 	for i := 0; i < columnLen; i++ {
 		entry := make([]float32, dlen)
 		v = append(v, entry)
 	}
 	column := NewColumnFloatVector(columnName, dim, v)
-	
+
 	t.Run("test meta", func(t *testing.T) {
 		ft := FieldTypeFloatVector
 		assert.Equal(t, "FloatVector", ft.Name())
@@ -106,13 +105,13 @@ func TestColumnFloatVector(t *testing.T) {
 		assert.Equal(t, FieldTypeFloatVector, column.Type())
 		assert.Equal(t, columnLen, column.Len())
 		assert.Equal(t, dim, column.Dim())
-		assert.Equal(t ,v, column.Data())
-		
+		assert.Equal(t, v, column.Data())
+
 		var ev []float32
 		err := column.AppendValue(ev)
 		assert.Equal(t, columnLen+1, column.Len())
 		assert.Nil(t, err)
-		
+
 		err = column.AppendValue(struct{}{})
 		assert.Equal(t, columnLen+1, column.Len())
 		assert.NotNil(t, err)
@@ -133,9 +132,8 @@ func TestColumnFloatVector(t *testing.T) {
 			Type:      schema.DataType_FloatVector,
 			FieldName: columnName,
 		}
-		_, err := FieldDataVector(fd) 
+		_, err := FieldDataVector(fd)
 		assert.Error(t, err)
 	})
 
 }
-
diff --git a/entity/schema_test.go b/entity/schema_test.go
index f79f2da..81d3b08 100644
--- a/entity/schema_test.go
+++ b/entity/schema_test.go
@@ -3,7 +3,7 @@ package entity
 import (
 	"testing"
 
-	common "github.com/milvus-io/milvus-proto/go-api/commonpb"
+	common "github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
 	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/suite"
 )
diff --git a/entity/segment_test.go b/entity/segment_test.go
index ff5801d..28993e1 100644
--- a/entity/segment_test.go
+++ b/entity/segment_test.go
@@ -3,7 +3,7 @@ package entity
 import (
 	"testing"
 
-	common "github.com/milvus-io/milvus-proto/go-api/commonpb"
+	common "github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
 	"github.com/stretchr/testify/assert"
 )