Skip to main content

Module engine_data

Module engine_data 

Source
Expand description

Traits that engines need to implement in order to pass data between themselves and kernel.

Structs§

FilteredEngineData
Engine data paired with a selection vector indicating which rows are logically selected.
ListItem
A pre-resolved view into a single row’s list of strings. The string array type is resolved once at construction, so subsequent element accesses use virtual dispatch rather than repeated downcasting.
MapItem
A pre-resolved view into a single row’s map of string keys to string values. Like ListItem, the string array types are resolved once at construction.
RowIndexIterator
An iterator over the indices of selected rows in an engine-data batch.

Traits§

EngineData
Any type that an engine wants to return as “data” needs to implement this trait. The bulk of the work is in the EngineData::visit_rows method. See the docs for that method for more details.
FilteredRowVisitor
A visitor that processes FilteredEngineData with automatic row filtering.
GetData
When calling back into a RowVisitor, the engine needs to provide a slice of items that implement this trait. This allows type_safe extraction from the raw data by the kernel. By default all these methods will return an Error that an incorrect type has been asked for. Therefore, for each “data container” an Engine has, it is only necessary to implement the get_x method for the type it holds.
RowVisitor
A RowVisitor can be called back to visit extracted data. Aside from calling RowVisitor::visit on the visitor passed to EngineData::visit_rows, engines do not need to worry about this trait.
StringArrayAccessor
Uniform read access to a string array, abstracting over the various string representations that list and map columns may use (e.g. Utf8, LargeUtf8, Utf8View). Engines implement this for their string array types so that ListItem and MapItem can resolve the concrete type once at construction and access elements via virtual dispatch thereafter.
TypedGetData
This is a convenience wrapper over GetData to allow code like: let name: Option<String> = getters[1].get_opt(row_index, "metadata.name")?;