Repository: milvus-io/milvus-sdk-go
Pull request #622 (2023-11-09 07:00:55)

Support the replicate message api
/kind improvement

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

This pull-request has been approved by: *<a href="https://github.com/milvus-io/milvus-sdk-go/pull/622#" title="Author self-approved">SimFG</a>*
To complete the [pull request process](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process), please assign **yah01** after the PR has been reviewed.
You can assign the PR to them by writing `/assign @yah01` in a comment when ready.

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).

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

- **[OWNERS](https://github.com/milvus-io/milvus-sdk-go/blob/master/OWNERS)**

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":["yah01"]} -->
codecov[bot]: ## [Codecov](https://app.codecov.io/gh/milvus-io/milvus-sdk-go/pull/622?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io) Report
> Merging [#622](https://app.codecov.io/gh/milvus-io/milvus-sdk-go/pull/622?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io) (fe50daf) into [master](https://app.codecov.io/gh/milvus-io/milvus-sdk-go/commit/415f27760ff8c47638faabc315338d5c139f0faa?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io) (415f277) will **decrease** coverage by `0.52%`.
> The diff coverage is `33.33%`.

[![Impacted file tree graph](https://app.codecov.io/gh/milvus-io/milvus-sdk-go/pull/622/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/622?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io)

```diff
@@            Coverage Diff             @@
##           master     #622      +/-   ##
==========================================
- Coverage   74.60%   74.08%   -0.52%     
==========================================
  Files          42       44       +2     
  Lines        4063     4113      +50     
==========================================
+ Hits         3031     3047      +16     
- Misses        920      954      +34     
  Partials      112      112              
```


| [Files](https://app.codecov.io/gh/milvus-io/milvus-sdk-go/pull/622?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io) | Coverage Δ | |
|---|---|---|
| [client/client.go](https://app.codecov.io/gh/milvus-io/milvus-sdk-go/pull/622?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io#diff-Y2xpZW50L2NsaWVudC5nbw==) | `28.94% <ø> (ø)` | |
| [client/options.go](https://app.codecov.io/gh/milvus-io/milvus-sdk-go/pull/622?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io#diff-Y2xpZW50L29wdGlvbnMuZ28=) | `57.14% <ø> (ø)` | |
| [client/insert.go](https://app.codecov.io/gh/milvus-io/milvus-sdk-go/pull/622?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io#diff-Y2xpZW50L2luc2VydC5nbw==) | `79.64% <50.00%> (-0.29%)` | :arrow_down: |
| [client/collection.go](https://app.codecov.io/gh/milvus-io/milvus-sdk-go/pull/622?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io#diff-Y2xpZW50L2NvbGxlY3Rpb24uZ28=) | `88.09% <33.33%> (-0.50%)` | :arrow_down: |
| [client/database.go](https://app.codecov.io/gh/milvus-io/milvus-sdk-go/pull/622?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io#diff-Y2xpZW50L2RhdGFiYXNlLmdv) | `63.41% <0.00%> (-3.26%)` | :arrow_down: |
| [client/index.go](https://app.codecov.io/gh/milvus-io/milvus-sdk-go/pull/622?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io#diff-Y2xpZW50L2luZGV4Lmdv) | `76.74% <50.00%> (-0.86%)` | :arrow_down: |
| [client/mq\_message.go](https://app.codecov.io/gh/milvus-io/milvus-sdk-go/pull/622?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io#diff-Y2xpZW50L21xX21lc3NhZ2UuZ28=) | `65.00% <65.00%> (ø)` | |
| [client/options\_msg\_base.go](https://app.codecov.io/gh/milvus-io/milvus-sdk-go/pull/622?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io#diff-Y2xpZW50L29wdGlvbnNfbXNnX2Jhc2UuZ28=) | `0.00% <0.00%> (ø)` | |


Patch:
diff --git a/client/client.go b/client/client.go
index 5f066b0..ed2bacf 100644
--- a/client/client.go
+++ b/client/client.go
@@ -18,6 +18,8 @@ import (
 
 	"google.golang.org/grpc"
 
+	"github.com/milvus-io/milvus-proto/go-api/v2/msgpb"
+
 	"github.com/milvus-io/milvus-sdk-go/v2/entity"
 )
 
@@ -38,9 +40,9 @@ type Client interface {
 	// ListDatabases list all database in milvus cluster.
 	ListDatabases(ctx context.Context) ([]entity.Database, error)
 	// CreateDatabase create database with the given name.
-	CreateDatabase(ctx context.Context, dbName string) error
+	CreateDatabase(ctx context.Context, dbName string, opts ...CreateDatabaseOption) error
 	// DropDatabase drop database with the given db name.
-	DropDatabase(ctx context.Context, dbName string) error
+	DropDatabase(ctx context.Context, dbName string, opts ...DropDatabaseOption) error
 
 	// -- collection --
 
@@ -53,13 +55,13 @@ type Client interface {
 	// DescribeCollection describe collection meta
 	DescribeCollection(ctx context.Context, collName string) (*entity.Collection, error)
 	// DropCollection drop the specified collection
-	DropCollection(ctx context.Context, collName string) error
+	DropCollection(ctx context.Context, collName string, opts ...DropCollectionOption) error
 	// GetCollectionStatistics get collection statistics
 	GetCollectionStatistics(ctx context.Context, collName string) (map[string]string, error)
 	// LoadCollection load collection into memory
 	LoadCollection(ctx context.Context, collName string, async bool, opts ...LoadCollectionOption) error
 	// ReleaseCollection release loaded collection
-	ReleaseCollection(ctx context.Context, collName string) error
+	ReleaseCollection(ctx context.Context, collName string, opts ...ReleaseCollectionOption) error
 	// HasCollection check whether collection exists
 	HasCollection(ctx context.Context, collName string) (bool, error)
 	// RenameCollection performs renaming for provided collection.
@@ -91,17 +93,17 @@ type Client interface {
 	// -- partition --
 
 	// CreatePartition create partition for collection
-	CreatePartition(ctx context.Context, collName string, partitionName string) error
+	CreatePartition(ctx context.Context, collName string, partitionName string, opts ...CreatePartitionOption) error
 	// DropPartition drop partition from collection
-	DropPartition(ctx context.Context, collName string, partitionName string) error
+	DropPartition(ctx context.Context, collName string, partitionName string, opts ...DropPartitionOption) error
 	// ShowPartitions list all partitions from collection
 	ShowPartitions(ctx context.Context, collName string) ([]*entity.Partition, error)
 	// HasPartition check whether partition exists in collection
 	HasPartition(ctx context.Context, collName string, partitionName string) (bool, error)
 	// LoadPartitions load partitions into memory
-	LoadPartitions(ctx context.Context, collName string, partitionNames []string, async bool) error
+	LoadPartitions(ctx context.Context, collName string, partitionNames []string, async bool, opts ...LoadPartitionsOption) error
 	// ReleasePartitions release partitions
-	ReleasePartitions(ctx context.Context, collName string, partitionNames []string) error
+	ReleasePartitions(ctx context.Context, collName string, partitionNames []string, opts ...ReleasePartitionsOption) error
 
 	// -- segment --
 	GetPersistentSegmentInfo(ctx context.Context, collName string) ([]*entity.Segment, error)
@@ -124,10 +126,10 @@ type Client interface {
 	// Insert column-based data into collection, returns id column values
 	Insert(ctx context.Context, collName string, partitionName string, columns ...entity.Column) (entity.Column, error)
 	// Flush collection, specified
-	Flush(ctx context.Context, collName string, async bool) error
+	Flush(ctx context.Context, collName string, async bool, opts ...FlushOption) error
 	// FlushV2 flush collection, specified, return newly sealed segmentIds, all flushed segmentIds of the collection, seal time and error
 	// currently it is only used in milvus-backup(https://github.com/zilliztech/milvus-backup)
-	FlushV2(ctx context.Context, collName string, async bool) ([]int64, []int64, int64, error)
+	FlushV2(ctx context.Context, collName string, async bool, opts ...FlushOption) ([]int64, []int64, int64, error)
 	// DeleteByPks deletes entries related to provided primary keys
 	DeleteByPks(ctx context.Context, collName string, partitionName string, ids entity.Column) error
 	// Delete deletes entries match expression
@@ -211,6 +213,12 @@ type Client interface {
 	GetVersion(ctx context.Context) (string, error)
 	// CheckHealth returns milvus state
 	CheckHealth(ctx context.Context) (*entity.MilvusState, error)
+
+	ReplicateMessage(ctx context.Context,
+		channelName string, beginTs, endTs uint64,
+		msgsBytes [][]byte, startPositions, endPositions []*msgpb.MsgPosition,
+		opts ...ReplicateMessageOption,
+	) (*entity.MessageInfo, error)
 }
 
 // NewClient create a client connected to remote milvus cluster.
diff --git a/client/collection.go b/client/collection.go
index f954f32..e0fbcb8 100644
--- a/client/collection.go
+++ b/client/collection.go
@@ -18,6 +18,7 @@ import (
 	"github.com/cockroachdb/errors"
 
 	"github.com/golang/protobuf/proto"
+
 	"github.com/milvus-io/milvus-sdk-go/v2/entity"
 
 	"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
@@ -151,6 +152,7 @@ func (c *GrpcClient) requestCreateCollection(ctx context.Context, sch *entity.Sc
 	}
 
 	req := &milvuspb.CreateCollectionRequest{
+		Base:             opt.MsgBase,
 		DbName:           "", // reserved fields, not used for now
 		CollectionName:   sch.CollectionName,
 		Schema:           bs,
@@ -279,7 +281,7 @@ func (c *GrpcClient) DescribeCollection(ctx context.Context, collName string) (*
 }
 
 // DropCollection drop collection by name
-func (c *GrpcClient) DropCollection(ctx context.Context, collName string) error {
+func (c *GrpcClient) DropCollection(ctx context.Context, collName string, opts ...DropCollectionOption) error {
 	if c.Service == nil {
 		return ErrClientNotReady
 	}
@@ -290,6 +292,9 @@ func (c *GrpcClient) DropCollection(ctx context.Context, collName string) error
 	req := &milvuspb.DropCollectionRequest{
 		CollectionName: collName,
 	}
+	for _, opt := range opts {
+		opt(req)
+	}
 	resp, err := c.Service.DropCollection(ctx, req)
 	if err != nil {
 		return err
@@ -447,7 +452,7 @@ func (c *GrpcClient) LoadCollection(ctx context.Context, collName string, async
 }
 
 // ReleaseCollection release loaded collection
-func (c *GrpcClient) ReleaseCollection(ctx context.Context, collName string) error {
+func (c *GrpcClient) ReleaseCollection(ctx context.Context, collName string, opts ...ReleaseCollectionOption) error {
 	if c.Service == nil {
 		return ErrClientNotReady
 	}
@@ -459,6 +464,9 @@ func (c *GrpcClient) ReleaseCollection(ctx context.Context, collName string) err
 		DbName:         "", // reserved
 		CollectionName: collName,
 	}
+	for _, opt := range opts {
+		opt(req)
+	}
 	resp, err := c.Service.ReleaseCollection(ctx, req)
 	if err != nil {
 		return err
diff --git a/client/data.go b/client/data.go
index 9746f33..d40c45d 100644
--- a/client/data.go
+++ b/client/data.go
@@ -80,13 +80,17 @@ func (c *GrpcClient) Search(ctx context.Context, collName string, partitions []s
 			ResultCount: rc,
 			Scores:      results.GetScores()[offset : offset+rc],
 		}
-		entry.IDs, entry.Err = entity.IDColumns(results.GetIds(), offset, offset+rc)
-		if entry.Err != nil {
-			offset += rc
-			continue
+		// parse result set if current nq is not empty
+		if rc > 0 {
+			entry.IDs, entry.Err = entity.IDColumns(results.GetIds(), offset, offset+rc)
+			if entry.Err != nil {
+				offset += rc
+				continue
+			}
+			entry.Fields, entry.Err = c.parseSearchResult(schema, outputFields, fieldDataList, i, offset, offset+rc)
+			sr = append(sr, entry)
 		}
-		entry.Fields, entry.Err = c.parseSearchResult(schema, outputFields, fieldDataList, i, offset, offset+rc)
-		sr = append(sr, entry)
+
 		offset += rc
 	}
 	return sr, nil
diff --git a/client/database.go b/client/database.go
index 567987c..a52952c 100644
--- a/client/database.go
+++ b/client/database.go
@@ -40,7 +40,7 @@ func (c *GrpcClient) UsingDatabase(ctx context.Context, dbName string) error {
 
 // CreateDatabase creates a new database for remote Milvus cluster.
 // TODO:New options can be added as expanding parameters.
-func (c *GrpcClient) CreateDatabase(ctx context.Context, dbName string) error {
+func (c *GrpcClient) CreateDatabase(ctx context.Context, dbName string, opts ...CreateDatabaseOption) error {
 	if c.Service == nil {
 		return ErrClientNotReady
 	}
@@ -50,6 +50,9 @@ func (c *GrpcClient) CreateDatabase(ctx context.Context, dbName string) error {
 	req := &milvuspb.CreateDatabaseRequest{
 		DbName: dbName,
 	}
+	for _, opt := range opts {
+		opt(req)
+	}
 	resp, err := c.Service.CreateDatabase(ctx, req)
 	if err != nil {
 		return err
@@ -84,7 +87,7 @@ func (c *GrpcClient) ListDatabases(ctx context.Context) ([]entity.Database, erro
 }
 
 // DropDatabase drop all database in milvus cluster.
-func (c *GrpcClient) DropDatabase(ctx context.Context, dbName string) error {
+func (c *GrpcClient) DropDatabase(ctx context.Context, dbName string, opts ...DropDatabaseOption) error {
 	if c.Service == nil {
 		return ErrClientNotReady
 	}
@@ -95,6 +98,9 @@ func (c *GrpcClient) DropDatabase(ctx context.Context, dbName string) error {
 	req := &milvuspb.DropDatabaseRequest{
 		DbName: dbName,
 	}
+	for _, opt := range opts {
+		opt(req)
+	}
 	resp, err := c.Service.DropDatabase(ctx, req)
 	if err != nil {
 		return err
diff --git a/client/index.go b/client/index.go
index 6b71713..e6bbe65 100644
--- a/client/index.go
+++ b/client/index.go
@@ -58,6 +58,7 @@ type indexDef struct {
 	name           string
 	fieldName      string
 	collectionName string
+	MsgBase        *commonpb.MsgBase
 }
 
 // IndexOption is the predefined function to alter index def.
@@ -71,6 +72,12 @@ func WithIndexName(name string) IndexOption {
 	}
 }
 
+func WithIndexMsgBase(msgBase *commonpb.MsgBase) IndexOption {
+	return func(def *indexDef) {
+		def.MsgBase = msgBase
+	}
+}
+
 func getIndexDef(opts ...IndexOption) indexDef {
 	idxDef := indexDef{}
 	for _, opt := range opts {
@@ -93,6 +100,7 @@ func (c *GrpcClient) CreateIndex(ctx context.Context, collName string, fieldName
 	idxDef := getIndexDef(opts...)
 
 	req := &milvuspb.CreateIndexRequest{
+		Base:           idxDef.MsgBase,
 		DbName:         "", // reserved
 		CollectionName: collName,
 		FieldName:      fieldName,
@@ -167,6 +175,7 @@ func (c *GrpcClient) DropIndex(ctx context.Context, collName string, fieldName s
 
 	idxDef := getIndexDef(opts...)
 	req := &milvuspb.DropIndexRequest{
+		Base:           idxDef.MsgBase,
 		DbName:         "", //reserved,
 		CollectionName: collName,
 		FieldName:      fieldName,
diff --git a/client/insert.go b/client/insert.go
index 91b7c0f..fe24db4 100644
--- a/client/insert.go
+++ b/client/insert.go
@@ -190,14 +190,14 @@ func (c *GrpcClient) mergeDynamicColumns(dynamicName string, rowSize int, column
 
 // Flush force collection to flush memory records into storage
 // in sync mode, flush will wait all segments to be flushed
-func (c *GrpcClient) Flush(ctx context.Context, collName string, async bool) error {
-	_, _, _, err := c.FlushV2(ctx, collName, async)
+func (c *GrpcClient) Flush(ctx context.Context, collName string, async bool, opts ...FlushOption) error {
+	_, _, _, err := c.FlushV2(ctx, collName, async, opts...)
 	return err
 }
 
 // Flush force collection to flush memory records into storage
 // in sync mode, flush will wait all segments to be flushed
-func (c *GrpcClient) FlushV2(ctx context.Context, collName string, async bool) ([]int64, []int64, int64, error) {
+func (c *GrpcClient) FlushV2(ctx context.Context, collName string, async bool, opts ...FlushOption) ([]int64, []int64, int64, error) {
 	if c.Service == nil {
 		return nil, nil, 0, ErrClientNotReady
 	}
@@ -208,6 +208,9 @@ func (c *GrpcClient) FlushV2(ctx context.Context, collName string, async bool) (
 		DbName:          "", // reserved,
 		CollectionNames: []string{collName},
 	}
+	for _, opt := range opts {
+		opt(req)
+	}
 	resp, err := c.Service.Flush(ctx, req)
 	if err != nil {
 		return nil, nil, 0, err
diff --git a/client/mq_message.go b/client/mq_message.go
new file mode 100644
index 0000000..da645a1
--- /dev/null
+++ b/client/mq_message.go
@@ -0,0 +1,41 @@
+package client
+
+import (
+	"context"
+
+	"github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
+	"github.com/milvus-io/milvus-proto/go-api/v2/msgpb"
+	"github.com/milvus-io/milvus-sdk-go/v2/entity"
+)
+
+func (c *GrpcClient) ReplicateMessage(ctx context.Context,
+	channelName string, beginTs, endTs uint64,
+	msgsBytes [][]byte, startPositions, endPositions []*msgpb.MsgPosition,
+	opts ...ReplicateMessageOption) (*entity.MessageInfo, error) {
+
+	if c.Service == nil {
+		return nil, ErrClientNotReady
+	}
+	req := &milvuspb.ReplicateMessageRequest{
+		ChannelName:    channelName,
+		BeginTs:        beginTs,
+		EndTs:          endTs,
+		Msgs:           msgsBytes,
+		StartPositions: startPositions,
+		EndPositions:   endPositions,
+	}
+	for _, opt := range opts {
+		opt(req)
+	}
+	resp, err := c.Service.ReplicateMessage(ctx, req)
+	if err != nil {
+		return nil, err
+	}
+	err = handleRespStatus(resp.GetStatus())
+	if err != nil {
+		return nil, err
+	}
+	return &entity.MessageInfo{
+		Position: resp.GetPosition(),
+	}, nil
+}
diff --git a/client/options.go b/client/options.go
index 14875c3..3146cb7 100644
--- a/client/options.go
+++ b/client/options.go
@@ -16,6 +16,8 @@ import (
 
 	"github.com/cockroachdb/errors"
 
+	"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
+
 	"github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
 	"github.com/milvus-io/milvus-sdk-go/v2/entity"
 )
@@ -34,6 +36,7 @@ type createCollOpt struct {
 	AutoID              bool
 	EnableDynamicSchema bool
 	Properties          map[string]string
+	MsgBase             *commonpb.MsgBase
 }
 
 func WithPKFieldName(name string) CreateCollectionOption {
@@ -262,3 +265,23 @@ func GetWithOutputFields(outputFields ...string) GetOption {
 		o.outputFields = outputFields
 	}
 }
+
+type DropCollectionOption func(*milvuspb.DropCollectionRequest)
+
+type ReleaseCollectionOption func(*milvuspb.ReleaseCollectionRequest)
+
+type FlushOption func(*milvuspb.FlushRequest)
+
+type CreateDatabaseOption func(*milvuspb.CreateDatabaseRequest)
+
+type DropDatabaseOption func(*milvuspb.DropDatabaseRequest)
+
+type ReplicateMessageOption func(*milvuspb.ReplicateMessageRequest)
+
+type CreatePartitionOption func(*milvuspb.CreatePartitionRequest)
+
+type DropPartitionOption func(*milvuspb.DropPartitionRequest)
+
+type LoadPartitionsOption func(*milvuspb.LoadPartitionsRequest)
+
+type ReleasePartitionsOption func(*milvuspb.ReleasePartitionsRequest)
diff --git a/client/options_msg_base.go b/client/options_msg_base.go
new file mode 100644
index 0000000..a8c6013
--- /dev/null
+++ b/client/options_msg_base.go
@@ -0,0 +1,78 @@
+package client
+
+import (
+	"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
+	"github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
+)
+
+func WithCreateCollectionMsgBase(msgBase *commonpb.MsgBase) CreateCollectionOption {
+	return func(opt *createCollOpt) {
+		opt.MsgBase = msgBase
+	}
+}
+
+func WithDropCollectionMsgBase(msgBase *commonpb.MsgBase) DropCollectionOption {
+	return func(req *milvuspb.DropCollectionRequest) {
+		req.Base = msgBase
+	}
+}
+
+func WithLoadCollectionMsgBase(msgBase *commonpb.MsgBase) LoadCollectionOption {
+	return func(req *milvuspb.LoadCollectionRequest) {
+		req.Base = msgBase
+	}
+}
+
+func WithReleaseCollectionMsgBase(msgBase *commonpb.MsgBase) ReleaseCollectionOption {
+	return func(req *milvuspb.ReleaseCollectionRequest) {
+		req.Base = msgBase
+	}
+}
+
+func WithFlushMsgBase(msgBase *commonpb.MsgBase) FlushOption {
+	return func(req *milvuspb.FlushRequest) {
+		req.Base = msgBase
+	}
+}
+
+func WithCreateDatabaseMsgBase(msgBase *commonpb.MsgBase) CreateDatabaseOption {
+	return func(req *milvuspb.CreateDatabaseRequest) {
+		req.Base = msgBase
+	}
+}
+
+func WithDropDatabaseMsgBase(msgBase *commonpb.MsgBase) DropDatabaseOption {
+	return func(req *milvuspb.DropDatabaseRequest) {
+		req.Base = msgBase
+	}
+}
+
+func WithReplicateMessageMsgBase(msgBase *commonpb.MsgBase) ReplicateMessageOption {
+	return func(req *milvuspb.ReplicateMessageRequest) {
+		req.Base = msgBase
+	}
+}
+
+func WithCreatePartitionMsgBase(msgBase *commonpb.MsgBase) CreatePartitionOption {
+	return func(req *milvuspb.CreatePartitionRequest) {
+		req.Base = msgBase
+	}
+}
+
+func WithDropPartitionMsgBase(msgBase *commonpb.MsgBase) DropPartitionOption {
+	return func(req *milvuspb.DropPartitionRequest) {
+		req.Base = msgBase
+	}
+}
+
+func WithLoadPartitionsMsgBase(msgBase *commonpb.MsgBase) LoadPartitionsOption {
+	return func(req *milvuspb.LoadPartitionsRequest) {
+		req.Base = msgBase
+	}
+}
+
+func WithReleasePartitionMsgBase(msgBase *commonpb.MsgBase) ReleasePartitionsOption {
+	return func(req *milvuspb.ReleasePartitionsRequest) {
+		req.Base = msgBase
+	}
+}
diff --git a/client/partition.go b/client/partition.go
index 0d99ab0..d0f95ac 100644
--- a/client/partition.go
+++ b/client/partition.go
@@ -24,7 +24,7 @@ import (
 )
 
 // CreatePartition create partition for collection
-func (c *GrpcClient) CreatePartition(ctx context.Context, collName string, partitionName string) error {
+func (c *GrpcClient) CreatePartition(ctx context.Context, collName string, partitionName string, opts ...CreatePartitionOption) error {
 	if c.Service == nil {
 		return ErrClientNotReady
 	}
@@ -44,6 +44,9 @@ func (c *GrpcClient) CreatePartition(ctx context.Context, collName string, parti
 		CollectionName: collName,
 		PartitionName:  partitionName,
 	}
+	for _, opt := range opts {
+		opt(req)
+	}
 	resp, err := c.Service.CreatePartition(ctx, req)
 	if err != nil {
 		return err
@@ -63,7 +66,7 @@ func (c *GrpcClient) checkPartitionExists(ctx context.Context, collName string,
 }
 
 // DropPartition drop partition from collection
-func (c *GrpcClient) DropPartition(ctx context.Context, collName string, partitionName string) error {
+func (c *GrpcClient) DropPartition(ctx context.Context, collName string, partitionName string, opts ...DropPartitionOption) error {
 	if c.Service == nil {
 		return ErrClientNotReady
 	}
@@ -78,6 +81,9 @@ func (c *GrpcClient) DropPartition(ctx context.Context, collName string, partiti
 		CollectionName: collName,
 		PartitionName:  partitionName,
 	}
+	for _, opt := range opts {
+		opt(req)
+	}
 	resp, err := c.Service.DropPartition(ctx, req)
 	if err != nil {
 		return err
@@ -137,7 +143,7 @@ func (c *GrpcClient) ShowPartitions(ctx context.Context, collName string) ([]*en
 }
 
 // LoadPartitions load collection paritions into memory
-func (c *GrpcClient) LoadPartitions(ctx context.Context, collName string, partitionNames []string, async bool) error {
+func (c *GrpcClient) LoadPartitions(ctx context.Context, collName string, partitionNames []string, async bool, opts ...LoadPartitionsOption) error {
 	if c.Service == nil {
 		return ErrClientNotReady
 	}
@@ -155,6 +161,9 @@ func (c *GrpcClient) LoadPartitions(ctx context.Context, collName string, partit
 		CollectionName: collName,
 		PartitionNames: partitionNames,
 	}
+	for _, opt := range opts {
+		opt(req)
+	}
 	resp, err := c.Service.LoadPartitions(ctx, req)
 	if err != nil {
 		return err
@@ -187,7 +196,7 @@ func (c *GrpcClient) LoadPartitions(ctx context.Context, collName string, partit
 }
 
 // ReleasePartitions release partitions
-func (c *GrpcClient) ReleasePartitions(ctx context.Context, collName string, partitionNames []string) error {
+func (c *GrpcClient) ReleasePartitions(ctx context.Context, collName string, partitionNames []string, opts ...ReleasePartitionsOption) error {
 	if c.Service == nil {
 		return ErrClientNotReady
 	}
@@ -204,6 +213,9 @@ func (c *GrpcClient) ReleasePartitions(ctx context.Context, collName string, par
 		CollectionName: collName,
 		PartitionNames: partitionNames,
 	}
+	for _, opt := range opts {
+		opt(req)
+	}
 	resp, err := c.Service.ReleasePartitions(ctx, req)
 	if err != nil {
 		return err
diff --git a/entity/mq_message.go b/entity/mq_message.go
new file mode 100644
index 0000000..98013a3
--- /dev/null
+++ b/entity/mq_message.go
@@ -0,0 +1,5 @@
+package entity
+
+type MessageInfo struct {
+	Position string
+}
diff --git a/go.sum b/go.sum
index 1ff670a..33a249c 100644
--- a/go.sum
+++ b/go.sum
@@ -157,8 +157,6 @@ 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/v2 v2.3.1 h1:4qD1QJN6jDdote1UAZbEQoxKcH399oVod1GtiBYWQtQ=
-github.com/milvus-io/milvus-proto/go-api/v2 v2.3.1/go.mod h1:1OIl0v5PQeNxIJhCvY+K55CBUOYDZevw9g9380u1Wek=
 github.com/milvus-io/milvus-proto/go-api/v2 v2.3.2 h1:tBcKiEUcX6i3MaFYvMJO1F7R6fIoeLFkg1kSGE1Tvpk=
 github.com/milvus-io/milvus-proto/go-api/v2 v2.3.2/go.mod h1:1OIl0v5PQeNxIJhCvY+K55CBUOYDZevw9g9380u1Wek=
 github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
diff --git a/mocks/MilvusServiceServer.go b/mocks/MilvusServiceServer.go
index f7b887a..c14a7bb 100644
--- a/mocks/MilvusServiceServer.go
+++ b/mocks/MilvusServiceServer.go
@@ -59,8 +59,8 @@ type MilvusServiceServer_AllocTimestamp_Call struct {
 }
 
 // AllocTimestamp is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.AllocTimestampRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.AllocTimestampRequest
 func (_e *MilvusServiceServer_Expecter) AllocTimestamp(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_AllocTimestamp_Call {
 	return &MilvusServiceServer_AllocTimestamp_Call{Call: _e.mock.On("AllocTimestamp", _a0, _a1)}
 }
@@ -114,8 +114,8 @@ type MilvusServiceServer_AlterAlias_Call struct {
 }
 
 // AlterAlias is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.AlterAliasRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.AlterAliasRequest
 func (_e *MilvusServiceServer_Expecter) AlterAlias(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_AlterAlias_Call {
 	return &MilvusServiceServer_AlterAlias_Call{Call: _e.mock.On("AlterAlias", _a0, _a1)}
 }
@@ -169,8 +169,8 @@ type MilvusServiceServer_AlterCollection_Call struct {
 }
 
 // AlterCollection is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.AlterCollectionRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.AlterCollectionRequest
 func (_e *MilvusServiceServer_Expecter) AlterCollection(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_AlterCollection_Call {
 	return &MilvusServiceServer_AlterCollection_Call{Call: _e.mock.On("AlterCollection", _a0, _a1)}
 }
@@ -224,8 +224,8 @@ type MilvusServiceServer_CalcDistance_Call struct {
 }
 
 // CalcDistance is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.CalcDistanceRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.CalcDistanceRequest
 func (_e *MilvusServiceServer_Expecter) CalcDistance(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_CalcDistance_Call {
 	return &MilvusServiceServer_CalcDistance_Call{Call: _e.mock.On("CalcDistance", _a0, _a1)}
 }
@@ -279,8 +279,8 @@ type MilvusServiceServer_CheckHealth_Call struct {
 }
 
 // CheckHealth is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.CheckHealthRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.CheckHealthRequest
 func (_e *MilvusServiceServer_Expecter) CheckHealth(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_CheckHealth_Call {
 	return &MilvusServiceServer_CheckHealth_Call{Call: _e.mock.On("CheckHealth", _a0, _a1)}
 }
@@ -334,8 +334,8 @@ type MilvusServiceServer_Connect_Call struct {
 }
 
 // Connect is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.ConnectRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.ConnectRequest
 func (_e *MilvusServiceServer_Expecter) Connect(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_Connect_Call {
 	return &MilvusServiceServer_Connect_Call{Call: _e.mock.On("Connect", _a0, _a1)}
 }
@@ -389,8 +389,8 @@ type MilvusServiceServer_CreateAlias_Call struct {
 }
 
 // CreateAlias is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.CreateAliasRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.CreateAliasRequest
 func (_e *MilvusServiceServer_Expecter) CreateAlias(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_CreateAlias_Call {
 	return &MilvusServiceServer_CreateAlias_Call{Call: _e.mock.On("CreateAlias", _a0, _a1)}
 }
@@ -444,8 +444,8 @@ type MilvusServiceServer_CreateCollection_Call struct {
 }
 
 // CreateCollection is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.CreateCollectionRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.CreateCollectionRequest
 func (_e *MilvusServiceServer_Expecter) CreateCollection(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_CreateCollection_Call {
 	return &MilvusServiceServer_CreateCollection_Call{Call: _e.mock.On("CreateCollection", _a0, _a1)}
 }
@@ -499,8 +499,8 @@ type MilvusServiceServer_CreateCredential_Call struct {
 }
 
 // CreateCredential is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.CreateCredentialRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.CreateCredentialRequest
 func (_e *MilvusServiceServer_Expecter) CreateCredential(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_CreateCredential_Call {
 	return &MilvusServiceServer_CreateCredential_Call{Call: _e.mock.On("CreateCredential", _a0, _a1)}
 }
@@ -554,8 +554,8 @@ type MilvusServiceServer_CreateDatabase_Call struct {
 }
 
 // CreateDatabase is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.CreateDatabaseRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.CreateDatabaseRequest
 func (_e *MilvusServiceServer_Expecter) CreateDatabase(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_CreateDatabase_Call {
 	return &MilvusServiceServer_CreateDatabase_Call{Call: _e.mock.On("CreateDatabase", _a0, _a1)}
 }
@@ -609,8 +609,8 @@ type MilvusServiceServer_CreateIndex_Call struct {
 }
 
 // CreateIndex is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.CreateIndexRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.CreateIndexRequest
 func (_e *MilvusServiceServer_Expecter) CreateIndex(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_CreateIndex_Call {
 	return &MilvusServiceServer_CreateIndex_Call{Call: _e.mock.On("CreateIndex", _a0, _a1)}
 }
@@ -664,8 +664,8 @@ type MilvusServiceServer_CreatePartition_Call struct {
 }
 
 // CreatePartition is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.CreatePartitionRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.CreatePartitionRequest
 func (_e *MilvusServiceServer_Expecter) CreatePartition(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_CreatePartition_Call {
 	return &MilvusServiceServer_CreatePartition_Call{Call: _e.mock.On("CreatePartition", _a0, _a1)}
 }
@@ -719,8 +719,8 @@ type MilvusServiceServer_CreateResourceGroup_Call struct {
 }
 
 // CreateResourceGroup is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.CreateResourceGroupRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.CreateResourceGroupRequest
 func (_e *MilvusServiceServer_Expecter) CreateResourceGroup(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_CreateResourceGroup_Call {
 	return &MilvusServiceServer_CreateResourceGroup_Call{Call: _e.mock.On("CreateResourceGroup", _a0, _a1)}
 }
@@ -774,8 +774,8 @@ type MilvusServiceServer_CreateRole_Call struct {
 }
 
 // CreateRole is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.CreateRoleRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.CreateRoleRequest
 func (_e *MilvusServiceServer_Expecter) CreateRole(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_CreateRole_Call {
 	return &MilvusServiceServer_CreateRole_Call{Call: _e.mock.On("CreateRole", _a0, _a1)}
 }
@@ -829,8 +829,8 @@ type MilvusServiceServer_Delete_Call struct {
 }
 
 // Delete is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.DeleteRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.DeleteRequest
 func (_e *MilvusServiceServer_Expecter) Delete(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_Delete_Call {
 	return &MilvusServiceServer_Delete_Call{Call: _e.mock.On("Delete", _a0, _a1)}
 }
@@ -884,8 +884,8 @@ type MilvusServiceServer_DeleteCredential_Call struct {
 }
 
 // DeleteCredential is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.DeleteCredentialRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.DeleteCredentialRequest
 func (_e *MilvusServiceServer_Expecter) DeleteCredential(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_DeleteCredential_Call {
 	return &MilvusServiceServer_DeleteCredential_Call{Call: _e.mock.On("DeleteCredential", _a0, _a1)}
 }
@@ -939,8 +939,8 @@ type MilvusServiceServer_DescribeAlias_Call struct {
 }
 
 // DescribeAlias is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.DescribeAliasRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.DescribeAliasRequest
 func (_e *MilvusServiceServer_Expecter) DescribeAlias(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_DescribeAlias_Call {
 	return &MilvusServiceServer_DescribeAlias_Call{Call: _e.mock.On("DescribeAlias", _a0, _a1)}
 }
@@ -994,8 +994,8 @@ type MilvusServiceServer_DescribeCollection_Call struct {
 }
 
 // DescribeCollection is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.DescribeCollectionRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.DescribeCollectionRequest
 func (_e *MilvusServiceServer_Expecter) DescribeCollection(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_DescribeCollection_Call {
 	return &MilvusServiceServer_DescribeCollection_Call{Call: _e.mock.On("DescribeCollection", _a0, _a1)}
 }
@@ -1049,8 +1049,8 @@ type MilvusServiceServer_DescribeIndex_Call struct {
 }
 
 // DescribeIndex is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.DescribeIndexRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.DescribeIndexRequest
 func (_e *MilvusServiceServer_Expecter) DescribeIndex(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_DescribeIndex_Call {
 	return &MilvusServiceServer_DescribeIndex_Call{Call: _e.mock.On("DescribeIndex", _a0, _a1)}
 }
@@ -1104,8 +1104,8 @@ type MilvusServiceServer_DescribeResourceGroup_Call struct {
 }
 
 // DescribeResourceGroup is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.DescribeResourceGroupRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.DescribeResourceGroupRequest
 func (_e *MilvusServiceServer_Expecter) DescribeResourceGroup(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_DescribeResourceGroup_Call {
 	return &MilvusServiceServer_DescribeResourceGroup_Call{Call: _e.mock.On("DescribeResourceGroup", _a0, _a1)}
 }
@@ -1159,8 +1159,8 @@ type MilvusServiceServer_DescribeSegmentIndexData_Call struct {
 }
 
 // DescribeSegmentIndexData is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *federpb.DescribeSegmentIndexDataRequest
+//  - _a0 context.Context
+//  - _a1 *federpb.DescribeSegmentIndexDataRequest
 func (_e *MilvusServiceServer_Expecter) DescribeSegmentIndexData(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_DescribeSegmentIndexData_Call {
 	return &MilvusServiceServer_DescribeSegmentIndexData_Call{Call: _e.mock.On("DescribeSegmentIndexData", _a0, _a1)}
 }
@@ -1214,8 +1214,8 @@ type MilvusServiceServer_DropAlias_Call struct {
 }
 
 // DropAlias is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.DropAliasRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.DropAliasRequest
 func (_e *MilvusServiceServer_Expecter) DropAlias(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_DropAlias_Call {
 	return &MilvusServiceServer_DropAlias_Call{Call: _e.mock.On("DropAlias", _a0, _a1)}
 }
@@ -1269,8 +1269,8 @@ type MilvusServiceServer_DropCollection_Call struct {
 }
 
 // DropCollection is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.DropCollectionRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.DropCollectionRequest
 func (_e *MilvusServiceServer_Expecter) DropCollection(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_DropCollection_Call {
 	return &MilvusServiceServer_DropCollection_Call{Call: _e.mock.On("DropCollection", _a0, _a1)}
 }
@@ -1324,8 +1324,8 @@ type MilvusServiceServer_DropDatabase_Call struct {
 }
 
 // DropDatabase is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.DropDatabaseRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.DropDatabaseRequest
 func (_e *MilvusServiceServer_Expecter) DropDatabase(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_DropDatabase_Call {
 	return &MilvusServiceServer_DropDatabase_Call{Call: _e.mock.On("DropDatabase", _a0, _a1)}
 }
@@ -1379,8 +1379,8 @@ type MilvusServiceServer_DropIndex_Call struct {
 }
 
 // DropIndex is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.DropIndexRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.DropIndexRequest
 func (_e *MilvusServiceServer_Expecter) DropIndex(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_DropIndex_Call {
 	return &MilvusServiceServer_DropIndex_Call{Call: _e.mock.On("DropIndex", _a0, _a1)}
 }
@@ -1434,8 +1434,8 @@ type MilvusServiceServer_DropPartition_Call struct {
 }
 
 // DropPartition is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.DropPartitionRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.DropPartitionRequest
 func (_e *MilvusServiceServer_Expecter) DropPartition(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_DropPartition_Call {
 	return &MilvusServiceServer_DropPartition_Call{Call: _e.mock.On("DropPartition", _a0, _a1)}
 }
@@ -1489,8 +1489,8 @@ type MilvusServiceServer_DropResourceGroup_Call struct {
 }
 
 // DropResourceGroup is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.DropResourceGroupRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.DropResourceGroupRequest
 func (_e *MilvusServiceServer_Expecter) DropResourceGroup(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_DropResourceGroup_Call {
 	return &MilvusServiceServer_DropResourceGroup_Call{Call: _e.mock.On("DropResourceGroup", _a0, _a1)}
 }
@@ -1544,8 +1544,8 @@ type MilvusServiceServer_DropRole_Call struct {
 }
 
 // DropRole is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.DropRoleRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.DropRoleRequest
 func (_e *MilvusServiceServer_Expecter) DropRole(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_DropRole_Call {
 	return &MilvusServiceServer_DropRole_Call{Call: _e.mock.On("DropRole", _a0, _a1)}
 }
@@ -1599,8 +1599,8 @@ type MilvusServiceServer_Dummy_Call struct {
 }
 
 // Dummy is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.DummyRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.DummyRequest
 func (_e *MilvusServiceServer_Expecter) Dummy(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_Dummy_Call {
 	return &MilvusServiceServer_Dummy_Call{Call: _e.mock.On("Dummy", _a0, _a1)}
 }
@@ -1654,8 +1654,8 @@ type MilvusServiceServer_Flush_Call struct {
 }
 
 // Flush is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.FlushRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.FlushRequest
 func (_e *MilvusServiceServer_Expecter) Flush(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_Flush_Call {
 	return &MilvusServiceServer_Flush_Call{Call: _e.mock.On("Flush", _a0, _a1)}
 }
@@ -1709,8 +1709,8 @@ type MilvusServiceServer_FlushAll_Call struct {
 }
 
 // FlushAll is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.FlushAllRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.FlushAllRequest
 func (_e *MilvusServiceServer_Expecter) FlushAll(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_FlushAll_Call {
 	return &MilvusServiceServer_FlushAll_Call{Call: _e.mock.On("FlushAll", _a0, _a1)}
 }
@@ -1764,8 +1764,8 @@ type MilvusServiceServer_GetCollectionStatistics_Call struct {
 }
 
 // GetCollectionStatistics is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.GetCollectionStatisticsRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.GetCollectionStatisticsRequest
 func (_e *MilvusServiceServer_Expecter) GetCollectionStatistics(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetCollectionStatistics_Call {
 	return &MilvusServiceServer_GetCollectionStatistics_Call{Call: _e.mock.On("GetCollectionStatistics", _a0, _a1)}
 }
@@ -1819,8 +1819,8 @@ type MilvusServiceServer_GetCompactionState_Call struct {
 }
 
 // GetCompactionState is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.GetCompactionStateRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.GetCompactionStateRequest
 func (_e *MilvusServiceServer_Expecter) GetCompactionState(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetCompactionState_Call {
 	return &MilvusServiceServer_GetCompactionState_Call{Call: _e.mock.On("GetCompactionState", _a0, _a1)}
 }
@@ -1874,8 +1874,8 @@ type MilvusServiceServer_GetCompactionStateWithPlans_Call struct {
 }
 
 // GetCompactionStateWithPlans is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.GetCompactionPlansRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.GetCompactionPlansRequest
 func (_e *MilvusServiceServer_Expecter) GetCompactionStateWithPlans(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetCompactionStateWithPlans_Call {
 	return &MilvusServiceServer_GetCompactionStateWithPlans_Call{Call: _e.mock.On("GetCompactionStateWithPlans", _a0, _a1)}
 }
@@ -1929,8 +1929,8 @@ type MilvusServiceServer_GetComponentStates_Call struct {
 }
 
 // GetComponentStates is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.GetComponentStatesRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.GetComponentStatesRequest
 func (_e *MilvusServiceServer_Expecter) GetComponentStates(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetComponentStates_Call {
 	return &MilvusServiceServer_GetComponentStates_Call{Call: _e.mock.On("GetComponentStates", _a0, _a1)}
 }
@@ -1984,8 +1984,8 @@ type MilvusServiceServer_GetFlushAllState_Call struct {
 }
 
 // GetFlushAllState is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.GetFlushAllStateRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.GetFlushAllStateRequest
 func (_e *MilvusServiceServer_Expecter) GetFlushAllState(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetFlushAllState_Call {
 	return &MilvusServiceServer_GetFlushAllState_Call{Call: _e.mock.On("GetFlushAllState", _a0, _a1)}
 }
@@ -2039,8 +2039,8 @@ type MilvusServiceServer_GetFlushState_Call struct {
 }
 
 // GetFlushState is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.GetFlushStateRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.GetFlushStateRequest
 func (_e *MilvusServiceServer_Expecter) GetFlushState(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetFlushState_Call {
 	return &MilvusServiceServer_GetFlushState_Call{Call: _e.mock.On("GetFlushState", _a0, _a1)}
 }
@@ -2094,8 +2094,8 @@ type MilvusServiceServer_GetImportState_Call struct {
 }
 
 // GetImportState is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.GetImportStateRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.GetImportStateRequest
 func (_e *MilvusServiceServer_Expecter) GetImportState(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetImportState_Call {
 	return &MilvusServiceServer_GetImportState_Call{Call: _e.mock.On("GetImportState", _a0, _a1)}
 }
@@ -2149,8 +2149,8 @@ type MilvusServiceServer_GetIndexBuildProgress_Call struct {
 }
 
 // GetIndexBuildProgress is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.GetIndexBuildProgressRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.GetIndexBuildProgressRequest
 func (_e *MilvusServiceServer_Expecter) GetIndexBuildProgress(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetIndexBuildProgress_Call {
 	return &MilvusServiceServer_GetIndexBuildProgress_Call{Call: _e.mock.On("GetIndexBuildProgress", _a0, _a1)}
 }
@@ -2204,8 +2204,8 @@ type MilvusServiceServer_GetIndexState_Call struct {
 }
 
 // GetIndexState is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.GetIndexStateRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.GetIndexStateRequest
 func (_e *MilvusServiceServer_Expecter) GetIndexState(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetIndexState_Call {
 	return &MilvusServiceServer_GetIndexState_Call{Call: _e.mock.On("GetIndexState", _a0, _a1)}
 }
@@ -2259,8 +2259,8 @@ type MilvusServiceServer_GetIndexStatistics_Call struct {
 }
 
 // GetIndexStatistics is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.GetIndexStatisticsRequest
+//  - _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)}
 }
@@ -2314,8 +2314,8 @@ type MilvusServiceServer_GetLoadState_Call struct {
 }
 
 // GetLoadState is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.GetLoadStateRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.GetLoadStateRequest
 func (_e *MilvusServiceServer_Expecter) GetLoadState(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetLoadState_Call {
 	return &MilvusServiceServer_GetLoadState_Call{Call: _e.mock.On("GetLoadState", _a0, _a1)}
 }
@@ -2369,8 +2369,8 @@ type MilvusServiceServer_GetLoadingProgress_Call struct {
 }
 
 // GetLoadingProgress is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.GetLoadingProgressRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.GetLoadingProgressRequest
 func (_e *MilvusServiceServer_Expecter) GetLoadingProgress(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetLoadingProgress_Call {
 	return &MilvusServiceServer_GetLoadingProgress_Call{Call: _e.mock.On("GetLoadingProgress", _a0, _a1)}
 }
@@ -2424,8 +2424,8 @@ type MilvusServiceServer_GetMetrics_Call struct {
 }
 
 // GetMetrics is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.GetMetricsRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.GetMetricsRequest
 func (_e *MilvusServiceServer_Expecter) GetMetrics(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetMetrics_Call {
 	return &MilvusServiceServer_GetMetrics_Call{Call: _e.mock.On("GetMetrics", _a0, _a1)}
 }
@@ -2479,8 +2479,8 @@ type MilvusServiceServer_GetPartitionStatistics_Call struct {
 }
 
 // GetPartitionStatistics is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.GetPartitionStatisticsRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.GetPartitionStatisticsRequest
 func (_e *MilvusServiceServer_Expecter) GetPartitionStatistics(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetPartitionStatistics_Call {
 	return &MilvusServiceServer_GetPartitionStatistics_Call{Call: _e.mock.On("GetPartitionStatistics", _a0, _a1)}
 }
@@ -2534,8 +2534,8 @@ type MilvusServiceServer_GetPersistentSegmentInfo_Call struct {
 }
 
 // GetPersistentSegmentInfo is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.GetPersistentSegmentInfoRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.GetPersistentSegmentInfoRequest
 func (_e *MilvusServiceServer_Expecter) GetPersistentSegmentInfo(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetPersistentSegmentInfo_Call {
 	return &MilvusServiceServer_GetPersistentSegmentInfo_Call{Call: _e.mock.On("GetPersistentSegmentInfo", _a0, _a1)}
 }
@@ -2589,8 +2589,8 @@ type MilvusServiceServer_GetQuerySegmentInfo_Call struct {
 }
 
 // GetQuerySegmentInfo is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.GetQuerySegmentInfoRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.GetQuerySegmentInfoRequest
 func (_e *MilvusServiceServer_Expecter) GetQuerySegmentInfo(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetQuerySegmentInfo_Call {
 	return &MilvusServiceServer_GetQuerySegmentInfo_Call{Call: _e.mock.On("GetQuerySegmentInfo", _a0, _a1)}
 }
@@ -2644,8 +2644,8 @@ type MilvusServiceServer_GetReplicas_Call struct {
 }
 
 // GetReplicas is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.GetReplicasRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.GetReplicasRequest
 func (_e *MilvusServiceServer_Expecter) GetReplicas(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetReplicas_Call {
 	return &MilvusServiceServer_GetReplicas_Call{Call: _e.mock.On("GetReplicas", _a0, _a1)}
 }
@@ -2699,8 +2699,8 @@ type MilvusServiceServer_GetVersion_Call struct {
 }
 
 // GetVersion is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.GetVersionRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.GetVersionRequest
 func (_e *MilvusServiceServer_Expecter) GetVersion(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetVersion_Call {
 	return &MilvusServiceServer_GetVersion_Call{Call: _e.mock.On("GetVersion", _a0, _a1)}
 }
@@ -2754,8 +2754,8 @@ type MilvusServiceServer_HasCollection_Call struct {
 }
 
 // HasCollection is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.HasCollectionRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.HasCollectionRequest
 func (_e *MilvusServiceServer_Expecter) HasCollection(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_HasCollection_Call {
 	return &MilvusServiceServer_HasCollection_Call{Call: _e.mock.On("HasCollection", _a0, _a1)}
 }
@@ -2809,8 +2809,8 @@ type MilvusServiceServer_HasPartition_Call struct {
 }
 
 // HasPartition is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.HasPartitionRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.HasPartitionRequest
 func (_e *MilvusServiceServer_Expecter) HasPartition(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_HasPartition_Call {
 	return &MilvusServiceServer_HasPartition_Call{Call: _e.mock.On("HasPartition", _a0, _a1)}
 }
@@ -2864,8 +2864,8 @@ type MilvusServiceServer_Import_Call struct {
 }
 
 // Import is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.ImportRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.ImportRequest
 func (_e *MilvusServiceServer_Expecter) Import(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_Import_Call {
 	return &MilvusServiceServer_Import_Call{Call: _e.mock.On("Import", _a0, _a1)}
 }
@@ -2919,8 +2919,8 @@ type MilvusServiceServer_Insert_Call struct {
 }
 
 // Insert is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.InsertRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.InsertRequest
 func (_e *MilvusServiceServer_Expecter) Insert(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_Insert_Call {
 	return &MilvusServiceServer_Insert_Call{Call: _e.mock.On("Insert", _a0, _a1)}
 }
@@ -2974,8 +2974,8 @@ type MilvusServiceServer_ListAliases_Call struct {
 }
 
 // ListAliases is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.ListAliasesRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.ListAliasesRequest
 func (_e *MilvusServiceServer_Expecter) ListAliases(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_ListAliases_Call {
 	return &MilvusServiceServer_ListAliases_Call{Call: _e.mock.On("ListAliases", _a0, _a1)}
 }
@@ -3029,8 +3029,8 @@ type MilvusServiceServer_ListCredUsers_Call struct {
 }
 
 // ListCredUsers is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.ListCredUsersRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.ListCredUsersRequest
 func (_e *MilvusServiceServer_Expecter) ListCredUsers(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_ListCredUsers_Call {
 	return &MilvusServiceServer_ListCredUsers_Call{Call: _e.mock.On("ListCredUsers", _a0, _a1)}
 }
@@ -3084,8 +3084,8 @@ type MilvusServiceServer_ListDatabases_Call struct {
 }
 
 // ListDatabases is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.ListDatabasesRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.ListDatabasesRequest
 func (_e *MilvusServiceServer_Expecter) ListDatabases(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_ListDatabases_Call {
 	return &MilvusServiceServer_ListDatabases_Call{Call: _e.mock.On("ListDatabases", _a0, _a1)}
 }
@@ -3139,8 +3139,8 @@ type MilvusServiceServer_ListImportTasks_Call struct {
 }
 
 // ListImportTasks is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.ListImportTasksRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.ListImportTasksRequest
 func (_e *MilvusServiceServer_Expecter) ListImportTasks(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_ListImportTasks_Call {
 	return &MilvusServiceServer_ListImportTasks_Call{Call: _e.mock.On("ListImportTasks", _a0, _a1)}
 }
@@ -3194,8 +3194,8 @@ type MilvusServiceServer_ListIndexedSegment_Call struct {
 }
 
 // ListIndexedSegment is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *federpb.ListIndexedSegmentRequest
+//  - _a0 context.Context
+//  - _a1 *federpb.ListIndexedSegmentRequest
 func (_e *MilvusServiceServer_Expecter) ListIndexedSegment(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_ListIndexedSegment_Call {
 	return &MilvusServiceServer_ListIndexedSegment_Call{Call: _e.mock.On("ListIndexedSegment", _a0, _a1)}
 }
@@ -3249,8 +3249,8 @@ type MilvusServiceServer_ListResourceGroups_Call struct {
 }
 
 // ListResourceGroups is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.ListResourceGroupsRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.ListResourceGroupsRequest
 func (_e *MilvusServiceServer_Expecter) ListResourceGroups(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_ListResourceGroups_Call {
 	return &MilvusServiceServer_ListResourceGroups_Call{Call: _e.mock.On("ListResourceGroups", _a0, _a1)}
 }
@@ -3304,8 +3304,8 @@ type MilvusServiceServer_LoadBalance_Call struct {
 }
 
 // LoadBalance is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.LoadBalanceRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.LoadBalanceRequest
 func (_e *MilvusServiceServer_Expecter) LoadBalance(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_LoadBalance_Call {
 	return &MilvusServiceServer_LoadBalance_Call{Call: _e.mock.On("LoadBalance", _a0, _a1)}
 }
@@ -3359,8 +3359,8 @@ type MilvusServiceServer_LoadCollection_Call struct {
 }
 
 // LoadCollection is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.LoadCollectionRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.LoadCollectionRequest
 func (_e *MilvusServiceServer_Expecter) LoadCollection(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_LoadCollection_Call {
 	return &MilvusServiceServer_LoadCollection_Call{Call: _e.mock.On("LoadCollection", _a0, _a1)}
 }
@@ -3414,8 +3414,8 @@ type MilvusServiceServer_LoadPartitions_Call struct {
 }
 
 // LoadPartitions is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.LoadPartitionsRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.LoadPartitionsRequest
 func (_e *MilvusServiceServer_Expecter) LoadPartitions(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_LoadPartitions_Call {
 	return &MilvusServiceServer_LoadPartitions_Call{Call: _e.mock.On("LoadPartitions", _a0, _a1)}
 }
@@ -3469,8 +3469,8 @@ type MilvusServiceServer_ManualCompaction_Call struct {
 }
 
 // ManualCompaction is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.ManualCompactionRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.ManualCompactionRequest
 func (_e *MilvusServiceServer_Expecter) ManualCompaction(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_ManualCompaction_Call {
 	return &MilvusServiceServer_ManualCompaction_Call{Call: _e.mock.On("ManualCompaction", _a0, _a1)}
 }
@@ -3524,8 +3524,8 @@ type MilvusServiceServer_OperatePrivilege_Call struct {
 }
 
 // OperatePrivilege is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.OperatePrivilegeRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.OperatePrivilegeRequest
 func (_e *MilvusServiceServer_Expecter) OperatePrivilege(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_OperatePrivilege_Call {
 	return &MilvusServiceServer_OperatePrivilege_Call{Call: _e.mock.On("OperatePrivilege", _a0, _a1)}
 }
@@ -3579,8 +3579,8 @@ type MilvusServiceServer_OperateUserRole_Call struct {
 }
 
 // OperateUserRole is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.OperateUserRoleRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.OperateUserRoleRequest
 func (_e *MilvusServiceServer_Expecter) OperateUserRole(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_OperateUserRole_Call {
 	return &MilvusServiceServer_OperateUserRole_Call{Call: _e.mock.On("OperateUserRole", _a0, _a1)}
 }
@@ -3634,8 +3634,8 @@ type MilvusServiceServer_Query_Call struct {
 }
 
 // Query is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.QueryRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.QueryRequest
 func (_e *MilvusServiceServer_Expecter) Query(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_Query_Call {
 	return &MilvusServiceServer_Query_Call{Call: _e.mock.On("Query", _a0, _a1)}
 }
@@ -3689,8 +3689,8 @@ type MilvusServiceServer_RegisterLink_Call struct {
 }
 
 // RegisterLink is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.RegisterLinkRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.RegisterLinkRequest
 func (_e *MilvusServiceServer_Expecter) RegisterLink(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_RegisterLink_Call {
 	return &MilvusServiceServer_RegisterLink_Call{Call: _e.mock.On("RegisterLink", _a0, _a1)}
 }
@@ -3744,8 +3744,8 @@ type MilvusServiceServer_ReleaseCollection_Call struct {
 }
 
 // ReleaseCollection is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.ReleaseCollectionRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.ReleaseCollectionRequest
 func (_e *MilvusServiceServer_Expecter) ReleaseCollection(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_ReleaseCollection_Call {
 	return &MilvusServiceServer_ReleaseCollection_Call{Call: _e.mock.On("ReleaseCollection", _a0, _a1)}
 }
@@ -3799,8 +3799,8 @@ type MilvusServiceServer_ReleasePartitions_Call struct {
 }
 
 // ReleasePartitions is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.ReleasePartitionsRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.ReleasePartitionsRequest
 func (_e *MilvusServiceServer_Expecter) ReleasePartitions(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_ReleasePartitions_Call {
 	return &MilvusServiceServer_ReleasePartitions_Call{Call: _e.mock.On("ReleasePartitions", _a0, _a1)}
 }
@@ -3854,8 +3854,8 @@ type MilvusServiceServer_RenameCollection_Call struct {
 }
 
 // RenameCollection is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.RenameCollectionRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.RenameCollectionRequest
 func (_e *MilvusServiceServer_Expecter) RenameCollection(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_RenameCollection_Call {
 	return &MilvusServiceServer_RenameCollection_Call{Call: _e.mock.On("RenameCollection", _a0, _a1)}
 }
@@ -3964,8 +3964,8 @@ type MilvusServiceServer_Search_Call struct {
 }
 
 // Search is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.SearchRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.SearchRequest
 func (_e *MilvusServiceServer_Expecter) Search(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_Search_Call {
 	return &MilvusServiceServer_Search_Call{Call: _e.mock.On("Search", _a0, _a1)}
 }
@@ -4019,8 +4019,8 @@ type MilvusServiceServer_SelectGrant_Call struct {
 }
 
 // SelectGrant is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.SelectGrantRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.SelectGrantRequest
 func (_e *MilvusServiceServer_Expecter) SelectGrant(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_SelectGrant_Call {
 	return &MilvusServiceServer_SelectGrant_Call{Call: _e.mock.On("SelectGrant", _a0, _a1)}
 }
@@ -4074,8 +4074,8 @@ type MilvusServiceServer_SelectRole_Call struct {
 }
 
 // SelectRole is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.SelectRoleRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.SelectRoleRequest
 func (_e *MilvusServiceServer_Expecter) SelectRole(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_SelectRole_Call {
 	return &MilvusServiceServer_SelectRole_Call{Call: _e.mock.On("SelectRole", _a0, _a1)}
 }
@@ -4129,8 +4129,8 @@ type MilvusServiceServer_SelectUser_Call struct {
 }
 
 // SelectUser is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.SelectUserRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.SelectUserRequest
 func (_e *MilvusServiceServer_Expecter) SelectUser(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_SelectUser_Call {
 	return &MilvusServiceServer_SelectUser_Call{Call: _e.mock.On("SelectUser", _a0, _a1)}
 }
@@ -4184,8 +4184,8 @@ type MilvusServiceServer_ShowCollections_Call struct {
 }
 
 // ShowCollections is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.ShowCollectionsRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.ShowCollectionsRequest
 func (_e *MilvusServiceServer_Expecter) ShowCollections(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_ShowCollections_Call {
 	return &MilvusServiceServer_ShowCollections_Call{Call: _e.mock.On("ShowCollections", _a0, _a1)}
 }
@@ -4239,8 +4239,8 @@ type MilvusServiceServer_ShowPartitions_Call struct {
 }
 
 // ShowPartitions is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.ShowPartitionsRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.ShowPartitionsRequest
 func (_e *MilvusServiceServer_Expecter) ShowPartitions(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_ShowPartitions_Call {
 	return &MilvusServiceServer_ShowPartitions_Call{Call: _e.mock.On("ShowPartitions", _a0, _a1)}
 }
@@ -4294,8 +4294,8 @@ type MilvusServiceServer_TransferNode_Call struct {
 }
 
 // TransferNode is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.TransferNodeRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.TransferNodeRequest
 func (_e *MilvusServiceServer_Expecter) TransferNode(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_TransferNode_Call {
 	return &MilvusServiceServer_TransferNode_Call{Call: _e.mock.On("TransferNode", _a0, _a1)}
 }
@@ -4349,8 +4349,8 @@ type MilvusServiceServer_TransferReplica_Call struct {
 }
 
 // TransferReplica is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.TransferReplicaRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.TransferReplicaRequest
 func (_e *MilvusServiceServer_Expecter) TransferReplica(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_TransferReplica_Call {
 	return &MilvusServiceServer_TransferReplica_Call{Call: _e.mock.On("TransferReplica", _a0, _a1)}
 }
@@ -4404,8 +4404,8 @@ type MilvusServiceServer_UpdateCredential_Call struct {
 }
 
 // UpdateCredential is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.UpdateCredentialRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.UpdateCredentialRequest
 func (_e *MilvusServiceServer_Expecter) UpdateCredential(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_UpdateCredential_Call {
 	return &MilvusServiceServer_UpdateCredential_Call{Call: _e.mock.On("UpdateCredential", _a0, _a1)}
 }
@@ -4459,8 +4459,8 @@ type MilvusServiceServer_Upsert_Call struct {
 }
 
 // Upsert is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.UpsertRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.UpsertRequest
 func (_e *MilvusServiceServer_Expecter) Upsert(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_Upsert_Call {
 	return &MilvusServiceServer_Upsert_Call{Call: _e.mock.On("Upsert", _a0, _a1)}
 }


Test patch:
diff --git a/client/client_mock_test.go b/client/client_mock_test.go
index cb0c1bd..2c06e5b 100644
--- a/client/client_mock_test.go
+++ b/client/client_mock_test.go
@@ -300,6 +300,8 @@ const (
 	MListDatabase   ServiceMethod = 1000
 	MCreateDatabase ServiceMethod = 1001
 	MDropDatabase   ServiceMethod = 1002
+
+	MReplicateMessage ServiceMethod = 1100
 )
 
 // injection function definition
@@ -924,8 +926,14 @@ func (m *MockServer) AllocTimestamp(_ context.Context, _ *milvuspb.AllocTimestam
 	panic("not implemented")
 }
 
-func (m *MockServer) ReplicateMessage(_ context.Context, _ *milvuspb.ReplicateMessageRequest) (*milvuspb.ReplicateMessageResponse, error) {
-	panic("not implemented")
+func (m *MockServer) ReplicateMessage(ctx context.Context, req *milvuspb.ReplicateMessageRequest) (*milvuspb.ReplicateMessageResponse, error) {
+	f := m.GetInjection(MReplicateMessage)
+	if f != nil {
+		r, err := f(ctx, req)
+		return r.(*milvuspb.ReplicateMessageResponse), err
+	}
+	s, err := SuccessStatus()
+	return &milvuspb.ReplicateMessageResponse{Status: s}, err
 }
 
 func (m *MockServer) Connect(_ context.Context, _ *milvuspb.ConnectRequest) (*milvuspb.ConnectResponse, error) {
diff --git a/client/collection_test.go b/client/collection_test.go
index e7378e3..fc144b3 100644
--- a/client/collection_test.go
+++ b/client/collection_test.go
@@ -126,7 +126,7 @@ func (s *CollectionSuite) TestCreateCollection() {
 			Return(&commonpb.Status{ErrorCode: commonpb.ErrorCode_Success}, nil)
 		s.mock.EXPECT().HasCollection(mock.Anything, &milvuspb.HasCollectionRequest{CollectionName: testCollectionName}).Return(&milvuspb.BoolResponse{Status: &commonpb.Status{}, Value: false}, nil)
 
-		err := c.CreateCollection(ctx, ds, shardsNum)
+		err := c.CreateCollection(ctx, ds, shardsNum, WithCreateCollectionMsgBase(&commonpb.MsgBase{}))
 		s.NoError(err)
 	})
 
@@ -514,7 +514,7 @@ func (s *CollectionSuite) TestLoadCollection() {
 
 		s.mock.EXPECT().LoadCollection(mock.Anything, mock.Anything).Return(&commonpb.Status{ErrorCode: commonpb.ErrorCode_Success}, nil)
 
-		err := c.LoadCollection(ctx, testCollectionName, true)
+		err := c.LoadCollection(ctx, testCollectionName, true, WithLoadCollectionMsgBase(&commonpb.MsgBase{}))
 		s.NoError(err)
 	})
 
@@ -663,7 +663,7 @@ func TestGrpcClientDropCollection(t *testing.T) {
 	})
 
 	t.Run("Test Normal drop", func(t *testing.T) {
-		assert.Nil(t, c.DropCollection(ctx, testCollectionName))
+		assert.Nil(t, c.DropCollection(ctx, testCollectionName, WithDropCollectionMsgBase(&commonpb.MsgBase{})))
 	})
 
 	t.Run("Test drop non-existing collection", func(t *testing.T) {
@@ -685,7 +685,7 @@ func TestReleaseCollection(t *testing.T) {
 		return SuccessStatus()
 	})
 
-	c.ReleaseCollection(ctx, testCollectionName)
+	c.ReleaseCollection(ctx, testCollectionName, WithReleaseCollectionMsgBase(&commonpb.MsgBase{}))
 }
 
 func TestGrpcClientHasCollection(t *testing.T) {
diff --git a/client/data_test.go b/client/data_test.go
index 3af0ed4..8e2748d 100644
--- a/client/data_test.go
+++ b/client/data_test.go
@@ -36,7 +36,7 @@ func TestGrpcClientFlush(t *testing.T) {
 	c := testClient(ctx, t)
 
 	t.Run("test async flush", func(t *testing.T) {
-		assert.Nil(t, c.Flush(ctx, testCollectionName, true))
+		assert.Nil(t, c.Flush(ctx, testCollectionName, true, WithFlushMsgBase(&commonpb.MsgBase{})))
 	})
 
 	t.Run("test sync flush", func(t *testing.T) {
diff --git a/client/database_test.go b/client/database_test.go
index 24ed4b3..a42390c 100644
--- a/client/database_test.go
+++ b/client/database_test.go
@@ -7,6 +7,7 @@ import (
 	"github.com/go-faker/faker/v4"
 	"github.com/go-faker/faker/v4/pkg/options"
 	"github.com/golang/protobuf/proto"
+	"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
 	"github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
 	"github.com/stretchr/testify/assert"
 )
@@ -45,7 +46,7 @@ func TestGrpcClientCreateDatabase(t *testing.T) {
 	mockServer.SetInjection(MCreateDatabase, func(ctx context.Context, m proto.Message) (proto.Message, error) {
 		return SuccessStatus()
 	})
-	err := c.CreateDatabase(ctx, "a")
+	err := c.CreateDatabase(ctx, "a", WithCreateDatabaseMsgBase(&commonpb.MsgBase{}))
 	assert.Nil(t, err)
 }
 
@@ -55,6 +56,6 @@ func TestGrpcClientDropDatabase(t *testing.T) {
 	mockServer.SetInjection(MDropDatabase, func(ctx context.Context, m proto.Message) (proto.Message, error) {
 		return SuccessStatus()
 	})
-	err := c.DropDatabase(ctx, "a")
+	err := c.DropDatabase(ctx, "a", WithDropDatabaseMsgBase(&commonpb.MsgBase{}))
 	assert.Nil(t, err)
 }
diff --git a/client/index_test.go b/client/index_test.go
index f1ca827..323ef7c 100644
--- a/client/index_test.go
+++ b/client/index_test.go
@@ -38,7 +38,7 @@ func TestGrpcClientCreateIndex(t *testing.T) {
 	})
 
 	t.Run("test async create index", func(t *testing.T) {
-		assert.Nil(t, c.CreateIndex(ctx, testCollectionName, fieldName, idx, true))
+		assert.Nil(t, c.CreateIndex(ctx, testCollectionName, fieldName, idx, true, WithIndexMsgBase(&commonpb.MsgBase{})))
 	})
 
 	t.Run("test sync create index", func(t *testing.T) {
@@ -85,7 +85,7 @@ func TestGrpcClientDropIndex(t *testing.T) {
 	c := testClient(ctx, t)
 	mockServer.SetInjection(MHasCollection, hasCollectionDefault)
 	mockServer.SetInjection(MDescribeCollection, describeCollectionInjection(t, 0, testCollectionName, defaultSchema()))
-	assert.Nil(t, c.DropIndex(ctx, testCollectionName, "vector"))
+	assert.Nil(t, c.DropIndex(ctx, testCollectionName, "vector", WithIndexMsgBase(&commonpb.MsgBase{})))
 }
 
 func TestGrpcClientDescribeIndex(t *testing.T) {
diff --git a/client/mq_message_test.go b/client/mq_message_test.go
new file mode 100644
index 0000000..d5cc5c7
--- /dev/null
+++ b/client/mq_message_test.go
@@ -0,0 +1,41 @@
+package client
+
+import (
+	"context"
+	"testing"
+
+	"github.com/golang/protobuf/proto"
+	"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
+	"github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
+	"github.com/stretchr/testify/assert"
+)
+
+func TestGrpcClientReplicateMessage(t *testing.T) {
+	{
+		ctx := context.Background()
+		c := testClient(ctx, t)
+		mockServer.SetInjection(MReplicateMessage, func(ctx context.Context, m proto.Message) (proto.Message, error) {
+			return &milvuspb.ReplicateMessageResponse{
+				Status:   &commonpb.Status{ErrorCode: commonpb.ErrorCode_Success},
+				Position: "hello",
+			}, nil
+		})
+		resp, err := c.ReplicateMessage(ctx, "ch1", 1000, 1001,
+			nil, nil, nil, WithReplicateMessageMsgBase(&commonpb.MsgBase{}))
+		assert.Nil(t, err)
+		assert.Equal(t, "hello", resp.Position)
+	}
+
+	{
+		ctx := context.Background()
+		c := testClient(ctx, t)
+		mockServer.SetInjection(MReplicateMessage, func(ctx context.Context, m proto.Message) (proto.Message, error) {
+			return &milvuspb.ReplicateMessageResponse{
+				Status: &commonpb.Status{ErrorCode: commonpb.ErrorCode_UnexpectedError},
+			}, nil
+		})
+		_, err := c.ReplicateMessage(ctx, "ch1", 1000, 1001,
+			nil, nil, nil, WithReplicateMessageMsgBase(&commonpb.MsgBase{}))
+		assert.NotNil(t, err)
+	}
+}
diff --git a/client/partition_test.go b/client/partition_test.go
index 1fe7837..685472b 100644
--- a/client/partition_test.go
+++ b/client/partition_test.go
@@ -68,7 +68,7 @@ func TestGrpcClientCreatePartition(t *testing.T) {
 		return resp, err
 	})
 
-	assert.Nil(t, c.CreatePartition(ctx, testCollectionName, partitionName))
+	assert.Nil(t, c.CreatePartition(ctx, testCollectionName, partitionName, WithCreatePartitionMsgBase(&commonpb.MsgBase{})))
 }
 
 func TestGrpcClientDropPartition(t *testing.T) {
@@ -77,7 +77,7 @@ func TestGrpcClientDropPartition(t *testing.T) {
 	c := testClient(ctx, t)
 	mockServer.SetInjection(MHasCollection, hasCollectionDefault)
 	mockServer.SetInjection(MHasPartition, hasPartitionInjection(t, testCollectionName, true, partitionName)) // injection has assertion of collName & parition name
-	assert.Nil(t, c.DropPartition(ctx, testCollectionName, partitionName))
+	assert.Nil(t, c.DropPartition(ctx, testCollectionName, partitionName, WithDropPartitionMsgBase(&commonpb.MsgBase{})))
 }
 
 func TestGrpcClientHasPartition(t *testing.T) {
@@ -188,7 +188,7 @@ func TestGrpcClientReleasePartitions(t *testing.T) {
 	})
 	defer mockServer.SetInjection(MHasPartition, hasPartitionInjection(t, testCollectionName, false, "testPart"))
 
-	assert.Nil(t, c.ReleasePartitions(ctx, testCollectionName, parts))
+	assert.Nil(t, c.ReleasePartitions(ctx, testCollectionName, parts, WithReleasePartitionMsgBase(&commonpb.MsgBase{})))
 }
 
 func TestGrpcShowPartitions(t *testing.T) {
@@ -277,7 +277,7 @@ func (s *PartitionSuite) TestLoadPartitions() {
 			s.ElementsMatch(partNames, req.GetPartitionNames())
 		}).Return(&commonpb.Status{ErrorCode: commonpb.ErrorCode_Success}, nil)
 
-		err := c.LoadPartitions(ctx, testCollectionName, partNames, true)
+		err := c.LoadPartitions(ctx, testCollectionName, partNames, true, WithLoadPartitionsMsgBase(&commonpb.MsgBase{}))
 		s.NoError(err)
 	})
 
diff --git a/test/common/response_check.go b/test/common/response_check.go
index 2ceb8ba..64027bd 100644
--- a/test/common/response_check.go
+++ b/test/common/response_check.go
@@ -147,11 +147,13 @@ func EqualColumn(t *testing.T, columnA entity.Column, columnB entity.Column) {
 		require.ElementsMatch(t, columnA.(*entity.ColumnFloatVector).Data(), columnB.(*entity.ColumnFloatVector).Data())
 	case entity.FieldTypeBinaryVector:
 		require.ElementsMatch(t, columnA.(*entity.ColumnBinaryVector).Data(), columnB.(*entity.ColumnBinaryVector).Data())
+	case entity.FieldTypeArray:
+		log.Println("TODO support column element type")
 	default:
-		log.Printf("The column type not in: [%v, %v, %v,  %v, %v,  %v, %v,  %v, %v,  %v, %v]",
+		log.Printf("The column type not in: [%v, %v, %v,  %v, %v,  %v, %v,  %v, %v,  %v, %v, %v]",
 			entity.FieldTypeBool, entity.FieldTypeInt8, entity.FieldTypeInt16, entity.FieldTypeInt32,
 			entity.FieldTypeInt64, entity.FieldTypeFloat, entity.FieldTypeDouble, entity.FieldTypeString,
-			entity.FieldTypeVarChar, entity.FieldTypeFloatVector, entity.FieldTypeBinaryVector)
+			entity.FieldTypeVarChar, entity.FieldTypeArray, entity.FieldTypeFloatVector, entity.FieldTypeBinaryVector)
 
 	}
 }
@@ -173,10 +175,10 @@ func CheckQueryResult(t *testing.T, actualColumns []entity.Column, expColumns []
 func CheckOutputFields(t *testing.T, actualColumns []entity.Column, expFields []string) {
 	actualFields := make([]string, 0)
 	for _, actualColumn := range actualColumns {
-		log.Printf("column name: %s, column type: %s, column fieldData: %v",
-			actualColumn.Name(), actualColumn.Type(), actualColumn.FieldData())
 		actualFields = append(actualFields, actualColumn.Name())
 	}
+	log.Printf("actual fields: %v", actualFields)
+	log.Printf("expected fields: %v", expFields)
 	require.ElementsMatchf(t, expFields, actualFields, fmt.Sprintf("Expected search output fields: %v, actual: %v", expFields, actualFields))
 }
 
diff --git a/test/common/utils.go b/test/common/utils.go
index d06e45b..3fef253 100644
--- a/test/common/utils.go
+++ b/test/common/utils.go
@@ -1,6 +1,7 @@
 package common
 
 import (
+	"bytes"
 	"encoding/json"
 	"fmt"
 	"log"
@@ -18,12 +19,21 @@ const (
 	DefaultFloatFieldName     = "float"
 	DefaultVarcharFieldName   = "varchar"
 	DefaultJSONFieldName      = "json"
+	DefaultArrayFieldName     = "array"
 	DefaultFloatVecFieldName  = "floatVec"
 	DefaultBinaryVecFieldName = "binaryVec"
 	DefaultDynamicNumberField = "dynamicNumber"
 	DefaultDynamicStringField = "dynamicString"
 	DefaultDynamicBoolField   = "dynamicBool"
 	DefaultDynamicListField   = "dynamicList"
+	DefaultBoolArrayField     = "boolArray"
+	DefaultInt8ArrayField     = "int8Array"
+	DefaultInt16ArrayField    = "int16Array"
+	DefaultInt32ArrayField    = "int32Array"
+	DefaultInt64ArrayField    = "int64Array"
+	DefaultFloatArrayField    = "floatArray"
+	DefaultDoubleArrayField   = "doubleArray"
+	DefaultVarcharArrayField  = "varcharArray"
 	RowCount                  = "row_count"
 	DefaultTimeout            = 120
 	DefaultDim                = int64(128)
@@ -31,6 +41,8 @@ const (
 	DefaultNb                 = 3000
 	DefaultNq                 = 5
 	DefaultTopK               = 10
+	TestCapacity              = 100 // default array field capacity
+	TestMaxLen                = 100 // default varchar field max length
 )
 
 // const default value from milvus
@@ -45,10 +57,11 @@ const (
 	DefaultDb               = "default"
 	DefaultConsistencyLevel = entity.ClBounded
 	MaxDim                  = 32768
-	DefaultMaxLength        = int64(65535)
+	MaxLength               = int64(65535)
 	MaxCollectionNameLen    = 255
 	DefaultRgCapacity       = 1000000
-	RetentionDuration       = 40 // common.retentionDuration
+	RetentionDuration       = 40   // common.retentionDuration
+	MaxCapacity             = 4096 // max array capacity
 )
 
 var IndexStateValue = map[string]int32{
@@ -60,6 +73,28 @@ var IndexStateValue = map[string]int32{
 	"Retry":          5,
 }
 
+var ArrayFieldType = []entity.FieldType{
+	entity.FieldTypeBool,
+	entity.FieldTypeInt8,
+	entity.FieldTypeInt16,
+	entity.FieldTypeInt32,
+	entity.FieldTypeInt64,
+	entity.FieldTypeFloat,
+	entity.FieldTypeDouble,
+	//entity.FieldTypeVarChar, //t.Skip("Waiting for varchar bytes array fixed")
+}
+
+var AllArrayFieldsName = []string{
+	DefaultBoolArrayField,
+	DefaultInt8ArrayField,
+	DefaultInt16ArrayField,
+	DefaultInt32ArrayField,
+	DefaultInt64ArrayField,
+	DefaultFloatArrayField,
+	DefaultDoubleArrayField,
+	DefaultVarcharArrayField,
+}
+
 var r *rand.Rand
 
 func init() {
@@ -98,6 +133,20 @@ func ColumnIndexFunc(data []entity.Column, fieldName string) int {
 	return -1
 }
 
+func GenFloatVector(dim int64) []float32 {
+	vector := make([]float32, 0, dim)
+	for j := 0; j < int(dim); j++ {
+		vector = append(vector, rand.Float32())
+	}
+	return vector
+}
+
+func GenBinaryVector(dim int64) []byte {
+	vector := make([]byte, dim/8)
+	rand.Read(vector)
+	return vector
+}
+
 // --- common utils  ---
 
 // --- gen fields ---
@@ -127,7 +176,7 @@ func GenDefaultBinaryFields(autoID bool, dim int64) []*entity.Field {
 
 // GenDefaultVarcharFields gen default fields with varchar, floatVector field
 func GenDefaultVarcharFields(autoID bool) []*entity.Field {
-	varcharField := GenField(DefaultVarcharFieldName, entity.FieldTypeVarChar, WithIsPrimaryKey(true), WithAutoID(autoID), WithMaxLength(DefaultMaxLength))
+	varcharField := GenField(DefaultVarcharFieldName, entity.FieldTypeVarChar, WithIsPrimaryKey(true), WithAutoID(autoID), WithMaxLength(MaxLength))
 	binaryVecField := GenField(DefaultBinaryVecFieldName, entity.FieldTypeBinaryVector, WithDim(DefaultDim))
 	fields := []*entity.Field{
 		varcharField, binaryVecField,
@@ -135,21 +184,40 @@ func GenDefaultVarcharFields(autoID bool) []*entity.Field {
 	return fields
 }
 
+func GenAllArrayFields() []*entity.Field {
+	return GenAllArrayFieldsWithCapacity(TestCapacity)
+}
+
+// GenAllArrayFieldsWithCapacity GenAllArrayFields gen all array fields
+func GenAllArrayFieldsWithCapacity(capacity int64) []*entity.Field {
+	fields := []*entity.Field{
+		GenField(DefaultBoolArrayField, entity.FieldTypeArray, WithElementType(entity.FieldTypeBool), WithMaxCapacity(capacity)),
+		GenField(DefaultInt8ArrayField, entity.FieldTypeArray, WithElementType(entity.FieldTypeInt8), WithMaxCapacity(capacity)),
+		GenField(DefaultInt16ArrayField, entity.FieldTypeArray, WithElementType(entity.FieldTypeInt16), WithMaxCapacity(capacity)),
+		GenField(DefaultInt32ArrayField, entity.FieldTypeArray, WithElementType(entity.FieldTypeInt32), WithMaxCapacity(capacity)),
+		GenField(DefaultInt64ArrayField, entity.FieldTypeArray, WithElementType(entity.FieldTypeInt64), WithMaxCapacity(capacity)),
+		GenField(DefaultFloatArrayField, entity.FieldTypeArray, WithElementType(entity.FieldTypeFloat), WithMaxCapacity(capacity)),
+		GenField(DefaultDoubleArrayField, entity.FieldTypeArray, WithElementType(entity.FieldTypeDouble), WithMaxCapacity(capacity)),
+		GenField(DefaultVarcharArrayField, entity.FieldTypeArray, WithElementType(entity.FieldTypeVarChar), WithMaxLength(TestMaxLen), WithMaxCapacity(capacity)),
+	}
+	return fields
+}
+
 // GenAllFields gen fields with all scala field types
 func GenAllFields() []*entity.Field {
 	allFields := []*entity.Field{
-		GenField("int64", entity.FieldTypeInt64, WithIsPrimaryKey(true)),              // int64
-		GenField("bool", entity.FieldTypeBool),                                        // bool
-		GenField("int8", entity.FieldTypeInt8),                                        // int8
-		GenField("int16", entity.FieldTypeInt16),                                      // int16
-		GenField("int32", entity.FieldTypeInt32),                                      // int32
-		GenField("float", entity.FieldTypeFloat),                                      // float
-		GenField("double", entity.FieldTypeDouble),                                    // double
-		GenField("varchar", entity.FieldTypeVarChar, WithMaxLength(DefaultMaxLength)), // varchar
-		GenField("json", entity.FieldTypeJSON),                                        // json
-		GenField("floatVec", entity.FieldTypeFloatVector, WithDim(DefaultDim)),        // float vector
+		GenField("int64", entity.FieldTypeInt64, WithIsPrimaryKey(true)),       // int64
+		GenField("bool", entity.FieldTypeBool),                                 // bool
+		GenField("int8", entity.FieldTypeInt8),                                 // int8
+		GenField("int16", entity.FieldTypeInt16),                               // int16
+		GenField("int32", entity.FieldTypeInt32),                               // int32
+		GenField("float", entity.FieldTypeFloat),                               // float
+		GenField("double", entity.FieldTypeDouble),                             // double
+		GenField("varchar", entity.FieldTypeVarChar, WithMaxLength(MaxLength)), // varchar
+		GenField("json", entity.FieldTypeJSON),                                 // json
+		GenField("floatVec", entity.FieldTypeFloatVector, WithDim(DefaultDim)), // float vector
 	}
-
+	allFields = append(allFields, GenAllArrayFields()...)
 	return allFields
 }
 
@@ -164,18 +232,6 @@ func GenDefaultColumnData(start int, nb int, dim int64) (entity.Column, entity.C
 		GenColumnData(start, nb, entity.FieldTypeFloatVector, DefaultFloatVecFieldName, WithVectorDim(dim))
 }
 
-type GenColumnDataOption func(opt *genDataOpt)
-
-type genDataOpt struct {
-	dim int64
-}
-
-func WithVectorDim(dim int64) GenColumnDataOption {
-	return func(opt *genDataOpt) {
-		opt.dim = dim
-	}
-}
-
 // GenColumnData GenColumnDataOption
 func GenColumnData(start int, nb int, fieldType entity.FieldType, fieldName string, opts ...GenColumnDataOption) entity.Column {
 	opt := &genDataOpt{}
@@ -239,21 +295,20 @@ func GenColumnData(start int, nb int, fieldType entity.FieldType, fieldName stri
 		}
 		return entity.NewColumnVarChar(fieldName, varcharValues)
 
+	case entity.FieldTypeArray:
+		return GenArrayColumnData(start, nb, fieldName, opts...)
+
 	case entity.FieldTypeFloatVector:
 		vecFloatValues := make([][]float32, 0, nb)
 		for i := start; i < start+nb; i++ {
-			vec := make([]float32, 0, opt.dim)
-			for j := 0; j < int(opt.dim); j++ {
-				vec = append(vec, rand.Float32())
-			}
+			vec := GenFloatVector(opt.dim)
 			vecFloatValues = append(vecFloatValues, vec)
 		}
 		return entity.NewColumnFloatVector(fieldName, int(opt.dim), vecFloatValues)
 	case entity.FieldTypeBinaryVector:
 		binaryVectors := make([][]byte, 0, nb)
 		for i := 0; i < nb; i++ {
-			vec := make([]byte, opt.dim/8)
-			rand.Read(vec)
+			vec := GenBinaryVector(opt.dim)
 			binaryVectors = append(binaryVectors, vec)
 		}
 		return entity.NewColumnBinaryVector(fieldName, int(opt.dim), binaryVectors)
@@ -262,6 +317,101 @@ func GenColumnData(start int, nb int, fieldType entity.FieldType, fieldName stri
 	}
 }
 
+func GenArrayColumnData(start int, nb int, fieldName string, opts ...GenColumnDataOption) entity.Column {
+	opt := &genDataOpt{}
+	for _, o := range opts {
+		o(opt)
+	}
+	eleType := opt.ElementType
+	capacity := int(opt.capacity)
+	switch eleType {
+	case entity.FieldTypeBool:
+		boolValues := make([][]bool, 0, nb)
+		for i := start; i < start+nb; i++ {
+			boolArray := make([]bool, 0, capacity)
+			for j := 0; j < capacity; j++ {
+				boolArray = append(boolArray, i%2 == 0)
+			}
+			boolValues = append(boolValues, boolArray)
+		}
+		return entity.NewColumnBoolArray(fieldName, boolValues)
+	case entity.FieldTypeInt8:
+		int8Values := make([][]int8, 0, nb)
+		for i := start; i < start+nb; i++ {
+			int8Array := make([]int8, 0, capacity)
+			for j := 0; j < capacity; j++ {
+				int8Array = append(int8Array, int8(i+j))
+			}
+			int8Values = append(int8Values, int8Array)
+		}
+		return entity.NewColumnInt8Array(fieldName, int8Values)
+	case entity.FieldTypeInt16:
+		int16Values := make([][]int16, 0, nb)
+		for i := start; i < start+nb; i++ {
+			int16Array := make([]int16, 0, capacity)
+			for j := 0; j < capacity; j++ {
+				int16Array = append(int16Array, int16(i+j))
+			}
+			int16Values = append(int16Values, int16Array)
+		}
+		return entity.NewColumnInt16Array(fieldName, int16Values)
+	case entity.FieldTypeInt32:
+		int32Values := make([][]int32, 0, nb)
+		for i := start; i < start+nb; i++ {
+			int32Array := make([]int32, 0, capacity)
+			for j := 0; j < capacity; j++ {
+				int32Array = append(int32Array, int32(i+j))
+			}
+			int32Values = append(int32Values, int32Array)
+		}
+		return entity.NewColumnInt32Array(fieldName, int32Values)
+	case entity.FieldTypeInt64:
+		int64Values := make([][]int64, 0, nb)
+		for i := start; i < start+nb; i++ {
+			int64Array := make([]int64, 0, capacity)
+			for j := 0; j < capacity; j++ {
+				int64Array = append(int64Array, int64(i+j))
+			}
+			int64Values = append(int64Values, int64Array)
+		}
+		return entity.NewColumnInt64Array(fieldName, int64Values)
+	case entity.FieldTypeFloat:
+		floatValues := make([][]float32, 0, nb)
+		for i := start; i < start+nb; i++ {
+			floatArray := make([]float32, 0, capacity)
+			for j := 0; j < capacity; j++ {
+				floatArray = append(floatArray, float32(i+j))
+			}
+			floatValues = append(floatValues, floatArray)
+		}
+		return entity.NewColumnFloatArray(fieldName, floatValues)
+	case entity.FieldTypeDouble:
+		doubleValues := make([][]float64, 0, nb)
+		for i := start; i < start+nb; i++ {
+			doubleArray := make([]float64, 0, capacity)
+			for j := 0; j < capacity; j++ {
+				doubleArray = append(doubleArray, float64(i+j))
+			}
+			doubleValues = append(doubleValues, doubleArray)
+		}
+		return entity.NewColumnDoubleArray(fieldName, doubleValues)
+	case entity.FieldTypeVarChar:
+		varcharValues := make([][][]byte, 0, nb)
+		for i := start; i < start+nb; i++ {
+			varcharArray := make([][]byte, 0, capacity)
+			for j := 0; j < capacity; j++ {
+				var buf bytes.Buffer
+				buf.WriteString(strconv.Itoa(i + j))
+				varcharArray = append(varcharArray, buf.Bytes())
+			}
+			varcharValues = append(varcharValues, varcharArray)
+		}
+		return entity.NewColumnVarCharArray(fieldName, varcharValues)
+	default:
+		return nil
+	}
+}
+
 // GenDefaultJSONData gen default column with data
 func GenDefaultJSONData(columnName string, start int, nb int) *entity.ColumnJSONBytes {
 	type JSONStruct struct {
@@ -309,7 +459,30 @@ func GenDefaultVarcharData(start int, nb int, dim int64) (entity.Column, entity.
 	return varColumn, binaryColumn
 }
 
-func GenAllFieldsData(start int, nb int, dim int64) []entity.Column {
+func GenAllArrayData(start int, nb int, opts ...GenColumnDataOption) []entity.Column {
+	// how to pass different capacity for different column
+	opt := &genDataOpt{}
+	for _, o := range opts {
+		o(opt)
+	}
+	data := []entity.Column{
+		GenArrayColumnData(start, nb, DefaultBoolArrayField, WithArrayElementType(entity.FieldTypeBool), WithArrayCapacity(opt.capacity)),
+		GenArrayColumnData(start, nb, DefaultInt8ArrayField, WithArrayElementType(entity.FieldTypeInt8), WithArrayCapacity(opt.capacity)),
+		GenArrayColumnData(start, nb, DefaultInt16ArrayField, WithArrayElementType(entity.FieldTypeInt16), WithArrayCapacity(opt.capacity)),
+		GenArrayColumnData(start, nb, DefaultInt32ArrayField, WithArrayElementType(entity.FieldTypeInt32), WithArrayCapacity(opt.capacity)),
+		GenArrayColumnData(start, nb, DefaultInt64ArrayField, WithArrayElementType(entity.FieldTypeInt64), WithArrayCapacity(opt.capacity)),
+		GenArrayColumnData(start, nb, DefaultFloatArrayField, WithArrayElementType(entity.FieldTypeFloat), WithArrayCapacity(opt.capacity)),
+		GenArrayColumnData(start, nb, DefaultDoubleArrayField, WithArrayElementType(entity.FieldTypeDouble), WithArrayCapacity(opt.capacity)),
+		GenArrayColumnData(start, nb, DefaultVarcharArrayField, WithArrayElementType(entity.FieldTypeVarChar), WithArrayCapacity(opt.capacity)),
+	}
+	return data
+}
+
+func GenAllFieldsData(start int, nb int, dim int64, opts ...GenColumnDataOption) []entity.Column {
+	opt := &genDataOpt{}
+	for _, o := range opts {
+		o(opt)
+	}
 	// prepare data
 	data := []entity.Column{
 		GenColumnData(start, nb, entity.FieldTypeInt64, "int64"),
@@ -323,6 +496,7 @@ func GenAllFieldsData(start int, nb int, dim int64) []entity.Column {
 		GenDefaultJSONData("json", start, nb),
 		GenColumnData(start, nb, entity.FieldTypeFloatVector, "floatVec", WithVectorDim(dim)),
 	}
+	data = append(data, GenAllArrayData(start, nb, opts...)...)
 	return data
 }
 
@@ -337,27 +511,39 @@ type Dynamic struct {
 	List   []int64 `json:"dynamicList" milvus:"name:dynamicList"`
 }
 
+type Array struct {
+	BoolArray    []bool    `json:"boolArray" milvus:"name:boolArray"`
+	Int8Array    []int8    `json:"int8Array" milvus:"name:int8Array"`
+	Int16Array   []int16   `json:"int16Array" milvus:"name:int16Array"`
+	Int32Array   []int32   `json:"int32Array" milvus:"name:int32Array"`
+	Int64Array   []int64   `json:"int64Array" milvus:"name:int64Array"`
+	FloatArray   []float32 `json:"floatArray" milvus:"name:floatArray"`
+	DoubleArray  []float64 `json:"doubleArray" milvus:"name:doubleArray"`
+	VarcharArray [][]byte  `json:"varcharArray" milvus:"name:varcharArray"`
+}
+
 func GenDefaultRows(start int, nb int, dim int64, enableDynamicField bool) []interface{} {
 	rows := make([]interface{}, 0, nb)
 
-	type DynamicRow struct {
+	// BaseRow generate insert rows
+	type BaseRow struct {
 		Int64    int64     `json:"int64" milvus:"name:int64"`
 		Float    float32   `json:"float" milvus:"name:float"`
 		FloatVec []float32 `json:"floatVec" milvus:"name:floatVec"`
-		Dynamic  Dynamic   `json:"dynamic" milvus:"name:dynamic"`
 	}
 
-	// BaseRow generate insert rows
-	type BaseRow struct {
+	type DynamicRow struct {
 		Int64    int64     `json:"int64" milvus:"name:int64"`
 		Float    float32   `json:"float" milvus:"name:float"`
 		FloatVec []float32 `json:"floatVec" milvus:"name:floatVec"`
+		Dynamic  Dynamic   `json:"dynamic" milvus:"name:dynamic"`
 	}
 
 	for i := start; i < start+nb; i++ {
-		floatVec := make([]float32, 0, dim)
-		for j := 0; j < int(dim); j++ {
-			floatVec = append(floatVec, rand.Float32())
+		baseRow := BaseRow{
+			Int64:    int64(i),
+			Float:    float32(i),
+			FloatVec: GenFloatVector(dim),
 		}
 		if enableDynamicField {
 			var dynamic Dynamic
@@ -377,19 +563,15 @@ func GenDefaultRows(start int, nb int, dim int64, enableDynamicField bool) []int
 			}
 
 			dynamicRow := DynamicRow{
-				Int64:    int64(i),
-				Float:    float32(i),
-				FloatVec: floatVec,
+				Int64:    baseRow.Int64,
+				Float:    baseRow.Float,
+				FloatVec: baseRow.FloatVec,
 				Dynamic:  dynamic,
 			}
 
 			rows = append(rows, dynamicRow)
 		} else {
-			rows = append(rows, &BaseRow{
-				Int64:    int64(i),
-				Float:    float32(i),
-				FloatVec: floatVec,
-			})
+			rows = append(rows, &baseRow)
 		}
 	}
 	return rows
@@ -398,26 +580,26 @@ func GenDefaultRows(start int, nb int, dim int64, enableDynamicField bool) []int
 func GenDefaultBinaryRows(start int, nb int, dim int64, enableDynamicField bool) []interface{} {
 	rows := make([]interface{}, 0, nb)
 
-	type DynamicRow struct {
-		Int64     int64    `json:"int64" milvus:"name:int64"`
-		Float     float32  `json:"float" milvus:"name:float"`
-		BinaryVec [][]byte `json:"binaryVec" milvus:"name:binaryVec"`
-		Dynamic   Dynamic  `json:"dynamic" milvus:"name:dynamic"`
-	}
-
 	// BaseRow generate insert rows
 	type BaseRow struct {
-		Int64     int64    `json:"int64" milvus:"name:int64"`
-		Float     float32  `json:"float" milvus:"name:float"`
-		BinaryVec [][]byte `json:"binaryVec" milvus:"name:binaryVec"`
+		Int64     int64   `json:"int64" milvus:"name:int64"`
+		Float     float32 `json:"float" milvus:"name:float"`
+		BinaryVec []byte  `json:"binaryVec" milvus:"name:binaryVec"`
 	}
 
-	for i := start; i < start+nb; i++ {
-		binaryVec := make([][]byte, 0, nb)
-		vec := make([]byte, 0, dim/8)
-		rand.Read(vec)
-		binaryVec = append(binaryVec, vec)
+	type DynamicRow struct {
+		Int64     int64   `json:"int64" milvus:"name:int64"`
+		Float     float32 `json:"float" milvus:"name:float"`
+		BinaryVec []byte  `json:"binaryVec" milvus:"name:binaryVec"`
+		Dynamic   Dynamic `json:"dynamic" milvus:"name:dynamic"`
+	}
 
+	for i := start; i < start+nb; i++ {
+		baseRow := BaseRow{
+			Int64:     int64(i),
+			Float:     float32(i),
+			BinaryVec: GenBinaryVector(dim),
+		}
 		if enableDynamicField {
 			dynamic := Dynamic{
 				Number: int32(i),
@@ -427,19 +609,15 @@ func GenDefaultBinaryRows(start int, nb int, dim int64, enableDynamicField bool)
 			}
 
 			dynamicRow := DynamicRow{
-				Int64:     int64(i),
-				Float:     float32(i),
-				BinaryVec: binaryVec,
+				Int64:     baseRow.Int64,
+				Float:     baseRow.Float,
+				BinaryVec: baseRow.BinaryVec,
 				Dynamic:   dynamic,
 			}
 
 			rows = append(rows, dynamicRow)
 		} else {
-			rows = append(rows, &BaseRow{
-				Int64:     int64(i),
-				Float:     float32(i),
-				BinaryVec: binaryVec,
-			})
+			rows = append(rows, &baseRow)
 		}
 	}
 	return rows
@@ -448,23 +626,23 @@ func GenDefaultBinaryRows(start int, nb int, dim int64, enableDynamicField bool)
 func GenDefaultVarcharRows(start int, nb int, dim int64, enableDynamicField bool) []interface{} {
 	rows := make([]interface{}, 0, nb)
 
-	type DynamicRow struct {
-		Varchar   string   `json:"varchar" milvus:"name:varchar"`
-		BinaryVec [][]byte `json:"binaryVec" milvus:"name:binaryVec"`
-		Dynamic   Dynamic  `json:"dynamic" milvus:"name:dynamic"`
-	}
-
 	// BaseRow generate insert rows
 	type BaseRow struct {
-		Varchar   string   `json:"varchar" milvus:"name:varchar"`
-		BinaryVec [][]byte `json:"binaryVec" milvus:"name:binaryVec"`
+		Varchar   string `json:"varchar" milvus:"name:varchar"`
+		BinaryVec []byte `json:"binaryVec" milvus:"name:binaryVec"`
+	}
+
+	type DynamicRow struct {
+		Varchar   string  `json:"varchar" milvus:"name:varchar"`
+		BinaryVec []byte  `json:"binaryVec" milvus:"name:binaryVec"`
+		Dynamic   Dynamic `json:"dynamic" milvus:"name:dynamic"`
 	}
 
 	for i := start; i < start+nb; i++ {
-		binaryVec := make([][]byte, 0, nb)
-		vec := make([]byte, 0, dim/8)
-		rand.Read(vec)
-		binaryVec = append(binaryVec, vec)
+		baseRow := BaseRow{
+			Varchar:   strconv.Itoa(i),
+			BinaryVec: GenBinaryVector(dim),
+		}
 
 		if enableDynamicField {
 			dynamic := Dynamic{
@@ -475,17 +653,14 @@ func GenDefaultVarcharRows(start int, nb int, dim int64, enableDynamicField bool
 			}
 
 			dynamicRow := DynamicRow{
-				Varchar:   strconv.Itoa(i),
-				BinaryVec: binaryVec,
+				Varchar:   baseRow.Varchar,
+				BinaryVec: baseRow.BinaryVec,
 				Dynamic:   dynamic,
 			}
 
 			rows = append(rows, dynamicRow)
 		} else {
-			rows = append(rows, &BaseRow{
-				Varchar:   strconv.Itoa(i),
-				BinaryVec: binaryVec,
-			})
+			rows = append(rows, &baseRow)
 		}
 	}
 	return rows
@@ -500,31 +675,26 @@ func GenDefaultJSONRows(start int, nb int, dim int64, enableDynamicField bool) [
 		List   []int64 `json:"list" milvus:"name:list"`
 	}
 
-	type BaseDynamicRow struct {
+	// BaseRow generate insert rows
+	type BaseRow struct {
 		Int64    int64      `json:"int64" milvus:"name:int64"`
 		Float    float32    `json:"float" milvus:"name:float"`
 		FloatVec []float32  `json:"floatVec" milvus:"name:floatVec"`
 		JSON     JSONStruct `json:"json" milvus:"name:json"`
-		Number   int32      `json:"dynamicNumber" milvus:"name:dynamicNumber"`
-		String   string     `json:"dynamicString" milvus:"name:dynamicString"`
-		Bool     bool       `json:"dynamicBool" milvus:"name:dynamicBool"`
-		//List     []int64    `json:"dynamicList" milvus:"name:dynamicList"`
 	}
 
-	// BaseRow generate insert rows
-	type BaseRow struct {
+	type BaseDynamicRow struct {
 		Int64    int64      `json:"int64" milvus:"name:int64"`
 		Float    float32    `json:"float" milvus:"name:float"`
 		FloatVec []float32  `json:"floatVec" milvus:"name:floatVec"`
 		JSON     JSONStruct `json:"json" milvus:"name:json"`
+		Number   int32      `json:"dynamicNumber" milvus:"name:dynamicNumber"`
+		String   string     `json:"dynamicString" milvus:"name:dynamicString"`
+		Bool     bool       `json:"dynamicBool" milvus:"name:dynamicBool"`
+		//List     []int64    `json:"dynamicList" milvus:"name:dynamicList"`
 	}
 
 	for i := start; i < start+nb; i++ {
-		floatVec := make([]float32, 0, dim)
-		for j := 0; j < int(dim); j++ {
-			floatVec = append(floatVec, rand.Float32())
-		}
-
 		// jsonStruct row and dynamic row
 		var jsonStruct JSONStruct
 		if i%2 == 0 {
@@ -540,66 +710,224 @@ func GenDefaultJSONRows(start int, nb int, dim int64, enableDynamicField bool) [
 				List:   []int64{int64(i), int64(i + 1)},
 			}
 		}
+		// base row
+		baseRow := BaseRow{
+			Int64:    int64(i),
+			Float:    float32(i),
+			FloatVec: GenFloatVector(dim),
+			JSON:     jsonStruct,
+		}
 		if enableDynamicField {
 			baseDynamicRow := BaseDynamicRow{
-				Int64:    int64(i),
-				Float:    float32(i),
-				FloatVec: floatVec,
-				JSON:     jsonStruct,
+				Int64:    baseRow.Int64,
+				Float:    baseRow.Float,
+				FloatVec: baseRow.FloatVec,
+				JSON:     baseRow.JSON,
 				Number:   int32(i),
 				String:   strconv.Itoa(i),
 				Bool:     i%2 == 0,
 				//List:     []int64{int64(i), int64(i + 1)},
 			}
 
-			rows = append(rows, baseDynamicRow)
+			rows = append(rows, &baseDynamicRow)
 		} else {
-			rows = append(rows, &BaseRow{
-				Int64:    int64(i),
-				Float:    float32(i),
-				FloatVec: floatVec,
-				JSON:     jsonStruct,
-			})
+			rows = append(rows, &baseRow)
 		}
 	}
 	return rows
 }
 
-func GenAllFieldsRows(start int, nb int, dim int64, enableDynamicField bool) []interface{} {
+func GenAllArrayRow(index int, opts ...GenColumnDataOption) Array {
+	opt := &genDataOpt{}
+	for _, o := range opts {
+		o(opt)
+	}
+	var capacity int
+	if opt.capacity != 0 {
+		capacity = int(opt.capacity)
+	} else {
+		capacity = TestCapacity
+	}
+
+	boolRow := make([]bool, 0, capacity)
+	int8Row := make([]int8, 0, capacity)
+	int16Row := make([]int16, 0, capacity)
+	int32Row := make([]int32, 0, capacity)
+	int64Row := make([]int64, 0, capacity)
+	floatRow := make([]float32, 0, capacity)
+	doubleRow := make([]float64, 0, capacity)
+	varcharRow := make([][]byte, 0, capacity)
+	for j := 0; j < capacity; j++ {
+		boolRow = append(boolRow, index%2 == 0)
+		int8Row = append(int8Row, int8(index+j))
+		int16Row = append(int16Row, int16(index+j))
+		int32Row = append(int32Row, int32(index+j))
+		int64Row = append(int64Row, int64(index+j))
+		floatRow = append(floatRow, float32(index+j))
+		doubleRow = append(doubleRow, float64(index+j))
+		var buf bytes.Buffer
+		buf.WriteString(strconv.Itoa(index + j))
+		varcharRow = append(varcharRow, buf.Bytes())
+	}
+	arrayRow := Array{
+		BoolArray:    boolRow,
+		Int8Array:    int8Row,
+		Int16Array:   int16Row,
+		Int32Array:   int32Row,
+		Int64Array:   int64Row,
+		FloatArray:   floatRow,
+		DoubleArray:  doubleRow,
+		VarcharArray: varcharRow,
+	}
+	return arrayRow
+}
+
+func GenDefaultArrayRows(start int, nb int, dim int64, enableDynamicField bool, opts ...GenColumnDataOption) []interface{} {
 	rows := make([]interface{}, 0, nb)
 
+	// BaseRow generate insert rows
+	type BaseRow struct {
+		Int64        int64     `json:"int64" milvus:"name:int64"`
+		Float        float32   `json:"float" milvus:"name:float"`
+		FloatVec     []float32 `json:"floatVec" milvus:"name:floatVec"`
+		BoolArray    []bool    `json:"boolArray" milvus:"name:boolArray"`
+		Int8Array    []int8    `json:"int8Array" milvus:"name:int8Array"`
+		Int16Array   []int16   `json:"int16Array" milvus:"name:int16Array"`
+		Int32Array   []int32   `json:"int32Array" milvus:"name:int32Array"`
+		Int64Array   []int64   `json:"int64Array" milvus:"name:int64Array"`
+		FloatArray   []float32 `json:"floatArray" milvus:"name:floatArray"`
+		DoubleArray  []float64 `json:"doubleArray" milvus:"name:doubleArray"`
+		VarcharArray [][]byte  `json:"varcharArray" milvus:"name:varcharArray"`
+	}
+
 	type DynamicRow struct {
-		Int64    int64     `json:"int64" milvus:"name:int64"`
-		Bool     bool      `json:"bool" milvus:"name:bool"`
-		Int8     int8      `json:"int8" milvus:"name:int8"`
-		Int16    int16     `json:"int16" milvus:"name:int16"`
-		Int32    int32     `json:"int32" milvus:"name:int32"`
-		Float    float32   `json:"float" milvus:"name:float"`
-		Double   float64   `json:"double" milvus:"name:double"`
-		Varchar  string    `json:"varchar" milvus:"name:varchar"`
-		JSON     Dynamic   `json:"json" milvus:"name:json"`
-		FloatVec []float32 `json:"floatVec" milvus:"name:floatVec"`
-		Dynamic  Dynamic   `json:"dynamic" milvus:"name:dynamic"`
+		Int64        int64     `json:"int64" milvus:"name:int64"`
+		Float        float32   `json:"float" milvus:"name:float"`
+		FloatVec     []float32 `json:"floatVec" milvus:"name:floatVec"`
+		BoolArray    []bool    `json:"boolArray" milvus:"name:boolArray"`
+		Int8Array    []int8    `json:"int8Array" milvus:"name:int8Array"`
+		Int16Array   []int16   `json:"int16Array" milvus:"name:int16Array"`
+		Int32Array   []int32   `json:"int32Array" milvus:"name:int32Array"`
+		Int64Array   []int64   `json:"int64Array" milvus:"name:int64Array"`
+		FloatArray   []float32 `json:"floatArray" milvus:"name:floatArray"`
+		DoubleArray  []float64 `json:"doubleArray" milvus:"name:doubleArray"`
+		VarcharArray [][]byte  `json:"varcharArray" milvus:"name:varcharArray"`
+		Dynamic      Dynamic   `json:"dynamic" milvus:"name:dynamic"`
 	}
 
+	for i := start; i < start+nb; i++ {
+		// json and dynamic field
+		dynamicJSON := Dynamic{
+			Number: int32(i),
+			String: strconv.Itoa(i),
+			Bool:   i%2 == 0,
+			List:   []int64{int64(i), int64(i + 1)},
+		}
+		arrayRow := GenAllArrayRow(i, opts...)
+		baseRow := BaseRow{
+			Int64:        int64(i),
+			Float:        float32(i),
+			FloatVec:     GenFloatVector(dim),
+			BoolArray:    arrayRow.BoolArray,
+			Int8Array:    arrayRow.Int8Array,
+			Int16Array:   arrayRow.Int16Array,
+			Int32Array:   arrayRow.Int32Array,
+			Int64Array:   arrayRow.Int64Array,
+			FloatArray:   arrayRow.FloatArray,
+			DoubleArray:  arrayRow.DoubleArray,
+			VarcharArray: arrayRow.VarcharArray,
+		}
+		if enableDynamicField {
+			dynamicRow := DynamicRow{
+				Int64:        baseRow.Int64,
+				Float:        baseRow.Float,
+				FloatVec:     baseRow.FloatVec,
+				BoolArray:    arrayRow.BoolArray,
+				Int8Array:    arrayRow.Int8Array,
+				Int16Array:   arrayRow.Int16Array,
+				Int32Array:   arrayRow.Int32Array,
+				Int64Array:   arrayRow.Int64Array,
+				FloatArray:   arrayRow.FloatArray,
+				DoubleArray:  arrayRow.DoubleArray,
+				VarcharArray: arrayRow.VarcharArray,
+				Dynamic:      dynamicJSON,
+			}
+
+			rows = append(rows, dynamicRow)
+		} else {
+			rows = append(rows, &baseRow)
+		}
+	}
+	return rows
+}
+
+func GenAllFieldsRows(start int, nb int, dim int64, enableDynamicField bool, opts ...GenColumnDataOption) []interface{} {
+	rows := make([]interface{}, 0, nb)
+
 	// BaseRow generate insert rows
 	type BaseRow struct {
-		Int64    int64     `json:"int64" milvus:"name:int64"`
-		Bool     bool      `json:"bool" milvus:"name:bool"`
-		Int8     int8      `json:"int8" milvus:"name:int8"`
-		Int16    int16     `json:"int16" milvus:"name:int16"`
-		Int32    int32     `json:"int32" milvus:"name:int32"`
-		Float    float32   `json:"float" milvus:"name:float"`
-		Double   float64   `json:"double" milvus:"name:double"`
-		Varchar  string    `json:"varchar" milvus:"name:varchar"`
-		JSON     Dynamic   `json:"json" milvus:"name:json"`
-		FloatVec []float32 `json:"floatVec" milvus:"name:floatVec"`
+		Int64        int64     `json:"int64" milvus:"name:int64"`
+		Bool         bool      `json:"bool" milvus:"name:bool"`
+		Int8         int8      `json:"int8" milvus:"name:int8"`
+		Int16        int16     `json:"int16" milvus:"name:int16"`
+		Int32        int32     `json:"int32" milvus:"name:int32"`
+		Float        float32   `json:"float" milvus:"name:float"`
+		Double       float64   `json:"double" milvus:"name:double"`
+		Varchar      string    `json:"varchar" milvus:"name:varchar"`
+		JSON         Dynamic   `json:"json" milvus:"name:json"`
+		FloatVec     []float32 `json:"floatVec" milvus:"name:floatVec"`
+		BoolArray    []bool    `json:"boolArray" milvus:"name:boolArray"`
+		Int8Array    []int8    `json:"int8Array" milvus:"name:int8Array"`
+		Int16Array   []int16   `json:"int16Array" milvus:"name:int16Array"`
+		Int32Array   []int32   `json:"int32Array" milvus:"name:int32Array"`
+		Int64Array   []int64   `json:"int64Array" milvus:"name:int64Array"`
+		FloatArray   []float32 `json:"floatArray" milvus:"name:floatArray"`
+		DoubleArray  []float64 `json:"doubleArray" milvus:"name:doubleArray"`
+		VarcharArray [][]byte  `json:"varcharArray" milvus:"name:varcharArray"`
+	}
+
+	type DynamicRow struct {
+		Int64        int64     `json:"int64" milvus:"name:int64"`
+		Bool         bool      `json:"bool" milvus:"name:bool"`
+		Int8         int8      `json:"int8" milvus:"name:int8"`
+		Int16        int16     `json:"int16" milvus:"name:int16"`
+		Int32        int32     `json:"int32" milvus:"name:int32"`
+		Float        float32   `json:"float" milvus:"name:float"`
+		Double       float64   `json:"double" milvus:"name:double"`
+		Varchar      string    `json:"varchar" milvus:"name:varchar"`
+		JSON         Dynamic   `json:"json" milvus:"name:json"`
+		FloatVec     []float32 `json:"floatVec" milvus:"name:floatVec"`
+		BoolArray    []bool    `json:"boolArray" milvus:"name:boolArray"`
+		Int8Array    []int8    `json:"int8Array" milvus:"name:int8Array"`
+		Int16Array   []int16   `json:"int16Array" milvus:"name:int16Array"`
+		Int32Array   []int32   `json:"int32Array" milvus:"name:int32Array"`
+		Int64Array   []int64   `json:"int64Array" milvus:"name:int64Array"`
+		FloatArray   []float32 `json:"floatArray" milvus:"name:floatArray"`
+		DoubleArray  []float64 `json:"doubleArray" milvus:"name:doubleArray"`
+		VarcharArray [][]byte  `json:"varcharArray" milvus:"name:varcharArray"`
+		Dynamic      Dynamic   `json:"dynamic" milvus:"name:dynamic"`
 	}
 
 	for i := start; i < start+nb; i++ {
-		floatVec := make([]float32, 0, dim)
-		for j := 0; j < int(dim); j++ {
-			floatVec = append(floatVec, rand.Float32())
+		arrayRow := GenAllArrayRow(i, opts...)
+		baseRow := BaseRow{
+			Int64:        int64(i),
+			Bool:         i%2 == 0,
+			Int8:         int8(i),
+			Int16:        int16(i),
+			Int32:        int32(i),
+			Float:        float32(i),
+			Double:       float64(i),
+			Varchar:      strconv.Itoa(i),
+			FloatVec:     GenFloatVector(dim),
+			BoolArray:    arrayRow.BoolArray,
+			Int8Array:    arrayRow.Int8Array,
+			Int16Array:   arrayRow.Int16Array,
+			Int32Array:   arrayRow.Int32Array,
+			Int64Array:   arrayRow.Int64Array,
+			FloatArray:   arrayRow.FloatArray,
+			DoubleArray:  arrayRow.DoubleArray,
+			VarcharArray: arrayRow.VarcharArray,
 		}
 
 		// json and dynamic field
@@ -611,33 +939,28 @@ func GenAllFieldsRows(start int, nb int, dim int64, enableDynamicField bool) []i
 		}
 		if enableDynamicField {
 			dynamicRow := DynamicRow{
-				Int64:    int64(i),
-				Bool:     i%2 == 0,
-				Int8:     int8(i),
-				Int16:    int16(i),
-				Int32:    int32(i),
-				Float:    float32(i),
-				Double:   float64(i),
-				Varchar:  strconv.Itoa(i),
-				FloatVec: floatVec,
-				JSON:     dynamicJSON,
-				Dynamic:  dynamicJSON,
+				Int64:        baseRow.Int64,
+				Bool:         baseRow.Bool,
+				Int8:         baseRow.Int8,
+				Int16:        baseRow.Int16,
+				Int32:        baseRow.Int32,
+				Float:        baseRow.Float,
+				Double:       baseRow.Double,
+				Varchar:      baseRow.Varchar,
+				FloatVec:     baseRow.FloatVec,
+				BoolArray:    arrayRow.BoolArray,
+				Int8Array:    arrayRow.Int8Array,
+				Int16Array:   arrayRow.Int16Array,
+				Int32Array:   arrayRow.Int32Array,
+				Int64Array:   arrayRow.Int64Array,
+				FloatArray:   arrayRow.FloatArray,
+				DoubleArray:  arrayRow.DoubleArray,
+				VarcharArray: arrayRow.VarcharArray,
+				Dynamic:      dynamicJSON,
 			}
-
 			rows = append(rows, dynamicRow)
 		} else {
-			rows = append(rows, &BaseRow{
-				Int64:    int64(i),
-				Bool:     i%2 == 0,
-				Int8:     int8(i),
-				Int16:    int16(i),
-				Int32:    int32(i),
-				Float:    float32(i),
-				Double:   float64(i),
-				Varchar:  strconv.Itoa(i),
-				FloatVec: floatVec,
-				JSON:     dynamicJSON,
-			})
+			rows = append(rows, &baseRow)
 		}
 	}
 	return rows
@@ -741,23 +1064,19 @@ func GenSearchVectors(nq int, dim int64, dataType entity.FieldType) []entity.Vec
 	switch dataType {
 	case entity.FieldTypeFloatVector:
 		for i := 0; i < nq; i++ {
-			vector := make([]float32, 0, dim)
-			for j := 0; j < int(dim); j++ {
-				vector = append(vector, rand.Float32())
-			}
+			vector := GenFloatVector(dim)
 			vectors = append(vectors, entity.FloatVector(vector))
 		}
 	case entity.FieldTypeBinaryVector:
 		for i := 0; i < nq; i++ {
-			vector := make([]byte, dim/8)
-			rand.Read(vector)
+			vector := GenBinaryVector(dim)
 			vectors = append(vectors, entity.BinaryVector(vector))
 		}
 	}
 	return vectors
 }
 
-// invalid expr
+// InvalidExprStruct invalid expr
 type InvalidExprStruct struct {
 	Expr   string
 	ErrNil bool
@@ -779,6 +1098,8 @@ var InvalidExpressions = []InvalidExprStruct{
 	{Expr: fmt.Sprintf("json_contains_all (%s['list'], 2)", DefaultJSONFieldName), ErrNil: false, ErrMsg: "contains_all operation element must be an array"},
 	{Expr: fmt.Sprintf("JSON_CONTAINS_ANY (%s['list'], 2)", DefaultJSONFieldName), ErrNil: false, ErrMsg: "contains_any operation element must be an array"},
 	{Expr: fmt.Sprintf("json_contains_aby (%s['list'], 2)", DefaultJSONFieldName), ErrNil: false, ErrMsg: "invalid expression: json_contains_aby"},
+	{Expr: fmt.Sprintf("json_contains_aby (%s['list'], 2)", DefaultJSONFieldName), ErrNil: false, ErrMsg: "invalid expression: json_contains_aby"},
+	{Expr: fmt.Sprintf("%s[-1] > %d", DefaultInt8ArrayField, TestCapacity), ErrNil: false, ErrMsg: "cannot parse expression"}, //  array[-1] >
 }
 
 // --- search utils ---
diff --git a/test/common/utils_client.go b/test/common/utils_client.go
index 025f097..da73068 100644
--- a/test/common/utils_client.go
+++ b/test/common/utils_client.go
@@ -45,6 +45,18 @@ func WithMaxLength(maxLen int64) CreateFieldOption {
 	}
 }
 
+func WithElementType(eleType entity.FieldType) CreateFieldOption {
+	return func(field *entity.Field) {
+		field.WithElementType(eleType)
+	}
+}
+
+func WithMaxCapacity(maxCap int64) CreateFieldOption {
+	return func(field *entity.Field) {
+		field.WithMaxCapacity(maxCap)
+	}
+}
+
 func WithTypeParams(key string, value string) CreateFieldOption {
 	return func(field *entity.Field) {
 		field.WithTypeParams(key, value)
@@ -84,7 +96,7 @@ func WithEnableDynamicField(enableDF bool) CreateSchemaOption {
 	}
 }
 
-// gen schema
+// GenSchema gen schema
 func GenSchema(name string, autoID bool, fields []*entity.Field, opts ...CreateSchemaOption) *entity.Schema {
 	schema := &entity.Schema{
 		CollectionName: name,
@@ -98,3 +110,31 @@ func GenSchema(name string, autoID bool, fields []*entity.Field, opts ...CreateS
 }
 
 // -- create schema --
+
+// GenColumnDataOption -- create column data --
+type GenColumnDataOption func(opt *genDataOpt)
+type genDataOpt struct {
+	dim         int64
+	ElementType entity.FieldType
+	capacity    int64
+}
+
+func WithVectorDim(dim int64) GenColumnDataOption {
+	return func(opt *genDataOpt) {
+		opt.dim = dim
+	}
+}
+
+func WithArrayElementType(eleType entity.FieldType) GenColumnDataOption {
+	return func(opt *genDataOpt) {
+		opt.ElementType = eleType
+	}
+}
+
+func WithArrayCapacity(capacity int64) GenColumnDataOption {
+	return func(opt *genDataOpt) {
+		opt.capacity = capacity
+	}
+}
+
+// -- create column data --
diff --git a/test/testcases/collection_test.go b/test/testcases/collection_test.go
index 13b6a9e..da75823 100644
--- a/test/testcases/collection_test.go
+++ b/test/testcases/collection_test.go
@@ -8,6 +8,8 @@ import (
 	"testing"
 	"time"
 
+	"github.com/milvus-io/milvus-sdk-go/v2/client"
+
 	"github.com/stretchr/testify/require"
 
 	"github.com/milvus-io/milvus-sdk-go/v2/entity"
@@ -446,6 +448,30 @@ func TestCreateCollectionDynamicSchema(t *testing.T) {
 	// check describe collection
 	collection, _ := mc.DescribeCollection(ctx, collName)
 	common.CheckCollection(t, collection, collName, common.DefaultShards, schema, common.DefaultConsistencyLevel)
+	require.Truef(t, collection.Schema.EnableDynamicField, "Expected collection.Schema.EnableDynamicField is True")
+
+	// check collName in ListCollections
+	collections, errListCollection := mc.ListCollections(ctx)
+	common.CheckErr(t, errListCollection, true)
+	common.CheckContainsCollection(t, collections, collName)
+}
+
+// test create collection enable dynamic field by collection opt
+func TestCreateCollectionDynamic(t *testing.T) {
+	t.Skip("Waiting for congqi to update schema.EnableDynamicField according to the CreateCollectionOption.EnableDynamicSchema")
+	ctx := createContext(t, time.Second*common.DefaultTimeout)
+	mc := createMilvusClient(ctx, t)
+
+	collName := common.GenRandomString(6)
+	schema := common.GenSchema(collName, false, common.GenDefaultFields(false))
+
+	err := mc.CreateCollection(ctx, schema, common.DefaultShards, client.WithEnableDynamicSchema(true))
+	common.CheckErr(t, err, true)
+
+	// check describe collection
+	collection, _ := mc.DescribeCollection(ctx, collName)
+	common.CheckCollection(t, collection, collName, common.DefaultShards, schema, common.DefaultConsistencyLevel)
+	require.Truef(t, collection.Schema.EnableDynamicField, "Expected collection.Schema.EnableDynamicField is True")
 
 	// check collName in ListCollections
 	collections, errListCollection := mc.ListCollections(ctx)
@@ -467,6 +493,88 @@ func TestCreateCollectionFieldMeta(t *testing.T) {
 	common.CheckErr(t, err, false, fmt.Sprintf("Invalid field name: %s. The first character of a field name must be an underscore or letter", common.DefaultDynamicFieldName))
 }
 
+func TestCreateArrayFieldInvalidCapacity(t *testing.T) {
+	ctx := createContext(t, time.Second*common.DefaultTimeout)
+	mc := createMilvusClient(ctx, t)
+
+	fields := common.GenDefaultFields(true)
+	// array field no Capacity
+	arrayField := common.GenField(common.DefaultArrayFieldName, entity.FieldTypeArray, common.WithElementType(entity.FieldTypeFloat))
+	schema := common.GenSchema(common.GenRandomString(6), false, append(fields, arrayField), common.WithEnableDynamicField(true))
+	err := mc.CreateCollection(ctx, schema, common.DefaultShards)
+	common.CheckErr(t, err, false, "type param(max_capacity) should be specified for array field")
+
+	// invalid Capacity
+	for _, invalidCapacity := range []int64{-1, 0, common.MaxCapacity + 1} {
+		arrayField := common.GenField(common.DefaultArrayFieldName, entity.FieldTypeArray, common.WithElementType(entity.FieldTypeFloat), common.WithMaxCapacity(invalidCapacity))
+		schema := common.GenSchema(common.GenRandomString(6), false, append(fields, arrayField), common.WithEnableDynamicField(true))
+		err := mc.CreateCollection(ctx, schema, common.DefaultShards)
+		common.CheckErr(t, err, false, "the maximum capacity specified for a Array should be in (0, 4096]")
+	}
+}
+
+// test create collection varchar array with invalid max length
+func TestCreateVarcharArrayInvalidLength(t *testing.T) {
+	ctx := createContext(t, time.Second*common.DefaultTimeout)
+	mc := createMilvusClient(ctx, t)
+
+	fields := common.GenDefaultFields(true)
+	varcharArrayField := common.GenField(common.DefaultArrayFieldName, entity.FieldTypeArray, common.WithElementType(entity.FieldTypeVarChar), common.WithMaxCapacity(100))
+	schema := common.GenSchema(common.GenRandomString(6), false, append(fields, varcharArrayField), common.WithEnableDynamicField(true))
+	err := mc.CreateCollection(ctx, schema, common.DefaultShards)
+	common.CheckErr(t, err, false, "type param(max_length) should be specified for varChar field")
+
+	// invalid max length
+	for _, invalidLength := range []int64{-1, 0, common.MaxLength + 1} {
+		arrayField := common.GenField(common.DefaultArrayFieldName, entity.FieldTypeArray, common.WithElementType(entity.FieldTypeVarChar),
+			common.WithMaxCapacity(100), common.WithMaxLength(invalidLength))
+		schema := common.GenSchema(common.GenRandomString(6), false, append(fields, arrayField), common.WithEnableDynamicField(true))
+		err := mc.CreateCollection(ctx, schema, common.DefaultShards)
+		common.CheckErr(t, err, false, "the maximum length specified for a VarChar should be in (0, 65535]: invalid parameter")
+	}
+}
+
+// test create collection array field not supported type
+func TestCreateArrayNotSupportedFieldType(t *testing.T) {
+	t.Parallel()
+	ctx := createContext(t, time.Second*common.DefaultTimeout)
+	mc := createMilvusClient(ctx, t)
+
+	// not supported ElementType: Array, Json, FloatVector, BinaryVector
+	fields := common.GenDefaultFields(true)
+	for _, fieldType := range []entity.FieldType{entity.FieldTypeArray, entity.FieldTypeJSON, entity.FieldTypeBinaryVector, entity.FieldTypeFloatVector} {
+		arrayField := common.GenField(common.DefaultArrayFieldName, entity.FieldTypeArray, common.WithElementType(fieldType), common.WithMaxCapacity(100))
+
+		schema := common.GenSchema(common.GenRandomString(6), false, append(fields, arrayField), common.WithEnableDynamicField(true))
+
+		err := mc.CreateCollection(ctx, schema, common.DefaultShards)
+		common.CheckErr(t, err, false, fmt.Sprintf("element type %s is not supported", fieldType.Name()))
+	}
+
+	// NoneType ElementType
+	noneArrayFields := []*entity.Field{
+		common.GenField(common.DefaultArrayFieldName, entity.FieldTypeArray, common.WithElementType(entity.FieldTypeNone), common.WithMaxCapacity(100)),
+		common.GenField(common.DefaultArrayFieldName, entity.FieldTypeArray, common.WithMaxCapacity(100)),
+	}
+	for _, noneArrayField := range noneArrayFields {
+		schema := common.GenSchema(common.GenRandomString(6), false, append(fields, noneArrayField), common.WithEnableDynamicField(true))
+		err := mc.CreateCollection(ctx, schema, common.DefaultShards)
+		common.CheckErr(t, err, false, "element data type None is not valid")
+	}
+}
+
+func TestCreateCollectionAllFields(t *testing.T) {
+	ctx := createContext(t, time.Second*common.DefaultTimeout)
+	mc := createMilvusClient(ctx, t)
+	allFields := common.GenAllFields()
+	collName := common.GenRandomString(6)
+	schema := common.GenSchema(collName, false, allFields)
+
+	// create collection
+	errCreateCollection := mc.CreateCollection(ctx, schema, common.DefaultShards)
+	common.CheckErr(t, errCreateCollection, true)
+}
+
 // -- Get Collection Statistics --
 
 func TestGetStaticsCollectionNotExisted(t *testing.T) {
diff --git a/test/testcases/index_test.go b/test/testcases/index_test.go
index a66c8b5..fbd7333 100644
--- a/test/testcases/index_test.go
+++ b/test/testcases/index_test.go
@@ -91,6 +91,41 @@ func TestCreateIndexJsonField(t *testing.T) {
 	//common.CheckErr(t, err, false, "create index on json field is not supported")
 }
 
+func TestCreateIndexArrayField(t *testing.T) {
+	ctx := createContext(t, time.Second*common.DefaultTimeout)
+	// connect
+	mc := createMilvusClient(ctx, t)
+
+	// create collection
+	cp := CollectionParams{CollectionFieldsType: Int64FloatVecArray, AutoID: false, EnableDynamicField: true,
+		ShardsNum: common.DefaultShards, Dim: common.DefaultDim, MaxCapacity: common.TestCapacity}
+	collName := createCollection(ctx, t, mc, cp)
+
+	// prepare and insert data
+	dp := DataParams{CollectionName: collName, PartitionName: "", CollectionFieldsType: Int64FloatVecArray,
+		start: 0, nb: common.DefaultNb, dim: common.DefaultDim, EnableDynamicField: true, WithRows: false}
+	_, _ = insertData(ctx, t, mc, dp, common.WithArrayCapacity(common.TestCapacity))
+
+	// flush and check row count
+	errFlush := mc.Flush(ctx, collName, false)
+	common.CheckErr(t, errFlush, true)
+
+	// create scalar and vector index on array field
+	scalarIdx := entity.NewScalarIndex()
+	vectorIdx, _ := entity.NewIndexSCANN(entity.L2, 10, false)
+	collection, _ := mc.DescribeCollection(ctx, collName)
+	for _, field := range collection.Schema.Fields {
+		if field.DataType == entity.FieldTypeArray {
+			// create scalar index
+			err := mc.CreateIndex(ctx, collName, field.Name, scalarIdx, false, client.WithIndexName("scalar_index"))
+			common.CheckErr(t, err, false, "create index on Array field: invalid parameter")
+			// create vector index
+			err1 := mc.CreateIndex(ctx, collName, field.Name, vectorIdx, false, client.WithIndexName("vector_index"))
+			common.CheckErr(t, err1, false, "create index on Array field: invalid parameter")
+		}
+	}
+}
+
 // test create index with supported float vector index, Ip metric type
 func TestCreateIndexIp(t *testing.T) {
 	t.Parallel()
diff --git a/test/testcases/insert_test.go b/test/testcases/insert_test.go
index 391f148..3c94a1d 100644
--- a/test/testcases/insert_test.go
+++ b/test/testcases/insert_test.go
@@ -160,7 +160,7 @@ func TestInsertAllFieldsData(t *testing.T) {
 	// prepare fields, name, schema
 	allFields := common.GenAllFields()
 	collName := common.GenRandomString(6)
-	schema := common.GenSchema(collName, false, allFields)
+	schema := common.GenSchema(collName, false, allFields, common.WithEnableDynamicField(true))
 
 	// create collection
 	errCreateCollection := mc.CreateCollection(ctx, schema, common.DefaultShards)
@@ -168,6 +168,7 @@ func TestInsertAllFieldsData(t *testing.T) {
 
 	// prepare and insert data
 	data := common.GenAllFieldsData(0, common.DefaultNb, common.DefaultDim)
+	data = append(data, common.GenDynamicFieldData(0, common.DefaultNb)...)
 	// insert data
 	ids, errInsert := mc.Insert(
 		ctx,
@@ -407,3 +408,113 @@ func TestInsertDynamicFieldData(t *testing.T) {
 	common.CheckErr(t, errInsert, false, "column size not match")
 
 }
+
+// test insert array column with empty data
+func TestInsertEmptyArray(t *testing.T) {
+	ctx := createContext(t, time.Second*common.DefaultTimeout)
+	// connect
+	mc := createMilvusClient(ctx, t)
+
+	// create collection
+	cp := CollectionParams{CollectionFieldsType: Int64FloatVecArray, AutoID: false, EnableDynamicField: true,
+		ShardsNum: common.DefaultShards, Dim: common.DefaultDim, MaxCapacity: common.TestCapacity}
+	collName := createCollection(ctx, t, mc, cp)
+
+	// prepare and insert data
+	var capacity int64 = 0
+	dp := DataParams{CollectionName: collName, PartitionName: "", CollectionFieldsType: Int64FloatVecArray,
+		start: 0, nb: common.DefaultNb, dim: common.DefaultDim, EnableDynamicField: true, WithRows: false}
+	_, _ = insertData(ctx, t, mc, dp, common.WithArrayCapacity(capacity))
+
+	// flush and check row count
+	errFlush := mc.Flush(ctx, collName, false)
+	common.CheckErr(t, errFlush, true)
+	stats, _ := mc.GetCollectionStatistics(ctx, collName)
+	require.Equal(t, strconv.Itoa(common.DefaultNb), stats[common.RowCount])
+}
+
+// test insert array type rows data
+func TestInsertArrayRows(t *testing.T) {
+	ctx := createContext(t, time.Second*common.DefaultTimeout)
+	// connect
+	mc := createMilvusClient(ctx, t)
+
+	// create collection
+	cp := CollectionParams{CollectionFieldsType: AllFields, AutoID: false, EnableDynamicField: false,
+		ShardsNum: common.DefaultShards, Dim: common.DefaultDim, MaxCapacity: common.TestCapacity}
+	collName := createCollection(ctx, t, mc, cp)
+
+	// prepare and insert array rows data
+	dp := DataParams{CollectionName: collName, PartitionName: "", CollectionFieldsType: AllFields,
+		start: 0, nb: common.DefaultNb, dim: common.DefaultDim, EnableDynamicField: false, WithRows: true}
+	_, _ = insertData(ctx, t, mc, dp, common.WithArrayCapacity(common.TestCapacity))
+
+	// flush and check row count
+	errFlush := mc.Flush(ctx, collName, false)
+	common.CheckErr(t, errFlush, true)
+	stats, _ := mc.GetCollectionStatistics(ctx, collName)
+	require.Equal(t, strconv.Itoa(common.DefaultNb), stats[common.RowCount])
+}
+
+// test insert array data type not match array field element type
+func TestInsertArrayDataTypeNotMatch(t *testing.T) {
+	t.Parallel()
+	ctx := createContext(t, time.Second*common.DefaultTimeout)
+	// connect
+	mc := createMilvusClient(ctx, t)
+	for _, arrayType := range common.ArrayFieldType {
+
+		// fields: int64 + float + vector + array with TestCapacity
+		defaultFields := common.GenDefaultFields(false)
+		arrayField := common.GenField(common.DefaultArrayFieldName, entity.FieldTypeArray,
+			common.WithElementType(arrayType), common.WithMaxCapacity(100), common.WithMaxLength(100))
+		fields := append(defaultFields, arrayField)
+
+		// create collection
+		collName := common.GenRandomString(6)
+		schema := common.GenSchema(collName, false, fields, common.WithEnableDynamicField(true))
+		err := mc.CreateCollection(ctx, schema, common.DefaultShards)
+		common.CheckErr(t, err, true)
+
+		// insert data type does not match schema array element type
+		var columnType entity.FieldType
+		if arrayType == entity.FieldTypeInt64 {
+			columnType = entity.FieldTypeBool
+		} else {
+			columnType = entity.FieldTypeInt64
+		}
+		intColumn, floatColumn, vectorColumn := common.GenDefaultColumnData(0, common.DefaultNb, common.DefaultDim)
+		arrayColumn := common.GenArrayColumnData(0, common.DefaultNb, common.DefaultArrayFieldName,
+			common.WithArrayElementType(columnType))
+		_, err = mc.Insert(ctx, collName, "", intColumn, floatColumn, vectorColumn, arrayColumn)
+		common.CheckErr(t, err, false, "insert data does not match")
+	}
+}
+
+// test insert array column data that capacity exceeds max capacity
+func TestInsertArrayDataCapacityExceed(t *testing.T) {
+	t.Parallel()
+	ctx := createContext(t, time.Second*common.DefaultTimeout)
+	// connect
+	mc := createMilvusClient(ctx, t)
+	for _, arrayType := range common.ArrayFieldType {
+		// fields: int64 + float + vector + array with TestCapacity
+		defaultFields := common.GenDefaultFields(false)
+		arrayField := common.GenField(common.DefaultArrayFieldName, entity.FieldTypeArray,
+			common.WithElementType(arrayType), common.WithMaxCapacity(common.TestCapacity), common.WithMaxLength(100))
+		fields := append(defaultFields, arrayField)
+
+		// create collection
+		collName := common.GenRandomString(6)
+		schema := common.GenSchema(collName, false, fields, common.WithEnableDynamicField(true))
+		err := mc.CreateCollection(ctx, schema, common.DefaultShards)
+		common.CheckErr(t, err, true)
+
+		// insert data capacity larger than TestCapacity
+		intColumn, floatColumn, vectorColumn := common.GenDefaultColumnData(0, common.DefaultNb, common.DefaultDim)
+		arrayColumn := common.GenArrayColumnData(0, common.DefaultNb, common.DefaultArrayFieldName,
+			common.WithArrayElementType(arrayType), common.WithArrayCapacity(common.TestCapacity+1))
+		_, err = mc.Insert(ctx, collName, "", intColumn, floatColumn, vectorColumn, arrayColumn)
+		common.CheckErr(t, err, false, "array length exceeds max capacity")
+	}
+}
diff --git a/test/testcases/main_test.go b/test/testcases/main_test.go
index fa79a8e..7df17a1 100644
--- a/test/testcases/main_test.go
+++ b/test/testcases/main_test.go
@@ -4,7 +4,6 @@ import (
 	"context"
 	"flag"
 	"log"
-	"math/rand"
 	"os"
 	"strconv"
 	"testing"
@@ -243,11 +242,12 @@ func createVarcharCollectionWithDataIndex(ctx context.Context, t *testing.T, mc
 }
 
 const (
-	Int64FloatVec     CollectionFieldsType = "PkInt64FloatVec"     // int64 + float + floatVec
-	Int64BinaryVec    CollectionFieldsType = "Int64BinaryVec"      // int64 + float + binaryVec
-	VarcharBinaryVec  CollectionFieldsType = "PkVarcharBinaryVec"  // varchar + binaryVec
-	Int64FloatVecJSON CollectionFieldsType = "PkInt64FloatVecJson" // int64 + float + floatVec + json
-	AllFields         CollectionFieldsType = "AllFields"           // all scalar fields + floatVec
+	Int64FloatVec      CollectionFieldsType = "PkInt64FloatVec"     // int64 + float + floatVec
+	Int64BinaryVec     CollectionFieldsType = "Int64BinaryVec"      // int64 + float + binaryVec
+	VarcharBinaryVec   CollectionFieldsType = "PkVarcharBinaryVec"  // varchar + binaryVec
+	Int64FloatVecJSON  CollectionFieldsType = "PkInt64FloatVecJson" // int64 + float + floatVec + json
+	Int64FloatVecArray CollectionFieldsType = "Int64FloatVecArray"  // int64 + float + floatVec + all array
+	AllFields          CollectionFieldsType = "AllFields"           // all scalar fields + floatVec
 )
 
 func createCollection(ctx context.Context, t *testing.T, mc *base.MilvusClient, cp CollectionParams, opts ...client.CreateCollectionOption) string {
@@ -267,6 +267,9 @@ func createCollection(ctx context.Context, t *testing.T, mc *base.MilvusClient,
 		fields = common.GenDefaultFields(cp.AutoID)
 		jsonField := common.GenField(common.DefaultJSONFieldName, entity.FieldTypeJSON)
 		fields = append(fields, jsonField)
+	case Int64FloatVecArray:
+		fields = common.GenDefaultFields(cp.AutoID)
+		fields = append(fields, common.GenAllArrayFieldsWithCapacity(cp.MaxCapacity)...)
 	case AllFields:
 		fields = common.GenAllFields()
 	}
@@ -285,8 +288,7 @@ func createCollection(ctx context.Context, t *testing.T, mc *base.MilvusClient,
 	return collName
 }
 
-// insert nb data
-func insertData(ctx context.Context, t *testing.T, mc *base.MilvusClient, dp DataParams) (entity.Column, error) {
+func insertData(ctx context.Context, t *testing.T, mc *base.MilvusClient, dp DataParams, opts ...common.GenColumnDataOption) (entity.Column, error) {
 	// todo autoid
 	// prepare data
 	var data []entity.Column
@@ -328,11 +330,20 @@ func insertData(ctx context.Context, t *testing.T, mc *base.MilvusClient, dp Dat
 			jsonColumn := common.GenDefaultJSONData(common.DefaultJSONFieldName, dp.start, dp.nb)
 			data = append(data, intColumn, floatColumn, vecColumn, jsonColumn)
 		}
+	case Int64FloatVecArray:
+		if dp.WithRows {
+			rows = common.GenDefaultArrayRows(dp.start, dp.nb, dp.dim, dp.EnableDynamicField)
+		} else {
+			data = common.GenAllArrayData(dp.start, dp.nb, opts...)
+			intColumn, floatColumn, vecColumn := common.GenDefaultColumnData(dp.start, dp.nb, dp.dim)
+			data = append(data, intColumn, floatColumn, vecColumn)
+		}
+
 	case AllFields:
 		if dp.WithRows {
-			rows = common.GenAllFieldsRows(dp.start, dp.nb, dp.dim, dp.EnableDynamicField)
+			rows = common.GenAllFieldsRows(dp.start, dp.nb, dp.dim, dp.EnableDynamicField, opts...)
 		}
-		data = common.GenAllFieldsData(dp.start, dp.nb, dp.dim)
+		data = common.GenAllFieldsData(dp.start, dp.nb, dp.dim, opts...)
 	}
 
 	if dp.EnableDynamicField && !dp.WithRows {
@@ -349,7 +360,6 @@ func insertData(ctx context.Context, t *testing.T, mc *base.MilvusClient, dp Dat
 	}
 	common.CheckErr(t, err, true)
 	require.Equalf(t, dp.nb, ids.Len(), "Expected insert id num: %d, actual: ", dp.nb, ids.Len())
-
 	return ids, err
 }
 
@@ -366,48 +376,8 @@ func createCollectionAllFields(ctx context.Context, t *testing.T, mc *base.Milvu
 	errCreateCollection := mc.CreateCollection(ctx, schema, common.DefaultShards)
 	common.CheckErr(t, errCreateCollection, true)
 
-	// prepare data
-	int64Values := make([]int64, 0, nb)
-	boolValues := make([]bool, 0, nb)
-	int8Values := make([]int8, 0, nb)
-	int16Values := make([]int16, 0, nb)
-	int32Values := make([]int32, 0, nb)
-	floatValues := make([]float32, 0, nb)
-	doubleValues := make([]float64, 0, nb)
-	varcharValues := make([]string, 0, nb)
-	floatVectors := make([][]float32, 0, nb)
-	for i := start; i < nb+start; i++ {
-		int64Values = append(int64Values, int64(i))
-		boolValues = append(boolValues, i/2 == 0)
-		int8Values = append(int8Values, int8(i))
-		int16Values = append(int16Values, int16(i))
-		int32Values = append(int32Values, int32(i))
-		floatValues = append(floatValues, float32(i))
-		doubleValues = append(doubleValues, float64(i))
-		varcharValues = append(varcharValues, strconv.Itoa(i))
-		vec := make([]float32, 0, common.DefaultDim)
-		for j := 0; j < int(common.DefaultDim); j++ {
-			vec = append(vec, rand.Float32())
-		}
-		floatVectors = append(floatVectors, vec)
-	}
-
-	// insert data
-	ids, errInsert := mc.Insert(
-		ctx,
-		collName,
-		"",
-		entity.NewColumnInt64("int64", int64Values),
-		entity.NewColumnBool("bool", boolValues),
-		entity.NewColumnInt8("int8", int8Values),
-		entity.NewColumnInt16("int16", int16Values),
-		entity.NewColumnInt32("int32", int32Values),
-		entity.NewColumnFloat("float", floatValues),
-		entity.NewColumnDouble("double", doubleValues),
-		entity.NewColumnVarChar("varchar", varcharValues),
-		entity.NewColumnFloatVector("floatVec", int(common.DefaultDim), floatVectors),
-		common.GenDefaultJSONData("json", 0, nb),
-	)
+	data := common.GenAllFieldsData(start, nb, common.DefaultDim, common.WithArrayCapacity(common.TestCapacity))
+	ids, errInsert := mc.Insert(ctx, collName, "", data...)
 	common.CheckErr(t, errInsert, true)
 	require.Equal(t, nb, ids.Len())
 	return collName, ids
diff --git a/test/testcases/option.go b/test/testcases/option.go
index 659b564..c41d4a4 100644
--- a/test/testcases/option.go
+++ b/test/testcases/option.go
@@ -20,6 +20,7 @@ type CollectionParams struct {
 	ShardsNum            int32
 	Dim                  int64
 	MaxLength            int64
+	MaxCapacity          int64
 }
 
 type DataParams struct {
diff --git a/test/testcases/partition_key_test.go b/test/testcases/partition_key_test.go
index 2b88a48..42c9e86 100644
--- a/test/testcases/partition_key_test.go
+++ b/test/testcases/partition_key_test.go
@@ -25,7 +25,7 @@ func TestPartitionKeyDefaultInt64(t *testing.T) {
 	// fields
 	partitionKeyFieldName := "partitionKeyField"
 	partitionKeyField := common.GenField(partitionKeyFieldName, entity.FieldTypeInt64,
-		common.WithIsPartitionKey(true), common.WithMaxLength(common.DefaultMaxLength))
+		common.WithIsPartitionKey(true), common.WithMaxLength(common.MaxLength))
 
 	// schema
 	schema := common.GenSchema(common.GenRandomString(6), false, common.GenDefaultFields(false))
@@ -105,7 +105,7 @@ func TestPartitionKeyDefaultVarchar(t *testing.T) {
 	// fields
 	partitionKeyFieldName := "partitionKeyField"
 	partitionKeyField := common.GenField(partitionKeyFieldName, entity.FieldTypeVarChar,
-		common.WithIsPartitionKey(true), common.WithMaxLength(common.DefaultMaxLength))
+		common.WithIsPartitionKey(true), common.WithMaxLength(common.MaxLength))
 
 	// schema
 	schema := common.GenSchema(common.GenRandomString(6), false, common.GenDefaultFields(false))
diff --git a/test/testcases/query_test.go b/test/testcases/query_test.go
index e7eaf0d..b97a29e 100644
--- a/test/testcases/query_test.go
+++ b/test/testcases/query_test.go
@@ -223,7 +223,6 @@ func TestQueryEmptyIds(t *testing.T) {
 }
 
 // test query with non-primary field filter, and output scalar fields
-// TODO "Issue: https://github.com/milvus-io/milvus-sdk-go/issues/366")
 func TestQueryNonPrimaryFields(t *testing.T) {
 	t.Parallel()
 	ctx := createContext(t, time.Second*common.DefaultTimeout)
@@ -383,39 +382,43 @@ func TestQueryOutputBinaryAndVarchar(t *testing.T) {
 	common.CheckOutputFields(t, queryResult, []string{common.DefaultBinaryVecFieldName, common.DefaultVarcharFieldName})
 }
 
-// test query output all scalar fields
-func TestOutputAllScalarFields(t *testing.T) {
+// test query output all fields
+func TestOutputAllFields(t *testing.T) {
 	ctx := createContext(t, time.Second*common.DefaultTimeout)
 	// connect
 	mc := createMilvusClient(ctx, t)
 
-	// create and insert
-	collName, _ := createCollectionAllFields(ctx, t, mc, common.DefaultNb, 0)
-	mc.Flush(ctx, collName, false)
+	for _, withRows := range []bool{true, false} {
+		// create collection
+		var capacity int64 = common.TestCapacity
+		cp := CollectionParams{CollectionFieldsType: AllFields, AutoID: false, EnableDynamicField: true,
+			ShardsNum: common.DefaultShards, Dim: common.DefaultDim, MaxCapacity: capacity}
+		collName := createCollection(ctx, t, mc, cp)
 
-	// create index
-	idx, _ := entity.NewIndexHNSW(entity.L2, 8, 96)
-	mc.CreateIndex(ctx, collName, "floatVec", idx, false)
+		// prepare and insert data
+		dp := DataParams{CollectionName: collName, PartitionName: "", CollectionFieldsType: AllFields,
+			start: 0, nb: common.DefaultNb, dim: common.DefaultDim, EnableDynamicField: true, WithRows: withRows}
+		_, _ = insertData(ctx, t, mc, dp, common.WithArrayCapacity(capacity))
 
-	// Load collection
-	errLoad := mc.LoadCollection(ctx, collName, false)
-	common.CheckErr(t, errLoad, true)
+		// flush and check row count
+		errFlush := mc.Flush(ctx, collName, false)
+		common.CheckErr(t, errFlush, true)
 
-	// query with non-primary field
-	queryIds := []entity.Column{
-		entity.NewColumnBool("bool", []bool{true}),
-		entity.NewColumnInt8("int8", []int8{0}),
-		entity.NewColumnInt16("int16", []int16{0}),
-		entity.NewColumnInt32("int32", []int32{0}),
-		entity.NewColumnFloat("float", []float32{0}),
-		entity.NewColumnDouble("double", []float64{0}),
-	}
+		idx, _ := entity.NewIndexHNSW(entity.L2, 8, 96)
+		_ = mc.CreateIndex(ctx, collName, common.DefaultFloatVecFieldName, idx, false)
 
-	queryResultAllScalar, errQuery := mc.QueryByPks(ctx, collName, []string{common.DefaultPartition},
-		entity.NewColumnInt64(common.DefaultIntFieldName, []int64{0}), []string{"bool", "int8", "int16", "int32", "float", "double"})
-	common.CheckErr(t, errQuery, true)
-	common.CheckQueryResult(t, queryResultAllScalar, queryIds)
-	common.CheckOutputFields(t, queryResultAllScalar, []string{"int64", "bool", "int8", "int16", "int32", "float", "double"})
+		// Load collection
+		errLoad := mc.LoadCollection(ctx, collName, false)
+		common.CheckErr(t, errLoad, true)
+
+		// query output all fields -> output all fields, includes vector and $meta field
+		allFieldsName := append(common.AllArrayFieldsName, "int64", "bool", "int8", "int16", "int32", "float",
+			"double", "varchar", "json", "floatVec", common.DefaultDynamicFieldName)
+		queryResultAll, errQuery := mc.Query(ctx, collName, []string{},
+			fmt.Sprintf("%s == 0", common.DefaultIntFieldName), []string{"*"})
+		common.CheckErr(t, errQuery, true)
+		common.CheckOutputFields(t, queryResultAll, allFieldsName)
+	}
 }
 
 // test query with an not existed field
@@ -613,6 +616,134 @@ func TestQueryCountJsonDynamicExpr(t *testing.T) {
 	}
 }
 
+// test query with all kinds of array expr
+func TestQueryArrayFieldExpr(t *testing.T) {
+	ctx := createContext(t, time.Second*common.DefaultTimeout)
+	// connect
+	mc := createMilvusClient(ctx, t)
+
+	for _, withRows := range []bool{true, false} {
+		// create collection
+		var capacity int64 = common.TestCapacity
+		cp := CollectionParams{CollectionFieldsType: AllFields, AutoID: false, EnableDynamicField: true,
+			ShardsNum: common.DefaultShards, Dim: common.DefaultDim, MaxCapacity: capacity}
+		collName := createCollection(ctx, t, mc, cp, client.WithConsistencyLevel(entity.ClStrong))
+
+		// prepare and insert data
+		dp := DataParams{CollectionName: collName, PartitionName: "", CollectionFieldsType: AllFields,
+			start: 0, nb: common.DefaultNb, dim: common.DefaultDim, EnableDynamicField: true, WithRows: withRows}
+		_, _ = insertData(ctx, t, mc, dp, common.WithArrayCapacity(capacity))
+
+		// flush and check row count
+		errFlush := mc.Flush(ctx, collName, false)
+		common.CheckErr(t, errFlush, true)
+
+		idx, _ := entity.NewIndexHNSW(entity.L2, 8, 96)
+		_ = mc.CreateIndex(ctx, collName, common.DefaultFloatVecFieldName, idx, false)
+
+		// Load collection
+		errLoad := mc.LoadCollection(ctx, collName, false)
+		common.CheckErr(t, errLoad, true)
+
+		type exprCount struct {
+			expr  string
+			count int64
+		}
+		exprCounts := []exprCount{
+			{expr: fmt.Sprintf("%s[0] == false", common.DefaultBoolArrayField), count: common.DefaultNb / 2},                 //  array[0] ==
+			{expr: fmt.Sprintf("%s[0] > 0", common.DefaultInt64ArrayField), count: common.DefaultNb - 1},                     //  array[0] >
+			{expr: fmt.Sprintf("%s[0] > 0", common.DefaultInt8ArrayField), count: 1524},                                      //  array[0] > int8 range: [-128, 127]
+			{expr: fmt.Sprintf("json_contains (%s, %d)", common.DefaultInt16ArrayField, capacity), count: capacity},          // json_contains(array, 1)
+			{expr: fmt.Sprintf("array_contains (%s, %d)", common.DefaultInt16ArrayField, capacity), count: capacity},         // array_contains(array, 1)
+			{expr: fmt.Sprintf("array_contains (%s, 1)", common.DefaultInt32ArrayField), count: 2},                           // array_contains(array, 1)
+			{expr: fmt.Sprintf("json_contains (%s, 1)", common.DefaultInt32ArrayField), count: 2},                            // json_contains(array, 1)
+			{expr: fmt.Sprintf("array_contains (%s, 1000000)", common.DefaultInt32ArrayField), count: 0},                     // array_contains(array, 1)
+			{expr: fmt.Sprintf("json_contains_all (%s, [90, 91])", common.DefaultInt64ArrayField), count: 91},                // json_contains_all(array, [x])
+			{expr: fmt.Sprintf("array_contains_all (%s, [1, 2])", common.DefaultInt64ArrayField), count: 2},                  // array_contains_all(array, [x])
+			{expr: fmt.Sprintf("array_contains_any (%s, [0, 100, 10000])", common.DefaultFloatArrayField), count: 101},       // array_contains_any(array, [x])
+			{expr: fmt.Sprintf("json_contains_any (%s, [0, 100, 10])", common.DefaultFloatArrayField), count: 101},           // json_contains_any (array, [x])
+			{expr: fmt.Sprintf("%s == [0, 1]", common.DefaultDoubleArrayField), count: 0},                                    //  array ==
+			{expr: fmt.Sprintf("array_length(%s) == 10", common.DefaultVarcharArrayField), count: 0},                         //  array_length
+			{expr: fmt.Sprintf("array_length(%s) == %d", common.DefaultDoubleArrayField, capacity), count: common.DefaultNb}, //  array_length
+		}
+
+		for _, _exprCount := range exprCounts {
+			log.Println(_exprCount.expr)
+			countRes, err := mc.Query(ctx, collName,
+				[]string{}, _exprCount.expr, []string{common.QueryCountFieldName})
+			common.CheckErr(t, err, true)
+			require.Equal(t, _exprCount.count, countRes.GetColumn(common.QueryCountFieldName).(*entity.ColumnInt64).Data()[0])
+		}
+	}
+}
+
+// test query different array rows has different element length
+func TestQueryArrayDifferentLenBetweenRows(t *testing.T) {
+	ctx := createContext(t, time.Second*common.DefaultTimeout)
+	// connect
+	mc := createMilvusClient(ctx, t)
+
+	// fields
+	defaultFields := common.GenDefaultFields(false)
+	int64ArrayField := common.GenField(common.DefaultInt32ArrayField, entity.FieldTypeArray,
+		common.WithElementType(entity.FieldTypeInt32), common.WithMaxCapacity(common.TestCapacity))
+
+	// create collection with max
+	collName := common.GenRandomString(4)
+	schema := common.GenSchema(collName, false, append(defaultFields, int64ArrayField), common.WithEnableDynamicField(true))
+	err := mc.CreateCollection(ctx, schema, common.DefaultShards, client.WithConsistencyLevel(entity.ClStrong))
+	common.CheckErr(t, err, true)
+
+	// insert data [0, 1500) with array length = capacity, values: [i+0, i+ 100)
+	intColumn, floatColumn, vecColumn := common.GenDefaultColumnData(0, common.DefaultNb/2, common.DefaultDim)
+	data := []entity.Column{
+		intColumn,
+		floatColumn,
+		vecColumn,
+		common.GenArrayColumnData(0, common.DefaultNb/2, common.DefaultInt32ArrayField,
+			common.WithArrayElementType(entity.FieldTypeInt32), common.WithArrayCapacity(common.TestCapacity)),
+	}
+	ids, err := mc.Insert(ctx, collName, "", data...)
+	common.CheckErr(t, err, true)
+
+	// insert data [1500, 3000) with array length = capacity/2, values: values: [i+0, i+ 50)
+	require.Equal(t, common.DefaultNb/2, ids.Len())
+	intColumn1, floatColumn1, vecColumn1 := common.GenDefaultColumnData(common.DefaultNb/2, common.DefaultNb/2, common.DefaultDim)
+	data1 := []entity.Column{
+		intColumn1,
+		floatColumn1,
+		vecColumn1,
+		common.GenArrayColumnData(common.DefaultNb/2, common.DefaultNb/2, common.DefaultInt32ArrayField,
+			common.WithArrayElementType(entity.FieldTypeInt32), common.WithArrayCapacity(common.TestCapacity/2)),
+	}
+	ids, err = mc.Insert(ctx, collName, "", data1...)
+	common.CheckErr(t, err, true)
+	require.Equal(t, common.DefaultNb/2, ids.Len())
+
+	// flush and check row count
+	errFlush := mc.Flush(ctx, collName, false)
+	common.CheckErr(t, errFlush, true)
+
+	idx, _ := entity.NewIndexHNSW(entity.L2, 8, 96)
+	_ = mc.CreateIndex(ctx, collName, common.DefaultFloatVecFieldName, idx, false)
+
+	// Load collection
+	errLoad := mc.LoadCollection(ctx, collName, false)
+	common.CheckErr(t, errLoad, true)
+
+	// query array idx exceeds max capacity, array[100]
+	countRes, err := mc.Query(ctx, collName, []string{}, fmt.Sprintf("%s[%d] > 0", common.DefaultInt32ArrayField, common.TestCapacity),
+		[]string{common.QueryCountFieldName})
+	common.CheckErr(t, err, true)
+	require.Equal(t, int64(0), countRes.GetColumn(common.QueryCountFieldName).(*entity.ColumnInt64).Data()[0])
+
+	// query: some rows has element less than expr index array[51]
+	countRes, err = mc.Query(ctx, collName, []string{}, fmt.Sprintf("%s[%d] > 0", common.DefaultInt32ArrayField, common.TestCapacity/2+1),
+		[]string{common.QueryCountFieldName})
+	common.CheckErr(t, err, true)
+	require.Equal(t, int64(common.DefaultNb/2), countRes.GetColumn(common.QueryCountFieldName).(*entity.ColumnInt64).Data()[0])
+}
+
 // test query with expr and verify output dynamic field data
 func TestQueryJsonDynamicExpr(t *testing.T) {
 	t.Parallel()
diff --git a/test/testcases/search_test.go b/test/testcases/search_test.go
index fc7e83c..b44ad82 100644
--- a/test/testcases/search_test.go
+++ b/test/testcases/search_test.go
@@ -405,13 +405,12 @@ func TestSearchOutputFields(t *testing.T) {
 
 // test search output all * fields when enable dynamic and insert dynamic column data
 func TestSearchOutputAllFields(t *testing.T) {
-	t.Skip("https://github.com/milvus-io/milvus-sdk-go/issues/596")
 	t.Parallel()
 	ctx := createContext(t, time.Second*common.DefaultTimeout)
 	// connect
 	mc := createMilvusClient(ctx, t)
 
-	for _, enableDynamic := range []bool{true, false} {
+	for _, enableDynamic := range []bool{false, true} {
 		// create collection
 		cp := CollectionParams{CollectionFieldsType: AllFields, AutoID: false, EnableDynamicField: enableDynamic,
 			ShardsNum: common.DefaultShards, Dim: common.DefaultDim}
@@ -433,41 +432,41 @@ func TestSearchOutputAllFields(t *testing.T) {
 
 		// search vector output all scalar fields
 		queryVec := common.GenSearchVectors(common.DefaultNq, common.DefaultDim, entity.FieldTypeFloatVector)
-		allScalarFields := []string{"int64", "bool", "int8", "int16", "int32", "float", "double", "varchar", "json"}
-		var allScalarFieldsDynamic []string
+		allFields := []string{"int64", "bool", "int8", "int16", "int32", "float", "double", "varchar", "json", "floatVec"}
+		allFields = append(allFields, common.AllArrayFieldsName...)
+
 		if enableDynamic {
-			allScalarFieldsDynamic = append(allScalarFields, common.DefaultDynamicFieldName)
-		} else {
-			allScalarFieldsDynamic = allScalarFields
+			allFields = append(allFields, common.DefaultDynamicFieldName)
 		}
 		sp, _ := entity.NewIndexHNSWSearchParam(74)
 		searchRes, _ := mc.Search(ctx, collName, []string{},
 			"",
-			allScalarFieldsDynamic,
+			[]string{"*"},
 			queryVec,
 			common.DefaultFloatVecFieldName,
 			entity.L2,
 			common.DefaultTopK,
 			sp,
 		)
-		common.CheckOutputFields(t, searchRes[0].Fields, allScalarFieldsDynamic)
+		common.CheckOutputFields(t, searchRes[0].Fields, allFields)
 
 		// search with output * fields
 		if enableDynamic {
-			//search output [*, a] fields
+			//search output [*, a] fields -> output all fields, no a field
 			_, errNotExist := mc.Search(ctx, collName, []string{}, "", []string{"*", "a"}, queryVec,
 				common.DefaultFloatVecFieldName, entity.L2, common.DefaultTopK, sp)
-			common.CheckErr(t, errNotExist, false, "not exist")
+			common.CheckErr(t, errNotExist, true)
+			common.CheckOutputFields(t, searchRes[0].Fields, allFields)
 
-			//search output [*, dynamicNumber] fields
+			//search output [*, dynamicNumber] fields -> -> output all fields, $meta replace by dynamicNumber
 			searchRes, _ = mc.Search(ctx, collName, []string{}, "", []string{"*", common.DefaultDynamicNumberField},
 				queryVec, common.DefaultFloatVecFieldName, entity.L2, common.DefaultTopK, sp)
-			common.CheckOutputFields(t, searchRes[0].Fields, append(allScalarFields, common.DefaultFloatVecFieldName, common.DefaultDynamicNumberField))
+			common.CheckOutputFields(t, searchRes[0].Fields, append(allFields, common.DefaultDynamicNumberField))
 
-			// search output * fields
-			searchRes, _ = mc.Search(ctx, collName, []string{}, "", []string{"*"}, queryVec, common.DefaultFloatVecFieldName,
-				entity.L2, common.DefaultTopK, sp)
-			common.CheckOutputFields(t, searchRes[0].Fields, append(allScalarFields, common.DefaultFloatVecFieldName))
+			///search output [*, dynamicNumber] fields -> -> output all fields, $meta replace by dynamicNumber
+			searchRes, _ = mc.Search(ctx, collName, []string{}, "", []string{common.DefaultDynamicNumberField},
+				queryVec, common.DefaultFloatVecFieldName, entity.L2, common.DefaultTopK, sp)
+			common.CheckOutputFields(t, searchRes[0].Fields, []string{common.DefaultDynamicNumberField})
 		}
 	}
 }
@@ -913,7 +912,7 @@ func TestSearchDynamicFieldExpr(t *testing.T) {
 	// connect
 	mc := createMilvusClient(ctx, t)
 
-	for _, withRows := range []bool{false, true} {
+	for _, withRows := range []bool{true, false} {
 		// create collection
 		cp := CollectionParams{CollectionFieldsType: Int64FloatVecJSON, AutoID: false, EnableDynamicField: true,
 			ShardsNum: common.DefaultShards, Dim: common.DefaultDim}
@@ -1001,6 +1000,75 @@ func TestSearchDynamicFieldExpr(t *testing.T) {
 	}
 }
 
+func TestSearchArrayFieldExpr(t *testing.T) {
+	t.Parallel()
+
+	ctx := createContext(t, time.Second*common.DefaultTimeout)
+	// connect
+	mc := createMilvusClient(ctx, t)
+	var capacity int64 = common.TestCapacity
+
+	for _, withRows := range []bool{true, false} {
+		// create collection
+		cp := CollectionParams{CollectionFieldsType: Int64FloatVecArray, AutoID: false, EnableDynamicField: true,
+			ShardsNum: common.DefaultShards, Dim: common.DefaultDim, MaxCapacity: capacity}
+		collName := createCollection(ctx, t, mc, cp, client.WithConsistencyLevel(entity.ClStrong))
+
+		// prepare and insert data
+		dp := DataParams{CollectionName: collName, PartitionName: "", CollectionFieldsType: Int64FloatVecArray,
+			start: 0, nb: common.DefaultNb, dim: common.DefaultDim, EnableDynamicField: true, WithRows: withRows}
+		_, _ = insertData(ctx, t, mc, dp, common.WithArrayCapacity(capacity))
+		mc.Flush(ctx, collName, false)
+
+		idx, _ := entity.NewIndexHNSW(entity.L2, 8, 96)
+		_ = mc.CreateIndex(ctx, collName, common.DefaultFloatVecFieldName, idx, false)
+
+		// Load collection
+		errLoad := mc.LoadCollection(ctx, collName, false)
+		common.CheckErr(t, errLoad, true)
+
+		exprs := []string{
+			fmt.Sprintf("%s[0] == false", common.DefaultBoolArrayField),                            // array[0] ==
+			fmt.Sprintf("%s[0] > 0", common.DefaultInt64ArrayField),                                // array[0] >
+			fmt.Sprintf("json_contains (%s, %d)", common.DefaultInt16ArrayField, capacity),         // json_contains
+			fmt.Sprintf("array_contains (%s, %d)", common.DefaultInt16ArrayField, capacity),        // array_contains
+			fmt.Sprintf("json_contains_all (%s, [90, 91])", common.DefaultInt64ArrayField),         // json_contains_all
+			fmt.Sprintf("array_contains_all (%s, [90, 91])", common.DefaultInt64ArrayField),        // array_contains_all
+			fmt.Sprintf("array_contains_any (%s, [0, 100, 10000])", common.DefaultFloatArrayField), // array_contains_any
+			fmt.Sprintf("json_contains_any (%s, [0, 100, 10])", common.DefaultFloatArrayField),     // json_contains_any
+			fmt.Sprintf("array_length(%s) == %d", common.DefaultDoubleArrayField, capacity),        // array_length
+		}
+
+		// search with jsonField expr key datatype and json data type mismatch
+		sp, _ := entity.NewIndexHNSWSearchParam(74)
+		for _, expr := range exprs {
+			log.Printf("search expr: %s", expr)
+			searchRes, errSearchEmpty := mc.Search(
+				ctx, collName, []string{},
+				expr, common.AllArrayFieldsName,
+				common.GenSearchVectors(common.DefaultNq, common.DefaultDim, entity.FieldTypeFloatVector),
+				common.DefaultFloatVecFieldName, entity.L2,
+				common.DefaultTopK, sp,
+			)
+			common.CheckErr(t, errSearchEmpty, true)
+			common.CheckOutputFields(t, searchRes[0].Fields, common.AllArrayFieldsName)
+			common.CheckSearchResult(t, searchRes, common.DefaultNq, common.DefaultTopK)
+		}
+
+		// search hits empty
+		searchRes, errSearchEmpty := mc.Search(
+			ctx, collName, []string{},
+			fmt.Sprintf("array_contains (%s, 1000000)", common.DefaultInt32ArrayField),
+			common.AllArrayFieldsName,
+			common.GenSearchVectors(common.DefaultNq, common.DefaultDim, entity.FieldTypeFloatVector),
+			common.DefaultFloatVecFieldName, entity.L2, common.DefaultTopK,
+			sp,
+		)
+		common.CheckErr(t, errSearchEmpty, true)
+		require.Empty(t, searchRes)
+	}
+}
+
 // search with index scann search param ef < topK -> error
 func TestSearchInvalidScannReorderK(t *testing.T) {
 	ctx := createContext(t, time.Second*common.DefaultTimeout)
@@ -1061,13 +1129,13 @@ func TestSearchScannAllMetricsWithRawData(t *testing.T) {
 			mc := createMilvusClient(ctx, t)
 
 			// create collection
-			cp := CollectionParams{CollectionFieldsType: Int64FloatVecJSON, AutoID: false, EnableDynamicField: false,
+			cp := CollectionParams{CollectionFieldsType: Int64FloatVecJSON, AutoID: false, EnableDynamicField: true,
 				ShardsNum: common.DefaultShards, Dim: common.DefaultDim}
 			collName := createCollection(ctx, t, mc, cp)
 
 			// insert
 			dp := DataParams{CollectionName: collName, PartitionName: "", CollectionFieldsType: Int64FloatVecJSON,
-				start: 0, nb: common.DefaultNb, dim: common.DefaultDim, EnableDynamicField: false, WithRows: false}
+				start: 0, nb: common.DefaultNb, dim: common.DefaultDim, EnableDynamicField: true, WithRows: false}
 			_, _ = insertData(ctx, t, mc, dp)
 			mc.Flush(ctx, collName, false)
 
@@ -1100,7 +1168,7 @@ func TestSearchScannAllMetricsWithRawData(t *testing.T) {
 			)
 			common.CheckErr(t, errSearch, true)
 			common.CheckOutputFields(t, resSearch[0].Fields, []string{common.DefaultIntFieldName, common.DefaultFloatFieldName,
-				common.DefaultJSONFieldName, common.DefaultFloatVecFieldName})
+				common.DefaultJSONFieldName, common.DefaultFloatVecFieldName, common.DefaultDynamicFieldName})
 			common.CheckSearchResult(t, resSearch, 1, common.DefaultTopK)
 		}
 	}
@@ -1113,13 +1181,13 @@ func TestRangeSearchScannL2(t *testing.T) {
 	mc := createMilvusClient(ctx, t)
 
 	// create collection
-	cp := CollectionParams{CollectionFieldsType: Int64FloatVecJSON, AutoID: false, EnableDynamicField: false,
+	cp := CollectionParams{CollectionFieldsType: Int64FloatVecJSON, AutoID: false, EnableDynamicField: true,
 		ShardsNum: common.DefaultShards, Dim: common.DefaultDim}
 	collName := createCollection(ctx, t, mc, cp)
 
 	// insert
 	dp := DataParams{CollectionName: collName, PartitionName: "", CollectionFieldsType: Int64FloatVecJSON,
-		start: 0, nb: common.DefaultNb, dim: common.DefaultDim, EnableDynamicField: false, WithRows: false}
+		start: 0, nb: common.DefaultNb, dim: common.DefaultDim, EnableDynamicField: true, WithRows: false}
 	_, _ = insertData(ctx, t, mc, dp)
 
 	// create scann index
@@ -1148,7 +1216,7 @@ func TestRangeSearchScannL2(t *testing.T) {
 	common.CheckErr(t, errSearch, true)
 	common.CheckSearchResult(t, resSearch, 1, common.DefaultTopK)
 	common.CheckOutputFields(t, resSearch[0].Fields, []string{common.DefaultIntFieldName, common.DefaultFloatFieldName,
-		common.DefaultJSONFieldName, common.DefaultFloatVecFieldName})
+		common.DefaultJSONFieldName, common.DefaultFloatVecFieldName, common.DefaultDynamicFieldName})
 	for _, s := range resSearch[0].Scores {
 		require.GreaterOrEqual(t, s, float32(15.0))
 		require.Less(t, s, float32(20.0))
@@ -1171,13 +1239,13 @@ func TestRangeSearchScannIPCosine(t *testing.T) {
 		mc := createMilvusClient(ctx, t)
 
 		// create collection
-		cp := CollectionParams{CollectionFieldsType: Int64FloatVecJSON, AutoID: false, EnableDynamicField: false,
+		cp := CollectionParams{CollectionFieldsType: Int64FloatVecJSON, AutoID: false, EnableDynamicField: true,
 			ShardsNum: common.DefaultShards, Dim: common.DefaultDim}
 		collName := createCollection(ctx, t, mc, cp)
 
 		// insert
 		dp := DataParams{CollectionName: collName, PartitionName: "", CollectionFieldsType: Int64FloatVecJSON,
-			start: 0, nb: common.DefaultNb, dim: common.DefaultDim, EnableDynamicField: false, WithRows: false}
+			start: 0, nb: common.DefaultNb, dim: common.DefaultDim, EnableDynamicField: true, WithRows: false}
 		_, _ = insertData(ctx, t, mc, dp)
 		mc.Flush(ctx, collName, false)
 
@@ -1207,7 +1275,7 @@ func TestRangeSearchScannIPCosine(t *testing.T) {
 		common.CheckErr(t, errSearch, true)
 		common.CheckSearchResult(t, resSearch, 1, common.DefaultTopK)
 		common.CheckOutputFields(t, resSearch[0].Fields, []string{common.DefaultIntFieldName, common.DefaultFloatFieldName,
-			common.DefaultJSONFieldName, common.DefaultFloatVecFieldName})
+			common.DefaultJSONFieldName, common.DefaultFloatVecFieldName, common.DefaultDynamicFieldName})
 		for _, s := range resSearch[0].Scores {
 			require.GreaterOrEqual(t, s, float32(0))
 			require.Less(t, s, float32(100))
@@ -1232,13 +1300,13 @@ func TestRangeSearchScannBinary(t *testing.T) {
 		mc := createMilvusClient(ctx, t)
 
 		// create collection
-		cp := CollectionParams{CollectionFieldsType: Int64BinaryVec, AutoID: false, EnableDynamicField: false,
+		cp := CollectionParams{CollectionFieldsType: Int64BinaryVec, AutoID: false, EnableDynamicField: true,
 			ShardsNum: common.DefaultShards, Dim: common.DefaultDim}
 		collName := createCollection(ctx, t, mc, cp)
 
 		// insert
 		dp := DataParams{CollectionName: collName, PartitionName: "", CollectionFieldsType: Int64BinaryVec,
-			start: 0, nb: common.DefaultNb, dim: common.DefaultDim, EnableDynamicField: false, WithRows: false}
+			start: 0, nb: common.DefaultNb, dim: common.DefaultDim, EnableDynamicField: true, WithRows: false}
 		_, _ = insertData(ctx, t, mc, dp)
 		mc.Flush(ctx, collName, false)
 
@@ -1267,7 +1335,8 @@ func TestRangeSearchScannBinary(t *testing.T) {
 		// verify error nil, output all fields, range score
 		common.CheckErr(t, errSearch, true)
 		common.CheckSearchResult(t, resSearch, 1, common.DefaultTopK)
-		common.CheckOutputFields(t, resSearch[0].Fields, []string{common.DefaultIntFieldName, common.DefaultFloatFieldName, common.DefaultBinaryVecFieldName})
+		common.CheckOutputFields(t, resSearch[0].Fields, []string{common.DefaultIntFieldName, common.DefaultFloatFieldName,
+			common.DefaultBinaryVecFieldName, common.DefaultDynamicFieldName})
 		for _, s := range resSearch[0].Scores {
 			require.GreaterOrEqual(t, s, float32(0))
 			require.Less(t, s, float32(100))
diff --git a/test/testcases/upsert_test.go b/test/testcases/upsert_test.go
index 83b3097..2d167f3 100644
--- a/test/testcases/upsert_test.go
+++ b/test/testcases/upsert_test.go
@@ -4,7 +4,6 @@ package testcases
 
 import (
 	"fmt"
-	"log"
 	"strconv"
 	"testing"
 	"time"
@@ -159,23 +158,20 @@ func TestUpsertVarcharPk(t *testing.T) {
 	_, binaryColumn1 := common.GenDefaultVarcharData(0, upsertNb, common.DefaultDim)
 	ids, err := mc.Upsert(ctx, collName, "", varcharColumn1, binaryColumn1)
 	common.CheckErr(t, err, true)
-	log.Println(ids.FieldData())
 	require.ElementsMatch(t, ids.(*entity.ColumnVarChar).Data(), varcharValues)
 
 	// query old varchar pk (no space): ["1", ... "9"]
 	resSet, err = mc.QueryByPks(ctx, collName, []string{}, pkColumn, []string{common.DefaultVarcharFieldName, common.DefaultBinaryVecFieldName})
-	log.Println(resSet.GetColumn(common.DefaultVarcharFieldName).(*entity.ColumnVarChar).Data())
 	common.CheckErr(t, err, true)
 	require.ElementsMatch(t, varcharColumn.(*entity.ColumnVarChar).Data()[:upsertNb], resSet.GetColumn(common.DefaultVarcharFieldName).(*entity.ColumnVarChar).Data())
 	require.ElementsMatch(t, binaryColumn.(*entity.ColumnBinaryVector).Data()[:upsertNb], resSet.GetColumn(common.DefaultBinaryVecFieldName).(*entity.ColumnBinaryVector).Data())
 
 	// query and verify the updated entities
-	pkColumn1 := entity.NewColumnVarChar(common.DefaultVarcharFieldName, varcharColumn1.Data()[:upsertNb])
+	pkColumn1 := entity.NewColumnVarChar(common.DefaultVarcharFieldName, varcharColumn1.Data())
 	resSet, err = mc.QueryByPks(ctx, collName, []string{}, pkColumn1, []string{common.DefaultVarcharFieldName, common.DefaultBinaryVecFieldName})
-	log.Println(resSet.GetColumn(common.DefaultVarcharFieldName).(*entity.ColumnVarChar).Data())
 	common.CheckErr(t, err, true)
-	require.ElementsMatch(t, varcharColumn1.Data()[:upsertNb], resSet.GetColumn(common.DefaultVarcharFieldName).(*entity.ColumnVarChar).Data())
-	require.ElementsMatch(t, binaryColumn1.(*entity.ColumnBinaryVector).Data()[:upsertNb], resSet.GetColumn(common.DefaultBinaryVecFieldName).(*entity.ColumnBinaryVector).Data())
+	require.ElementsMatch(t, varcharColumn1.Data(), resSet.GetColumn(common.DefaultVarcharFieldName).(*entity.ColumnVarChar).Data())
+	require.ElementsMatch(t, binaryColumn1.(*entity.ColumnBinaryVector).Data(), resSet.GetColumn(common.DefaultBinaryVecFieldName).(*entity.ColumnBinaryVector).Data())
 }
 
 // test upsert with partition
@@ -309,7 +305,6 @@ func TestUpsertSamePksManyTimes(t *testing.T) {
 }
 
 func TestUpsertDynamicField(t *testing.T) {
-	t.Skip("https://github.com/milvus-io/milvus-sdk-go/issues/613")
 	// enable dynamic field and insert dynamic column
 	ctx := createContext(t, time.Second*common.DefaultTimeout)
 	// connect
@@ -338,14 +333,14 @@ func TestUpsertDynamicField(t *testing.T) {
 	resSet, err = mc.Query(ctx, collName, []string{}, fmt.Sprintf("%s < %d", common.DefaultDynamicNumberField, upsertNb), []string{common.DefaultDynamicNumberField})
 	require.Zero(t, resSet[0].Len())
 
-	// 2. upsert not exist pk with dynamic column ->  field dynamicNumber does not exist in collection ??? TODO issue
+	// 2. upsert not exist pk with dynamic column ->  field dynamicNumber does not exist in collection
 	intColumn2, floatColumn2, vecColumn2 := common.GenDefaultColumnData(common.DefaultNb, upsertNb, common.DefaultDim)
 	dynamicData2 := common.GenDynamicFieldData(common.DefaultNb, upsertNb)
 	_, err = mc.Upsert(ctx, collName, "", append(dynamicData2, intColumn2, floatColumn2, vecColumn2)...)
 	common.CheckErr(t, err, true)
 
 	// query and gets empty dynamic field
-	resSet, err = mc.Query(ctx, collName, []string{}, fmt.Sprintf("%s > %d", common.DefaultDynamicNumberField, common.DefaultNb), []string{common.QueryCountFieldName})
+	resSet, err = mc.Query(ctx, collName, []string{}, fmt.Sprintf("%s >= %d", common.DefaultDynamicNumberField, common.DefaultNb), []string{common.QueryCountFieldName})
 	require.Equal(t, int64(upsertNb), resSet.GetColumn(common.QueryCountFieldName).(*entity.ColumnInt64).Data()[0])
 }
 
@@ -358,7 +353,7 @@ func TestUpsertPartitionKeyCollection(t *testing.T) {
 	// create partition_key field
 	partitionKeyFieldName := "partitionKeyField"
 	partitionKeyField := common.GenField(partitionKeyFieldName, entity.FieldTypeInt64,
-		common.WithIsPartitionKey(true), common.WithMaxLength(common.DefaultMaxLength))
+		common.WithIsPartitionKey(true), common.WithMaxLength(common.TestMaxLen))
 
 	// schema
 	schema := common.GenSchema(common.GenRandomString(6), false, common.GenDefaultFields(false))