Expand description
Specification for a view partition backed by a table in the postgresql metadata database.
Structs§
Functions§
- cast_
to_ file_ schema - Aligns a Postgres-inferred batch to the declared file schema’s column types, casting column
by column where they differ.
sql_arrow_bridge’s mapping is keyed on the Postgres type name alone, so it cannot know that aTEXTcolumn is declared as something narrower downstream:blocks.audienceisDictionary(Int32, Utf8)in the file schema (matching every other view’s audience column) but arrives as plainUtf8. - fetch_
metadata_ partition_ spec - mismatch_
excluded_ count unfiltered - kept, clamped at zero – the count of rows the audience-mismatch predicate excluded from this partition’s materialization. Pulled out as a pure function so the arithmetic behindMetadataPartitionSpec::write’swarn!/imetric!pair is unit-testable directly. The clamp guardskept > unfiltered, which the single atomic count query behind both values should never produce.