Skip to main content

jsonb_uint64_to_log_value

Function jsonb_uint64_to_log_value 

Source
fn jsonb_uint64_to_log_value(u: u64, column_name: &str) -> Result<i64>
Expand description

Converts a JSON UInt64 number into the signed value used by built-in log columns. JsonbNumber::UInt64 only arises for values that do not fit in i64 (see decide_column_schema_and_convert_value), so the conversion is fallible: wrapping to a negative number would silently corrupt the value (a counter reading back as negative), so out-of-range values are rejected instead.