| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(parquet_schema), | intent(in), | optional | :: | schema |
the MAML's own schema, if there is one. |
|
| type(parquet_read_qc), | intent(in), | optional | :: | qc |
code-declared qc, already in FILE column names. |
|
| type(parquet_schema), | intent(out) | :: | composed |
the merged qc schema. |
||
| integer, | intent(out) | :: | ncolumns |
columns |
Merges a MAML-declared and a code-declared read-time QC into the single schema
parquet_open_reader(..., schema=) takes, applying the per-column override rule: for any
column whose MAML fields: entry carries a qc: key AT ALL -- even an empty one, which
already means "no Nulls here" -- the MAML's declaration wins in full and the code's entry
for that column is dropped entirely, rather than merged bound by bound. A column the MAML
says nothing about (or names without a qc: key) takes the code's entry instead.
composed carries ONLY qc-bearing field entries: a MAML entry with no qc: key is not
copied across, because nothing but qc is read from this schema (parquet_open_reader
passes it to parquet_apply_qc and nowhere else). That is also what keeps the two sources
from colliding over a column the MAML merely names.
ncolumns is how many columns composed ends up declaring qc for. Pass composed to
parquet_open_reader only when it is nonzero -- a schema with no rules still switches qc
on C++-side for no benefit.