Expand description
Traits that engines need to implement in order to pass data between themselves and kernel.
Structs§
- Filtered
Engine Data - Engine data paired with a selection vector indicating which rows are logically selected.
- List
Item - 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. - RowIndex
Iterator - An iterator over the indices of selected rows in an engine-data batch.
Traits§
- Engine
Data - 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_rowsmethod. See the docs for that method for more details. - Filtered
RowVisitor - A visitor that processes
FilteredEngineDatawith 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 anErrorthat an incorrect type has been asked for. Therefore, for each “data container” an Engine has, it is only necessary to implement theget_xmethod for the type it holds. - RowVisitor
- A
RowVisitorcan be called back to visit extracted data. Aside from callingRowVisitor::visiton the visitor passed toEngineData::visit_rows, engines do not need to worry about this trait. - String
Array Accessor - 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
ListItemandMapItemcan resolve the concrete type once at construction and access elements via virtual dispatch thereafter. - Typed
GetData - This is a convenience wrapper over
GetDatato allow code like:let name: Option<String> = getters[1].get_opt(row_index, "metadata.name")?;