Comparison#

class versus.Comparison#

Shared interface for backend-specific comparison objects.

versus.compare() returns concrete subclasses of this type. DuckDB comparisons expose DuckDB relations; Spark comparisons expose Spark DataFrames. The helper method names stay the same across backends.

Comparison.value_diffs

Return rows where one column differs between the inputs.

Comparison.value_diffs_stacked

Return a stacked view of value differences for multiple columns.

Comparison.weave_diffs_wide

Return a wide view of differing rows with split columns.

Comparison.weave_diffs_long

Return a long view of differing rows stacked by input.

Comparison.slice_diffs

Return rows from one input that differ in the selected columns.

Comparison.slice_unmatched

Return rows from one input whose keys are missing in the other.

Comparison.slice_unmatched_both

Return unmatched rows from both inputs.

Comparison.summary

Summarize which difference categories are present.

Comparison.close

Release backend-specific cached state for the comparison.