Skip to main content

ATTR_UNGUARDED_COLS

Constant ATTR_UNGUARDED_COLS 

Source
const ATTR_UNGUARDED_COLS: usize = 7;
Expand description

How many of crate::schema::ATTRS’ columns a reader may take without first asking whether they are there — and so the floor trim_attr_tail will not trim below.

Seven: AttrPred::new in query.rs reads str, int, double and bool — columns 3 to 6 — on every attribute batch it is handed, before any type byte is consulted. RecordBatch::column panics past the end, and as_primitive_opt guards a wrong type rather than a missing column, so trimming a column out from under it is a panic in a scan thread and not a null. Only bytes and ser sit above the line: the sole sites that reach them are emit_attr’s BYTES and SLICE | MAP arms, and a row arrives there only when its own stored type byte says so — which cannot happen in a table where those columns held nothing.