func (ch *CommonHandle) String() string {
	strs := make([]string, 0, ch.NumCols())
	for i := 0; i < ch.NumCols(); i++ {
		encodedCol := ch.EncodedCol(i)
		_, d, err := codec.DecodeOne(encodedCol)
		if err != nil {
			return err.Error()
		}
		str, err := d.ToString()
		if err != nil {
			return err.Error()
		}
		strs = append(strs, str)
	}
	return fmt.Sprintf("{%s}", strings.Join(strs, ", "))
}
String implements the Handle interface.
package table
import (
	"context"
	"fmt"
	"github.com/pingcap/tidb/kv"
	"github.com/pingcap/tidb/types"
	"strings"
	"bytes"
	parser_model "github.com/pingcap/parser/model"
	"github.com/zhihu/zetta/pkg/codec"
	"github.com/pingcap/tidb/sessionctx"
	"github.com/pingcap/tidb/sessionctx/stmtctx"
)
type Handle interface {
	IsInt() bool
	IntValue() int64
	Next() Handle
	Equal(h Handle) bool
	Compare(h Handle) int
	Encoded() []byte
	Len() int
	NumCols() int
	EncodedCol(idx int) []byte
	String() string
}
type CommonHandle struct {
	encoded       []byte
	colEndOffsets []uint16
}
func NewCommonHandle(encoded []byte) (*CommonHandle, error) {
	ch := &CommonHandle{encoded: encoded}
	remain := encoded
	endOff := uint16(0)
	for len(remain) > 0 {
		var err error
		var col []byte
		col, remain, err = codec.CutOne(remain)
		if err != nil {
			return nil, err
		}
		endOff += uint16(len(col))
		ch.colEndOffsets = append(ch.colEndOffsets, endOff)
	}
	return ch, nil
}
func (ch *CommonHandle) IsInt() bool {
	return false
}
func (ch *CommonHandle) IntValue() int64 {
	panic("not supported in CommonHandle")
}
func (ch *CommonHandle) Next() Handle {
	return &CommonHandle{
		encoded:       kv.Key(ch.encoded).PrefixNext(),
		colEndOffsets: ch.colEndOffsets,
	}
}
func (ch *CommonHandle) Equal(h Handle) bool {
	return !h.IsInt() && bytes.Equal(ch.encoded, h.Encoded())
}
func (ch *CommonHandle) Compare(h Handle) int {
	if h.IsInt() {
		panic("CommonHandle compares to IntHandle")
	}
	return bytes.Compare(ch.encoded, h.Encoded())
}
func (ch *CommonHandle) Encoded() []byte {
	return ch.encoded
}
func (ch *CommonHandle) Len() int {
	return len(ch.encoded)
}
func (ch *CommonHandle) NumCols() int {
	return len(ch.colEndOffsets)
}
func (ch *CommonHandle) EncodedCol(idx int) []byte {
	colStartOffset := uint16(0)
	if idx > 0 {
		colStartOffset = ch.colEndOffsets[idx-1]
	}
	return ch.encoded[colStartOffset:ch.colEndOffsets[idx]]
}