func CreatePartition(maxRows int, initialCapacity int, schema sif.Schema) sif.Partition {
	return createPartitionImpl(maxRows, initialCapacity, schema)
}
CreatePartition creates a new Partition containing an empty byte array and a schema
package partition
import (
	"bytes"
	"encoding/gob"
	"fmt"
	"io"
	"log"
	"github.com/go-sif/sif"
	pb "github.com/go-sif/sif/internal/rpc"
	iutil "github.com/go-sif/sif/internal/util"
	uuid "github.com/gofrs/uuid"
)
const defaultCapacity = 2
type partitionImpl struct {
	compressor          sif.Compressor
	schema              sif.Schema
	internalData        *partitionData
	colIsDirty          map[string]bool
	activeColData       map[string][]byte         
	activeVarLengthData map[string][]interface{}  
}
func createPartitionImpl(maxRows int, initialCapacity int, schema sif.Schema) *partitionImpl {
	id, err := uuid.NewV4()
	if err != nil {
		log.Fatalf("failed to generate UUID for Partition: %v", err)
	}
	if initialCapacity > maxRows {
		initialCapacity = maxRows
	}
	if initialCapacity < 0 {
		panic("initial capacity for partition cannot be negative")
	}
	colData := make(map[string]*columnData)
	colIsDirty := make(map[string]bool)
	activeColData := make(map[string][]byte)
	activeVarLengthData := make(map[string][]interface{})
	schema.ForEachColumn(func(name string, col sif.Column) error {
		isVarLength := sif.IsVariableLength(col.Type())
		colIsDirty[name] = true  
		colData[name] = &columnData{
			IsVariableLength: isVarLength,
			Meta:             make([]byte, initialCapacity),
			Data:             nil,  
		}
		if isVarLength {
			activeVarLengthData[name] = make([]interface{}, initialCapacity)
		} else {
			activeColData[name] = make([]byte, initialCapacity*col.Type().Size())
		}
		return nil
	})
	internalData := &partitionData{
		Id:       id.String(),
		MaxRows:  int32(maxRows),
		NumRows:  0,
		Capacity: int32(initialCapacity),
		Keys:     nil,
		ColData:  colData,
	}
	return &partitionImpl{
		internalData:        internalData,
		colIsDirty:          colIsDirty,
		activeColData:       activeColData,
		activeVarLengthData: activeVarLengthData,
		schema:              schema,
		compressor:          nil,
	}
}