![]() |
OpenMS
|
Compares two Parquet tables by primary key, tolerating numeric differences.
The table counterpart of FuzzyDiff. Two Parquet files holding the same logical result 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 answers "is this the same result?". ParquetDiff matches rows by a primary key, compares matched rows cell by cell with a numeric tolerance, and reports schema drift separately from value drift.
Only one of 'ratio' or 'absdiff' has to be satisfied. Use "absdiff" to deal with cases like "zero vs. epsilon".
Rows are matched on 'pk'. For a QPX file (psm, feature or pg) the key is derived from the file's own file_type metadata when 'pk' is not given. List-valued key columns are canonicalised by sorting their elements, so a set-valued key such as grouped_runs matches regardless of the order the producer emitted.
With 'schema' the tool takes a single input and checks it against the built-in QPX schema for that view instead of comparing two files; this reports missing or extra columns, wrong Arrow types, wrong nullability, and duplicate primary keys.
'min_rows' requires every input to hold at least that many rows, and is checked in both modes. It closes a gap neither of them covers: two empty tables compare equal, and an empty table satisfies any schema, so a producer that wrote a correctly shaped nothing passes both. Combining schema with min_rows therefore asserts something about a single file without needing a reference at all - useful where a reference would only add churn. '0' is accepted and always passes; use it to record deliberately that a table is expected to be empty.
The command line parameters of this tool are:
INI file documentation of this tool: