Stateful value and primary-key validator for QPX Arrow tables.
Arrow schema validation checks declarations such as field type and nullability. It does not reject an empty string in an identity-bearing key, physical nulls under a non-nullable field, duplicate primary keys, or invalid nested values. This class supplies those write-time checks for the OpenMS QPX psm, feature, and pg views. QPX-permitted unmapped features retain OpenMS' empty peptidoform representation and are still distinguished by their remaining key fields.
A validator retains primary keys between validate() calls. Streaming writers can therefore validate consecutive batches with one instance and detect duplicates that cross a batch boundary. Use reset() before starting a different output file.
- Experimental classes:
- This API is experimental and may change in future versions.
| Result validate |
( |
const std::shared_ptr< arrow::Table > & |
table | ) |
|
Validate one whole table or the next streaming batch.
Checks the exact OpenMS QPX schema, physical nulls in required columns, non-empty identity-bearing primary-key values, primary-key uniqueness, canonical quantitative labels, and view-specific nested invariants. For pg data this includes non-empty, duplicate-free grouped_runs and run-disjointness within one (anchor_protein, label).
State is advanced only when the complete table is valid, so a rejected batch can be fixed and submitted again without first calling reset().
- Parameters
-
| [in] | table | Table or streaming batch to validate |
- Returns
- Structured validation result;
valid is false if writing must be refused