Skip to main content

stamp_native_histogram_subfield_ids

Function stamp_native_histogram_subfield_ids 

Source
fn stamp_native_histogram_subfield_ids(field: &mut Field) -> Result<()>
Expand description

Stamps the greptime.histogram extension and reserved PARQUET:field_ids onto a native-histogram struct field (and its sub-fields / list element fields), so external readers can identify it by extension and resolve nested fields by id.

Detection is by the exact native-histogram struct type (is_native_histogram_value_type); other struct columns are left untouched. mito2 reads SST columns by schema position, never by field metadata, so this only affects external readers.

Returns an error if the parent column’s PARQUET:field_id is missing, malformed, or exceeds i32::MAX, or if a sub-field id cannot be derived — because the sub-field name is not a known native-histogram field, or the derived id overflows a positive i32 (an absurdly large parent column_id); see [native_histogram_subfield_id].