func (t *Table) Schema() sql.Schema {
	return t.schema
}
Schema implements the sql.Table interface.
package memory
import (
	"bytes"
	"encoding/gob"
	"fmt"
	"io"
	"strconv"
	"github.com/src-d/go-mysql-server/sql"
	"github.com/src-d/go-mysql-server/sql/expression"
	errors "gopkg.in/src-d/go-errors.v1"
)
type Table struct {
	name       string
	schema     sql.Schema
	partitions map[string][]sql.Row
	keys       [][]byte
	insert int
	filters    []sql.Expression
	projection []string
	columns    []int
	lookup     sql.IndexLookup
}
var _ sql.Table = (*Table)(nil)
var _ sql.Inserter = (*Table)(nil)
var _ sql.FilteredTable = (*Table)(nil)
var _ sql.ProjectedTable = (*Table)(nil)
var _ sql.IndexableTable = (*Table)(nil)
func NewTable(name string, schema sql.Schema) *Table {
	return NewPartitionedTable(name, schema, 0)
}
func NewPartitionedTable(name string, schema sql.Schema, numPartitions int) *Table {
	var keys [][]byte
	var partitions = map[string][]sql.Row{}
	if numPartitions < 1 {
		numPartitions = 1
	}
	for i := 0; i < numPartitions; i++ {
		key := strconv.Itoa(i)
		keys = append(keys, []byte(key))
		partitions[key] = []sql.Row{}
	}
	return &Table{
		name:       name,
		schema:     schema,
		partitions: partitions,
		keys:       keys,
	}
}
func (t *Table) Name() string {
	return t.name
}