func (c *grpcClient) CreateCollectionByRow(ctx context.Context, row entity.Row, shardNum int32) error {
	if c.service == nil {
		return ErrClientNotReady
	}
	sch, err := entity.ParseSchema(row)
	if err != nil {
		return err
	}
	has, err := c.HasCollection(ctx, sch.CollectionName)
	if err != nil {
		return err
	}
	if has {
		return fmt.Errorf("collection %s already exist", sch.CollectionName)
	}
	p := sch.ProtoMessage()
	bs, err := proto.Marshal(p)
	if err != nil {
		return err
	}
	req := &server.CreateCollectionRequest{
		DbName:         "",  
		CollectionName: sch.CollectionName,
		Schema:         bs,
		ShardsNum:      shardNum,
	}
	resp, err := c.service.CreateCollection(ctx, req)
	if err != nil {
		return err
	}
	err = handleRespStatus(resp)
	if err != nil {
		return nil
	}
	return nil
}
CreateCollectionByRow create collection by row
package client
import (
	"context"
	"errors"
	"fmt"
	"reflect"
	"github.com/golang/protobuf/proto"
	"github.com/milvus-io/milvus-sdk-go/v2/entity"
	"github.com/milvus-io/milvus-sdk-go/v2/internal/proto/schema"
	"github.com/milvus-io/milvus-sdk-go/v2/internal/proto/server"
)