index

package
v0.0.67 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const ZSTDCompressionLevel = 3 // 1, 3, 9

Variables

This section is empty.

Functions

func Accept

func Accept(min, max, start, end int64) bool

func AcceptWith

func AcceptWith(min, max, start, end int64, fn func()) bool

func WriteFull

func WriteFull(w io.Writer, full Full, id string) error

func ZSTDCompress

func ZSTDCompress(dst, src []byte, compressionLevel int) ([]byte, error)

ZSTDCompress compresses a block using ZSTD algorithm.

func ZSTDCompressBound

func ZSTDCompressBound(srcSize int) int

ZSTDCompressBound returns the worst case size needed for a destination buffer. Klauspost ZSTD library does not provide any API for Compression Bound. This calculation is based on the DataDog ZSTD library. See https://pkg.go.dev/github.com/DataDog/zstd#CompressBound

func ZSTDDecompress

func ZSTDDecompress(dst, src []byte) ([]byte, error)

ZSTDDecompress decompresses a block using ZSTD algorithm.

Types

type Column

type Column interface {
	NumRows() uint32
	Name() string
	Empty() bool
	Fst() []byte
	Bitmaps(f func(int, *roaring.Bitmap) error) error
}

type ColumnImpl

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

func NewColIdx

func NewColIdx() *ColumnImpl

func (*ColumnImpl) Build

func (c *ColumnImpl) Build(name string) (*FullColumn, error)

func (*ColumnImpl) Index

func (c *ColumnImpl) Index(e *array.Dictionary)

func (*ColumnImpl) Release

func (c *ColumnImpl) Release()

func (*ColumnImpl) Reset

func (c *ColumnImpl) Reset()

type FileIndex

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

func NewFileIndex

func NewFileIndex(r ReaderAtSeeker) (*FileIndex, error)

func (*FileIndex) CanIndex

func (f *FileIndex) CanIndex() bool

func (*FileIndex) Columns

func (f *FileIndex) Columns(_ func(column Column) error) error

func (*FileIndex) Get

func (f *FileIndex) Get(name string) (*FullColumn, error)

func (*FileIndex) Match

func (f *FileIndex) Match(b *roaring.Bitmap, m []*filters.CompiledFilter)

func (*FileIndex) Max

func (f *FileIndex) Max() uint64

func (*FileIndex) Min

func (f *FileIndex) Min() uint64

func (*FileIndex) NumRows

func (f *FileIndex) NumRows() int

func (*FileIndex) Size

func (f *FileIndex) Size() (n uint64)

type Full

type Full interface {
	Columns(f func(column Column) error) error
	Match(b *roaring.Bitmap, m []*filters.CompiledFilter)
	Size() uint64
	Min() uint64
	Max() uint64
	CanIndex() bool
}

type FullColumn

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

func (*FullColumn) Bitmaps

func (f *FullColumn) Bitmaps(fn func(int, *roaring.Bitmap) error) error

func (*FullColumn) Empty

func (f *FullColumn) Empty() bool

func (*FullColumn) Equal

func (f *FullColumn) Equal(c Column) bool

func (*FullColumn) Fst

func (f *FullColumn) Fst() []byte

func (*FullColumn) Load

func (f *FullColumn) Load() *vellum.FST

func (*FullColumn) Match

func (*FullColumn) Name

func (f *FullColumn) Name() string

func (*FullColumn) NumRows

func (f *FullColumn) NumRows() uint32

func (*FullColumn) Size

func (f *FullColumn) Size() (n uint64)

type Index

type Index interface {
	Index(arrow.Record) (Full, error)
}

type Part

type Part interface {
	Full
	ID() string
	Record() arrow.Record
	Release()
}

type ReaderAtSeeker

type ReaderAtSeeker interface {
	io.ReaderAt
	io.Seeker
}

Jump to

Keyboard shortcuts

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