Skip to main content

Module prom_row_builder

Module prom_row_builder 

Source
Expand description

Prometheus row-level helpers for converting proto Rows into Arrow RecordBatches and aligning / normalizing their schemas against existing table schemas in the catalog.

Functionsยง

build_arrow_array ๐Ÿ”’
Build a single Arrow array for the given column index from proto Rows.
build_prom_create_table_schema_from_proto
Build a Vec<ColumnSchema> suitable for creating a new Prometheus logical table directly from the proto rows.schema, avoiding the round-trip through Arrow schema.
identify_missing_columns_from_proto ๐Ÿ”’
Identify tag columns in the proto rows_schema that are absent from the target region schema, without building an intermediate RecordBatch.
rows_to_aligned_record_batch ๐Ÿ”’
Directly converts proto Rows into a RecordBatch aligned to the given target_schema, handling Prometheus column renaming (timestamp/value), reordering, type casting, and null-filling in a single pass.
unzip_logical_region_schema ๐Ÿ”’
Extract timestamp, field, and tag column names from a logical region schema.