Skip to main content

validate_lz4_output

Function validate_lz4_output 

Source
fn validate_lz4_output(data: &FlightData) -> PgWireResult<()>
Expand description

Rejects dishonest LZ4 output lengths before Arrow’s unbounded read_to_end. The same decoder Arrow uses is drained block-by-block without collecting output. Each block fits the workspace already admitted above; as soon as a block exceeds the remaining declared length, decoding stops. Thus even a tiny declared length cannot trigger an unreserved whole-output allocation. FIXME(#10470): Remove this extra LZ4 pass when Arrow bounds output itself.