tables

package
v0.0.0-debug-20260702 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2026 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HybridScanByBlock

func HybridScanByBlock(
	ctx context.Context,
	tableEntry *catalog.TableEntry,
	txn txnif.TxnReader,
	bat **containers.Batch,
	readSchema *catalog.Schema,
	colIdxs []int,
	blkID *objectio.Blockid,
	mp *mpool.MPool,
) error

func LoadPersistedColumnData added in v0.7.0

func LoadPersistedColumnData(
	ctx context.Context,
	schema *catalog.Schema,
	rt *dbutils.Runtime,
	id *common.ID,
	colIdxs []int,
	location objectio.Location,
	mp *mpool.MPool,
	tsForAppendable *types.TS,
	needCopy bool,
) ([]containers.Vector, *nulls.Nulls, func(), error)

func MakeImmuIndex added in v0.8.0

func MakeImmuIndex(
	ctx context.Context,
	meta *catalog.ObjectEntry,
	bf objectio.BloomFilter,
	rt *dbutils.Runtime,
) (idx indexwrapper.ImmutIndex, err error)

func PreparePhyAddrData

func PreparePhyAddrData(
	id *objectio.Blockid, startRow, length uint32, pool *containers.VectorPool,
) (col containers.Vector, err error)

func RangeScanInMemoryByObject

func RangeScanInMemoryByObject(
	ctx context.Context,
	objEntry *catalog.ObjectEntry,
	batches map[uint32]*containers.BatchWithVersion,
	start, end types.TS,
	mp *mpool.MPool,
) (err error)

func ReadMergeSettingsBatch

func ReadMergeSettingsBatch(ctx context.Context, entry *catalog.TableEntry, readTxn txnif.AsyncTxn) *containers.Batch

func ReadSysTableBatch

func ReadSysTableBatch(ctx context.Context, entry *catalog.TableEntry, readTxn txnif.AsyncTxn) *containers.Batch

TODO: ensure bat does not exceed the 1G limit

func TombstoneRangeScanByObject

func TombstoneRangeScanByObject(
	ctx context.Context,
	tableEntry *catalog.TableEntry,
	objectID objectio.ObjectId,
	start, end types.TS,
	mp *mpool.MPool,
	vpool *containers.VectorPool,
) (bat *containers.Batch, err error)

TombstoneRangeScanByObject scans the an object's tombstones committed in the range [start, end] and returns a batch of data.

Since the returned batch must have accruate ts for each row, we need collect the data from appendable objects.

Targets: 1. CNCreated entries where start <= CreatedAt <= end 2. Appendable entries where x <= CreatedAt <= end, where x is the first appendable entry with CreatedAt < start

func WithScanNoCopy

func WithScanNoCopy(ctx context.Context) context.Context

WithScanNoCopy signals the scan chain to use zero-copy mode (needCopy=false). Vectors will wrap fileservice buffers directly; the caller must hold the returned DataRelease on the batch until the data is fully consumed.

Types

type BlockDataFactory added in v1.2.0

type BlockDataFactory = func(meta *catalog.ObjectEntry) data.Object

type BlockT added in v0.7.0

type BlockT[T common.IRef] interface {
	common.IRef
	Pin() *common.PinnedItem[T]
	GetID() *common.ID
}

type DataFactory

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

func NewDataFactory

func NewDataFactory(
	rt *dbutils.Runtime, dir string,
) *DataFactory

func (*DataFactory) MakeObjectFactory added in v1.2.0

func (factory *DataFactory) MakeObjectFactory() catalog.ObjectDataFactory

func (*DataFactory) MakeTableFactory

func (factory *DataFactory) MakeTableFactory() catalog.TableDataFactory

type Node added in v0.7.0

type Node struct {
	NodeT
}

func NewNode added in v0.7.0

func NewNode(node NodeT) *Node

func (*Node) MustMNode added in v0.7.0

func (n *Node) MustMNode() *memoryNode

func (*Node) MustPNode added in v0.7.0

func (n *Node) MustPNode() *persistedNode

type NodeT added in v0.7.0

type NodeT interface {
	common.IRef

	IsPersisted() bool

	Contains(
		ctx context.Context,
		keys containers.Vector,
		keysZM index.ZM,
		txn txnif.TxnReader,
		mp *mpool.MPool,
	) (err error)
	GetDuplicatedRows(
		ctx context.Context,
		txn txnif.TxnReader,
		getRowOffset func() (min, max int32, err error),
		keys containers.Vector,
		keysZM index.ZM,
		rowIDs containers.Vector,
		mp *mpool.MPool,
	) (err error)

	Rows() (uint32, error)

	Scan(
		ctx context.Context,
		bat **containers.Batch,
		txn txnif.TxnReader,
		readSchema *catalog.Schema,
		blkID uint16,
		colIdxes []int,
		mp *mpool.MPool,
	) (err error)
	CollectObjectTombstoneInRange(
		ctx context.Context,
		start, end types.TS,
		objID *types.Objectid,
		bat **containers.Batch,
		mp *mpool.MPool,
		vpool *containers.VectorPool,
	) (err error)
	FillBlockTombstones(
		ctx context.Context,
		txn txnif.TxnReader,
		blkID *objectio.Blockid,
		deletes **nulls.Nulls,
		deleteStartOffset uint64,
		mp *mpool.MPool) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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