Documentation ¶
Index ¶
- Variables
- func BinaryScalarOperation(left parquet.ColumnChunk, right parquet.Value, operator logicalplan.Operator) (bool, error)
- type AlwaysTrueFilter
- type AndExpr
- type BinaryScalarExpr
- type BucketPrefixDecorator
- func (b *BucketPrefixDecorator) Attributes(ctx context.Context, name string) (objstore.ObjectAttributes, error)
- func (b *BucketPrefixDecorator) Delete(ctx context.Context, name string) error
- func (b *BucketPrefixDecorator) Exists(ctx context.Context, name string) (bool, error)
- func (b *BucketPrefixDecorator) Get(ctx context.Context, name string) (io.ReadCloser, error)
- func (b *BucketPrefixDecorator) GetRange(ctx context.Context, name string, off, length int64) (io.ReadCloser, error)
- func (b *BucketPrefixDecorator) Iter(ctx context.Context, dir string, f func(string) error, ...) error
- func (b *BucketPrefixDecorator) Name() string
- func (b *BucketPrefixDecorator) Upload(ctx context.Context, name string, r io.Reader) error
- type ColumnRef
- type ColumnStore
- func (s *ColumnStore) Close() error
- func (s *ColumnStore) DB(name string) (*DB, error)
- func (s *ColumnStore) WithIndexDegree(indexDegree int) *ColumnStore
- func (s *ColumnStore) WithSplitSize(splitSize int) *ColumnStore
- func (s *ColumnStore) WithStorageBucket(bucket objstore.Bucket) *ColumnStore
- func (s *ColumnStore) WithStoragePath(storagePath string) *ColumnStore
- type DB
- type DBTableProvider
- type ErrCreateSchemaWriter
- type ErrReadRow
- type ErrWriteRow
- type Granule
- type GranuleMetadata
- type Node
- type Part
- type PartList
- type PreExprVisitorFunc
- type SentinelType
- type Table
- func (t *Table) ActiveBlock() *TableBlock
- func (t *Table) ArrowSchema(ctx context.Context, tx uint64, pool memory.Allocator, ...) (*arrow.Schema, error)
- func (t *Table) Insert(ctx context.Context, buf []byte) (uint64, error)
- func (t *Table) InsertBuffer(ctx context.Context, buf *dynparquet.Buffer) (uint64, error)
- func (t *Table) IterateBucketBlocks(logger log.Logger, filter TrueNegativeFilter, ...) error
- func (t *Table) Iterator(ctx context.Context, tx uint64, pool memory.Allocator, ...) error
- func (t *Table) RotateBlock() error
- func (t *Table) Schema() *dynparquet.Schema
- func (t *Table) SchemaIterator(ctx context.Context, tx uint64, pool memory.Allocator, ...) error
- func (t *Table) Sync()
- func (t *Table) View(fn func(tx uint64) error) error
- type TableBlock
- func (t *TableBlock) Index() *btree.BTree
- func (t *TableBlock) Insert(ctx context.Context, tx uint64, buf *dynparquet.SerializedBuffer) error
- func (t *TableBlock) Persist() error
- func (t *TableBlock) RowGroupIterator(ctx context.Context, tx uint64, filterExpr logicalplan.Expr, ...) error
- func (t *TableBlock) Serialize() ([]byte, error)
- func (t *TableBlock) Size() int64
- func (t *TableBlock) Sync()
- type TableConfig
- type TrueNegativeFilter
- type TxNode
- type TxPool
Constants ¶
This section is empty.
Variables ¶
var ErrNoSchema = fmt.Errorf("no schema")
var ErrUnexpectedNumberOfFields = errors.New("unexpected number of fields")
var ErrUnsupportedBinaryOperation = errors.New("unsupported binary operation")
Functions ¶
func BinaryScalarOperation ¶
func BinaryScalarOperation(left parquet.ColumnChunk, right parquet.Value, operator logicalplan.Operator) (bool, error)
Types ¶
type AlwaysTrueFilter ¶
type AlwaysTrueFilter struct{}
func (*AlwaysTrueFilter) Eval ¶
func (f *AlwaysTrueFilter) Eval(dynparquet.DynamicRowGroup) (bool, error)
type AndExpr ¶
type AndExpr struct { Left TrueNegativeFilter Right TrueNegativeFilter }
func (*AndExpr) Eval ¶
func (a *AndExpr) Eval(rg dynparquet.DynamicRowGroup) (bool, error)
type BinaryScalarExpr ¶
type BinaryScalarExpr struct { Left *ColumnRef Op logicalplan.Operator Right parquet.Value }
func (BinaryScalarExpr) Eval ¶
func (e BinaryScalarExpr) Eval(rg dynparquet.DynamicRowGroup) (bool, error)
type BucketPrefixDecorator ¶
func (*BucketPrefixDecorator) Attributes ¶
func (b *BucketPrefixDecorator) Attributes(ctx context.Context, name string) (objstore.ObjectAttributes, error)
func (*BucketPrefixDecorator) Delete ¶
func (b *BucketPrefixDecorator) Delete(ctx context.Context, name string) error
func (*BucketPrefixDecorator) Get ¶
func (b *BucketPrefixDecorator) Get(ctx context.Context, name string) (io.ReadCloser, error)
func (*BucketPrefixDecorator) GetRange ¶
func (b *BucketPrefixDecorator) GetRange(ctx context.Context, name string, off, length int64) (io.ReadCloser, error)
func (*BucketPrefixDecorator) Iter ¶
func (b *BucketPrefixDecorator) Iter(ctx context.Context, dir string, f func(string) error, options ...objstore.IterOption) error
func (*BucketPrefixDecorator) Name ¶
func (b *BucketPrefixDecorator) Name() string
type ColumnRef ¶
type ColumnRef struct {
ColumnName string
}
func (*ColumnRef) Column ¶
func (c *ColumnRef) Column(rg dynparquet.DynamicRowGroup) (parquet.ColumnChunk, bool, error)
type ColumnStore ¶
type ColumnStore struct {
// contains filtered or unexported fields
}
func New ¶
func New( reg prometheus.Registerer, granuleSize int, activeMemorySize int64, ) *ColumnStore
func (*ColumnStore) Close ¶
func (s *ColumnStore) Close() error
func (*ColumnStore) WithIndexDegree ¶
func (s *ColumnStore) WithIndexDegree(indexDegree int) *ColumnStore
func (*ColumnStore) WithSplitSize ¶
func (s *ColumnStore) WithSplitSize(splitSize int) *ColumnStore
func (*ColumnStore) WithStorageBucket ¶
func (s *ColumnStore) WithStorageBucket(bucket objstore.Bucket) *ColumnStore
func (*ColumnStore) WithStoragePath ¶
func (s *ColumnStore) WithStoragePath(storagePath string) *ColumnStore
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
func (*DB) TableProvider ¶
func (db *DB) TableProvider() *DBTableProvider
type DBTableProvider ¶
type DBTableProvider struct {
// contains filtered or unexported fields
}
func NewDBTableProvider ¶
func NewDBTableProvider(db *DB) *DBTableProvider
func (*DBTableProvider) GetTable ¶
func (p *DBTableProvider) GetTable(name string) logicalplan.TableReader
type ErrCreateSchemaWriter ¶
type ErrCreateSchemaWriter struct {
// contains filtered or unexported fields
}
func (ErrCreateSchemaWriter) Error ¶
func (e ErrCreateSchemaWriter) Error() string
type ErrReadRow ¶
type ErrReadRow struct {
// contains filtered or unexported fields
}
func (ErrReadRow) Error ¶
func (e ErrReadRow) Error() string
type ErrWriteRow ¶
type ErrWriteRow struct {
// contains filtered or unexported fields
}
func (ErrWriteRow) Error ¶
func (e ErrWriteRow) Error() string
type Granule ¶
type Granule struct {
// contains filtered or unexported fields
}
func NewGranule ¶
func NewGranule(granulesCreated prometheus.Counter, tableConfig *TableConfig, firstPart *Part) (*Granule, error)
func (*Granule) Least ¶
func (g *Granule) Least() *dynparquet.DynamicRow
Least returns the least row in a Granule.
func (*Granule) PartBuffersForTx ¶
func (g *Granule) PartBuffersForTx(watermark uint64, iterator func(*dynparquet.SerializedBuffer) bool)
PartBuffersForTx returns the PartBuffers for the given transaction constraints.
type GranuleMetadata ¶
type GranuleMetadata struct {
// contains filtered or unexported fields
}
GranuleMetadata is the metadata for a granule.
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
Node is a Part that is a part of a linked-list.
type Part ¶
type Part struct { Buf *dynparquet.SerializedBuffer // contains filtered or unexported fields }
func NewPart ¶
func NewPart(tx uint64, buf *dynparquet.SerializedBuffer) *Part
func (*Part) Least ¶
func (p *Part) Least() (*dynparquet.DynamicRow, error)
Least returns the least row in the part.
type PartList ¶
type PartList struct {
// contains filtered or unexported fields
}
func NewPartList ¶
func NewPartList(next unsafe.Pointer, total uint64, s SentinelType) *PartList
NewPartList creates a new PartList using atomic constructs.
func (*PartList) Sentinel ¶
func (l *PartList) Sentinel(s SentinelType) *PartList
Sentinel adds a new sentinel node to the list, and returns the sub list starting from that sentinel.
type PreExprVisitorFunc ¶
type PreExprVisitorFunc func(expr logicalplan.Expr) bool
func (PreExprVisitorFunc) PostVisit ¶
func (f PreExprVisitorFunc) PostVisit(expr logicalplan.Expr) bool
func (PreExprVisitorFunc) PreVisit ¶
func (f PreExprVisitorFunc) PreVisit(expr logicalplan.Expr) bool
type Table ¶
type Table struct {
// contains filtered or unexported fields
}
func (*Table) ActiveBlock ¶
func (t *Table) ActiveBlock() *TableBlock
func (*Table) ArrowSchema ¶
func (t *Table) ArrowSchema( ctx context.Context, tx uint64, pool memory.Allocator, projections []logicalplan.ColumnMatcher, filterExpr logicalplan.Expr, distinctColumns []logicalplan.ColumnMatcher, ) (*arrow.Schema, error)
func (*Table) InsertBuffer ¶
func (*Table) IterateBucketBlocks ¶
func (t *Table) IterateBucketBlocks(logger log.Logger, filter TrueNegativeFilter, iterator func(rg dynparquet.DynamicRowGroup) bool, lastBlockTimestamp uint64) error
func (*Table) Iterator ¶
func (t *Table) Iterator( ctx context.Context, tx uint64, pool memory.Allocator, projections []logicalplan.ColumnMatcher, filterExpr logicalplan.Expr, distinctColumns []logicalplan.ColumnMatcher, iterator func(r arrow.Record) error, ) error
Iterator iterates in order over all granules in the table. It stops iterating when the iterator function returns false.
func (*Table) RotateBlock ¶
func (*Table) Schema ¶
func (t *Table) Schema() *dynparquet.Schema
func (*Table) SchemaIterator ¶
func (t *Table) SchemaIterator( ctx context.Context, tx uint64, pool memory.Allocator, projections []logicalplan.ColumnMatcher, filterExpr logicalplan.Expr, distinctColumns []logicalplan.ColumnMatcher, iterator func(r arrow.Record) error, ) error
SchemaIterator iterates in order over all granules in the table and returns all the schemas seen across the table.
type TableBlock ¶
type TableBlock struct {
// contains filtered or unexported fields
}
func (*TableBlock) Index ¶
func (t *TableBlock) Index() *btree.BTree
Index provides atomic access to the table index.
func (*TableBlock) Insert ¶
func (t *TableBlock) Insert(ctx context.Context, tx uint64, buf *dynparquet.SerializedBuffer) error
func (*TableBlock) Persist ¶
func (t *TableBlock) Persist() error
Persist uploads the block to the underlying bucket.
func (*TableBlock) RowGroupIterator ¶
func (t *TableBlock) RowGroupIterator( ctx context.Context, tx uint64, filterExpr logicalplan.Expr, filter TrueNegativeFilter, iterator func(rg dynparquet.DynamicRowGroup) bool, ) error
RowGroupIterator iterates in order over all granules in the table. It stops iterating when the iterator function returns false.
func (*TableBlock) Serialize ¶
func (t *TableBlock) Serialize() ([]byte, error)
func (*TableBlock) Size ¶
func (t *TableBlock) Size() int64
Size returns the cumulative size of all buffers in the table. This is roughly the size of the table in bytes.
func (*TableBlock) Sync ¶
func (t *TableBlock) Sync()
Sync the table. This will return once all split operations have completed. Currently it does not prevent new inserts from happening, so this is only safe to rely on if you control all writers. In the future we may need to add a way to block new writes as well.
type TableConfig ¶
type TableConfig struct {
// contains filtered or unexported fields
}
func NewTableConfig ¶
func NewTableConfig( schema *dynparquet.Schema, ) *TableConfig
type TrueNegativeFilter ¶
type TrueNegativeFilter interface {
Eval(dynparquet.DynamicRowGroup) (bool, error)
}