![]() |
OpenMS
|
Primary-key-aware, order-insensitive, tolerant comparison of Parquet tables. More...
#include <OpenMS/FORMAT/ParquetTableComparator.h>
Static Public Member Functions | |
| static ParquetDiffResult | compare (const std::string &file_1, const std::string &file_2, const ParquetDiffSettings &settings) |
| Compare two Parquet files. | |
| static ParquetDiffResult | validate (const std::string &file, const std::string &view, const ParquetDiffSettings &settings) |
| Check one Parquet file against a built-in QPX schema. | |
| static std::vector< std::string > | qpxPrimaryKey (const std::string &view) |
| The primary key of a QPX view. | |
| static std::string | viewFromFileType (const std::string &file_type) |
Map a QPX file_type metadata value to a view name. | |
Primary-key-aware, order-insensitive, tolerant comparison of Parquet tables.
Two Parquet files holding the same logical table may legitimately differ in row order and in the low-order bits of floating-point columns, so neither a byte comparison nor a text diff of a serialised form answers "are these the same result?". This class matches rows by a primary key, compares the matched rows cell-by-cell with a numeric tolerance, and reports schema drift separately from value drift.
It is the table-shaped counterpart of FuzzyDiff, and is exposed as ParquetDiff.
|
static |
Compare two Parquet files.
Rows are matched on ParquetDiffSettings::primary_key. List-valued key columns are canonicalised by sorting their elements before the key is formed, matching how QPX treats set-valued key columns such as grouped_runs.
| [in] | file_1 | first Parquet file |
| [in] | file_2 | second Parquet file |
| [in] | settings | tolerance, key and reporting options |
|
static |
The primary key of a QPX view.
| [in] | view | one of psm, feature, pg |
| Exception::IllegalArgument | if view is not a known view name |
|
static |
Check one Parquet file against a built-in QPX schema.
Reports columns the view requires but the file lacks, columns whose Arrow type differs from the schema, and columns the file carries that the view does not define. Duplicate primary keys are reported as well, since a QPX primary key must be unique.
| [in] | file | the Parquet file to check |
| [in] | view | one of psm, feature, pg |
| [in] | settings | reporting options (tolerances are unused) |
| Exception::IllegalArgument | if view is not a known view name |
|
static |
Map a QPX file_type metadata value to a view name.
| [in] | file_type | e.g. psm_file, feature_file, pg_file |
file_type is not recognised