func (r *RouteResult) GetCurrentTableIndex() (int, error) {
	if r.currentIndex >= len(r.indexes) {
		return -1, fmt.Errorf("table index out of range")
	}
	return r.indexes[r.currentIndex], nil
}
GetCurrentTableIndex get current table index
package plan
import (
	"fmt"
)
type RouteResult struct {
	db    string
	table string
	currentIndex int    
	indexes      []int  
}
func NewRouteResult(db, table string, initIndexes []int) *RouteResult {
	return &RouteResult{
		db:      db,
		table:   table,
		indexes: initIndexes,
	}
}
func (r *RouteResult) Check(db, table string) error {
	if r.db != db {
		return fmt.Errorf("db not equal, origin: %v, current: %v", r.db, db)
	}
	if r.table != table {
		return fmt.Errorf("table not equal, origin: %v, current: %v", r.table, table)
	}
	return nil
}
func (r *RouteResult) Inter(indexes []int) {
	r.indexes = interList(r.indexes, indexes)
}
func (r *RouteResult) Union(indexes []int) {
	r.indexes = unionList(r.indexes, indexes)
}
func (r *RouteResult) GetShardIndexes() []int {
	return r.indexes
}