schema

package
v0.0.0-...-c23ba73 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 12, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPrimaryColumnNotFound = errors.New("primary column not found")
	ErrPrimaryColumnType     = errors.New("primary column is not int64 or string")
	ErrPrimaryColumnEmpty    = errors.New("primary column is empty")
	ErrVersionColumnNotFound = errors.New("version column not found")
	ErrVersionColumnType     = errors.New("version column is not int64")
	ErrVectorColumnNotFound  = errors.New("vector column not found")
	ErrVectorColumnType      = errors.New("vector column is not fixed size binary or fixed size list")
	ErrVectorColumnEmpty     = errors.New("vector column is empty")
)

Functions

This section is empty.

Types

type Schema

type Schema struct {
	// contains filtered or unexported fields
}

Schema is a wrapper of arrow schema

func NewSchema

func NewSchema(schema *arrow.Schema, options *SchemaOptions) *Schema

func (*Schema) BuildDeleteSchema

func (s *Schema) BuildDeleteSchema() error

func (*Schema) BuildScalarSchema

func (s *Schema) BuildScalarSchema() error

func (*Schema) BuildVectorSchema

func (s *Schema) BuildVectorSchema() error

func (*Schema) DeleteSchema

func (s *Schema) DeleteSchema() *arrow.Schema

func (*Schema) FromProtobuf

func (s *Schema) FromProtobuf(schema *schema_proto.Schema) error

func (*Schema) Options

func (s *Schema) Options() *SchemaOptions

func (*Schema) ScalarSchema

func (s *Schema) ScalarSchema() *arrow.Schema

func (*Schema) Schema

func (s *Schema) Schema() *arrow.Schema

func (*Schema) ToProtobuf

func (s *Schema) ToProtobuf() (*schema_proto.Schema, error)

func (*Schema) Validate

func (s *Schema) Validate() error

func (*Schema) VectorSchema

func (s *Schema) VectorSchema() *arrow.Schema

type SchemaOptions

type SchemaOptions struct {
	PrimaryColumn string
	VersionColumn string
	VectorColumn  string
}

func DefaultSchemaOptions

func DefaultSchemaOptions() *SchemaOptions

func (*SchemaOptions) FromProtobuf

func (o *SchemaOptions) FromProtobuf(options *schema_proto.SchemaOptions)

func (*SchemaOptions) HasVersionColumn

func (o *SchemaOptions) HasVersionColumn() bool

func (*SchemaOptions) ToProtobuf

func (o *SchemaOptions) ToProtobuf() *schema_proto.SchemaOptions

func (*SchemaOptions) Validate

func (o *SchemaOptions) Validate(schema *arrow.Schema) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL