func (join *JoinTable) GetData(primaryKey []byte) (*Row, error) {
	leftrow, err := join.left.GetData(primaryKey)
	if err != nil {
		return nil, err
	}
	rightprimary, err := join.left.index(leftrow, join.Fk)
	if err != nil {
		return nil, err
	}
	rightrow, err := join.right.GetData(rightprimary)
	if err != nil {
		return nil, err
	}
	rowjoin := join.meta.CreateRow()
	rowjoin.Ty = None
	rowjoin.Primary = leftrow.Primary
	rowjoin.Data.(*JoinData).Left = leftrow.Data
	rowjoin.Data.(*JoinData).Right = rightrow.Data
	return rowjoin, nil
}
GetData rewrite get data of jointable
package table
import (
	"errors"
	"strings"
	"github.com/33cn/chain33/common/db"
	"github.com/33cn/chain33/common/log/log15"
	"github.com/33cn/chain33/types"
	"github.com/33cn/chain33/util"
)
var tablelog = log15.New("module", "db.table")
type JoinTable struct {
	left  *Table
	right *Table
	*Table
	Fk         string
	leftIndex  []string
	rightIndex []string
}
func NewJoinTable(left *Table, right *Table, indexes []string) (*JoinTable, error) {
	if left.kvdb != right.kvdb {
		return nil, errors.New("jointable: kvdb must same")
	}
	if _, ok := left.kvdb.(db.KVDB); !ok {
		return nil, errors.New("jointable: kvdb must be db.KVDB")
	}
	if left.opt.Prefix != right.opt.Prefix {
		return nil, errors.New("jointable: left and right table prefix must same")
	}
	fk := right.opt.Primary
	if !left.canGet(fk) {
		return nil, errors.New("jointable: left must has right primary index")
	}
	join := &JoinTable{left: left, right: right, Fk: fk}
	for _, index := range indexes {
		joinindex := strings.Split(index, joinsep)
		if len(joinindex) != 2 {
			return nil, errors.New("jointable: index config error")
		}
		if joinindex[0] != "" && !left.canGet(joinindex[0]) {
			return nil, errors.New("jointable: left table can not get: " + joinindex[0])
		}
		if joinindex[0] != "" {
			join.leftIndex = append(join.leftIndex, joinindex[0])
		}
		if joinindex[1] == "" || !right.canGet(joinindex[1]) {
			return nil, errors.New("jointable: right table can not get: " + joinindex[1])
		}
		if joinindex[1] != "" {
			join.rightIndex = append(join.rightIndex, joinindex[1])
		}
	}
	opt := &Option{
		Join:    true,
		Prefix:  left.opt.Prefix,
		Name:    left.opt.Name + joinsep + right.opt.Name,
		Primary: left.opt.Primary,
		Index:   indexes,
	}
	mytable, err := NewTable(&JoinMeta{
		left:  left.meta,
		right: right.meta}, left.kvdb, opt)
	if err != nil {
		return nil, err
	}
	join.Table = mytable
	return join, nil
}
func (join *JoinTable) GetLeft() *Table {
	return join.left
}
func (join *JoinTable) GetRight() *Table {
	return join.right
}
func (join *JoinTable) GetTable(name string) (*Table, error) {
	if join.left.opt.Name == name {
		return join.left, nil
	}
	if join.right.opt.Name == name {
		return join.right, nil
	}
	return nil, types.ErrNotFound
}
func (join *JoinTable) MustGetTable(name string) *Table {
	table, err := join.GetTable(name)
	if err != nil {
		panic(err)
	}
	return table
}