Documentation
¶
Index ¶
- Constants
- type Cache
- type Const
- type Object
- func (o *Object) Close() error
- func (o *Object) Len() int
- func (o *Object) Load(typeKey uint32, path field.Path) (vector.Any, error)
- func (o *Object) LocalContext() *zed.Context
- func (o *Object) LookupType(typeKey uint32) zed.Type
- func (o *Object) TypeKeys() []int32
- func (o *Object) Types() []zed.Type
Constants ¶
const MaxTypesPerObject = 2500
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Object ¶
type Object struct {
// contains filtered or unexported fields
}
Object represents the collection of vectors that are loaded into memory for a given data object as referenced by its ID. An Object structure mirrors the metadata structures used in VNG but here we support dynamic loading of vectors as they are needed and data and metadata are all cached in memory.
func NewObject ¶
func NewObject(ctx context.Context, engine storage.Engine, uri *storage.URI, id ksuid.KSUID) (*Object, error)
NewObject creates a new in-memory Object corresponding to a VNG object residing in storage. It loads the list of VNG root types (one per value in the file) and the VNG metadata for vector reassembly. A table for each type is also created to map the global slot number in the object to the local slot number in the type so that an element's local position in the vector (within a particular type) can be related to its slot number in the object, e.g., so that filtering of a local vector can be turned into the list of matching object slots. The object provides the metadata needed to load vectors on demand only as they are referenced. A vector is loaded by calling its Load method, which decodes its zcode.Bytes into its native representation. XXX we may want to change the VNG format to code vectors in native format.
func (*Object) Load ¶ added in v1.12.0
XXX fix comment Due to the heterogenous nature of Zed data, a given path can appear in multiple types and a given type can have multiple vectors XXX (due to union types in the hiearchy). Load returns a Group for each type and the Group may contain multiple vectors.