values_to_rows

Function values_to_rows 

Source
pub(crate) fn values_to_rows(
    schema_info: &mut SchemaInfo,
    values: Value,
    pipeline_ctx: &PipelineContext<'_>,
    row: Option<Vec<Value>>,
    need_calc_ts: bool,
    tablesuffix_template: Option<&TableSuffixTemplate>,
) -> Result<HashMap<ContextOpt, Vec<(Row, Option<String>)>>>
Expand description

Converts VRL values to Greptime rows grouped by their ContextOpt.

§Returns

A HashMap where keys are ContextOpt and values are vectors of (row, table_suffix) pairs. Single object input produces one ContextOpt group with one row. Array input groups rows by their per-element ContextOpt values.

§Errors

  • ArrayElementMustBeObject if an array element is not an object