From 0618ad2040ab1d4ee2300a0b279ea6273cc2330f Mon Sep 17 00:00:00 2001 From: Marius Merkle Date: Fri, 27 Mar 2026 23:43:25 +0100 Subject: [PATCH 1/6] perf: Element-wise comparison only for tolerance-requiring data types --- diffly/_conditions.py | 73 +++++++++++++++---- ...alse_sample_rows_False_sample_pk_False.txt | 25 ------- ...False_sample_rows_True_sample_pk_False.txt | 25 ------- ...True_sample_rows_False_sample_pk_False.txt | 13 ---- ..._True_sample_rows_True_sample_pk_False.txt | 13 ---- ...alse_sample_rows_False_sample_pk_False.txt | 26 ------- ...ample_rows_True_sample_pk_False_hidden.txt | 25 ------- ..._False_sample_rows_True_sample_pk_True.txt | 26 ------- ...True_sample_rows_False_sample_pk_False.txt | 14 ---- ...m_True_sample_rows_True_sample_pk_True.txt | 14 ---- ...alse_sample_rows_False_sample_pk_False.txt | 27 ------- ...False_sample_rows_True_sample_pk_False.txt | 27 ------- ...True_sample_rows_False_sample_pk_False.txt | 15 ---- ..._True_sample_rows_True_sample_pk_False.txt | 15 ---- ...alse_sample_rows_False_sample_pk_False.txt | 30 -------- ..._False_sample_rows_True_sample_pk_True.txt | 30 -------- ...True_sample_rows_False_sample_pk_False.txt | 18 ----- ...m_True_sample_rows_True_sample_pk_True.txt | 18 ----- ...alse_sample_rows_False_sample_pk_False.txt | 25 ------- ...False_sample_rows_True_sample_pk_False.txt | 25 ------- ...True_sample_rows_False_sample_pk_False.txt | 13 ---- ..._True_sample_rows_True_sample_pk_False.txt | 13 ---- ...alse_sample_rows_False_sample_pk_False.txt | 26 ------- tests/test_performance.py | 6 +- 24 files changed, 62 insertions(+), 480 deletions(-) delete mode 100644 tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_False_slim_False_sample_rows_False_sample_pk_False.txt delete mode 100644 tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_False_slim_False_sample_rows_True_sample_pk_False.txt delete mode 100644 tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_False_slim_True_sample_rows_False_sample_pk_False.txt delete mode 100644 tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_False_slim_True_sample_rows_True_sample_pk_False.txt delete mode 100644 tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_True_slim_False_sample_rows_False_sample_pk_False.txt delete mode 100644 tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_True_slim_False_sample_rows_True_sample_pk_False_hidden.txt delete mode 100644 tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_True_slim_False_sample_rows_True_sample_pk_True.txt delete mode 100644 tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_True_slim_True_sample_rows_False_sample_pk_False.txt delete mode 100644 tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_True_slim_True_sample_rows_True_sample_pk_True.txt delete mode 100644 tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_False_slim_False_sample_rows_False_sample_pk_False.txt delete mode 100644 tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_False_slim_False_sample_rows_True_sample_pk_False.txt delete mode 100644 tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_False_slim_True_sample_rows_False_sample_pk_False.txt delete mode 100644 tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_False_slim_True_sample_rows_True_sample_pk_False.txt delete mode 100644 tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_True_slim_False_sample_rows_False_sample_pk_False.txt delete mode 100644 tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_True_slim_False_sample_rows_True_sample_pk_True.txt delete mode 100644 tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_True_slim_True_sample_rows_False_sample_pk_False.txt delete mode 100644 tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_True_slim_True_sample_rows_True_sample_pk_True.txt delete mode 100644 tests/summary/fixtures/unequal_rows/gen/pretty_True_perfect_False_top_False_slim_False_sample_rows_False_sample_pk_False.txt delete mode 100644 tests/summary/fixtures/unequal_rows/gen/pretty_True_perfect_False_top_False_slim_False_sample_rows_True_sample_pk_False.txt delete mode 100644 tests/summary/fixtures/unequal_rows/gen/pretty_True_perfect_False_top_False_slim_True_sample_rows_False_sample_pk_False.txt delete mode 100644 tests/summary/fixtures/unequal_rows/gen/pretty_True_perfect_False_top_False_slim_True_sample_rows_True_sample_pk_False.txt delete mode 100644 tests/summary/fixtures/unequal_rows/gen/pretty_True_perfect_False_top_True_slim_False_sample_rows_False_sample_pk_False.txt diff --git a/diffly/_conditions.py b/diffly/_conditions.py index d6970a6..d28c4bb 100644 --- a/diffly/_conditions.py +++ b/diffly/_conditions.py @@ -140,16 +140,18 @@ def _compare_columns( elif isinstance(dtype_left, pl.List | pl.Array) and isinstance( dtype_right, pl.List | pl.Array ): - return _compare_sequence_columns( - col_left=col_left, - col_right=col_right, - dtype_left=dtype_left, - dtype_right=dtype_right, - max_list_length=max_list_length, - abs_tol=abs_tol, - rel_tol=rel_tol, - abs_tol_temporal=abs_tol_temporal, - ) + if _needs_element_wise_comparison(dtype_left.inner, dtype_right.inner): + return _compare_sequence_columns( + col_left=col_left, + col_right=col_right, + dtype_left=dtype_left, + dtype_right=dtype_right, + max_list_length=max_list_length, + abs_tol=abs_tol, + rel_tol=rel_tol, + abs_tol_temporal=abs_tol_temporal, + ) + return col_left.eq_missing(col_right) if ( isinstance(dtype_left, pl.Enum) @@ -237,6 +239,51 @@ def _get_element(col: pl.Expr, dtype: DataType | DataTypeClass, i: int) -> pl.Ex return _eq_missing(has_same_length & elements_match, col_left, col_right) +def _is_float_numeric_pair( + dtype_left: DataType | DataTypeClass, + dtype_right: DataType | DataTypeClass, +) -> bool: + return (dtype_left.is_float() or dtype_right.is_float()) and ( + dtype_left.is_numeric() and dtype_right.is_numeric() + ) + + +def _is_temporal_pair( + dtype_left: DataType | DataTypeClass, + dtype_right: DataType | DataTypeClass, +) -> bool: + return dtype_left.is_temporal() and dtype_right.is_temporal() + + +def _needs_element_wise_comparison( + dtype_left: DataType | DataTypeClass, + dtype_right: DataType | DataTypeClass, +) -> bool: + """Check if two dtypes require element-wise comparison (tolerances or special + handling). + + Returns False when eq_missing() on the whole column would produce identical results, + allowing us to skip the expensive element-wise iteration for list/array columns. + """ + if _is_float_numeric_pair(dtype_left, dtype_right): + return True + if _is_temporal_pair(dtype_left, dtype_right): + return True + if isinstance(dtype_left, pl.Struct) and isinstance(dtype_right, pl.Struct): + fields_left = {f.name: f.dtype for f in dtype_left.fields} + fields_right = {f.name: f.dtype for f in dtype_right.fields} + return any( + _needs_element_wise_comparison(fields_left[name], fields_right[name]) + for name in fields_left + if name in fields_right + ) + if isinstance(dtype_left, pl.List | pl.Array) and isinstance( + dtype_right, pl.List | pl.Array + ): + return _needs_element_wise_comparison(dtype_left.inner, dtype_right.inner) + return False + + def _compare_primitive_columns( col_left: pl.Expr, col_right: pl.Expr, @@ -246,13 +293,11 @@ def _compare_primitive_columns( rel_tol: float, abs_tol_temporal: dt.timedelta, ) -> pl.Expr: - if (dtype_left.is_float() or dtype_right.is_float()) and ( - dtype_left.is_numeric() and dtype_right.is_numeric() - ): + if _is_float_numeric_pair(dtype_left, dtype_right): return col_left.is_close(col_right, abs_tol=abs_tol, rel_tol=rel_tol).pipe( _eq_missing_with_nan, lhs=col_left, rhs=col_right ) - elif dtype_left.is_temporal() and dtype_right.is_temporal(): + elif _is_temporal_pair(dtype_left, dtype_right): diff_less_than_tolerance = (col_left - col_right).abs() <= abs_tol_temporal return diff_less_than_tolerance.pipe(_eq_missing, lhs=col_left, rhs=col_right) diff --git a/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_False_slim_False_sample_rows_False_sample_pk_False.txt b/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_False_slim_False_sample_rows_False_sample_pk_False.txt deleted file mode 100644 index 00fe709..0000000 --- a/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_False_slim_False_sample_rows_False_sample_pk_False.txt +++ /dev/null @@ -1,25 +0,0 @@ -┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ -┃ Diffly Summary ┃ -┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ - Primary key: name - - Schemas - ▔▔▔▔▔▔▔ - Schemas match exactly (column count: 4). - - Rows - ▔▔▔▔ - Left count Right count - 6 (no change) 6 - - ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ - ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 3 equal (50.00%) │ - ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 6 joined - ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 3 unequal (50.00%) │ - ┗━┷━┷━┷━┷━┛╌╌╌┗━┷━┷━┷━┷━┛╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ - - Columns - ▔▔▔▔▔▔▔ - ┌─────────────────┬────────┐ - │ life_expectancy │ 50.00% │ - └─────────────────┴────────┘ diff --git a/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_False_slim_False_sample_rows_True_sample_pk_False.txt b/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_False_slim_False_sample_rows_True_sample_pk_False.txt deleted file mode 100644 index 00fe709..0000000 --- a/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_False_slim_False_sample_rows_True_sample_pk_False.txt +++ /dev/null @@ -1,25 +0,0 @@ -┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ -┃ Diffly Summary ┃ -┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ - Primary key: name - - Schemas - ▔▔▔▔▔▔▔ - Schemas match exactly (column count: 4). - - Rows - ▔▔▔▔ - Left count Right count - 6 (no change) 6 - - ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ - ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 3 equal (50.00%) │ - ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 6 joined - ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 3 unequal (50.00%) │ - ┗━┷━┷━┷━┷━┛╌╌╌┗━┷━┷━┷━┷━┛╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ - - Columns - ▔▔▔▔▔▔▔ - ┌─────────────────┬────────┐ - │ life_expectancy │ 50.00% │ - └─────────────────┴────────┘ diff --git a/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_False_slim_True_sample_rows_False_sample_pk_False.txt b/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_False_slim_True_sample_rows_False_sample_pk_False.txt deleted file mode 100644 index 6b9c0bb..0000000 --- a/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_False_slim_True_sample_rows_False_sample_pk_False.txt +++ /dev/null @@ -1,13 +0,0 @@ - Rows - ▔▔▔▔ - ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ - ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 3 equal (50.00%) │ - ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 6 joined - ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 3 unequal (50.00%) │ - ┗━┷━┷━┷━┷━┛╌╌╌┗━┷━┷━┷━┷━┛╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ - - Columns - ▔▔▔▔▔▔▔ - ┌─────────────────┬────────┐ - │ life_expectancy │ 50.00% │ - └─────────────────┴────────┘ diff --git a/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_False_slim_True_sample_rows_True_sample_pk_False.txt b/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_False_slim_True_sample_rows_True_sample_pk_False.txt deleted file mode 100644 index 6b9c0bb..0000000 --- a/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_False_slim_True_sample_rows_True_sample_pk_False.txt +++ /dev/null @@ -1,13 +0,0 @@ - Rows - ▔▔▔▔ - ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ - ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 3 equal (50.00%) │ - ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 6 joined - ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 3 unequal (50.00%) │ - ┗━┷━┷━┷━┷━┛╌╌╌┗━┷━┷━┷━┷━┛╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ - - Columns - ▔▔▔▔▔▔▔ - ┌─────────────────┬────────┐ - │ life_expectancy │ 50.00% │ - └─────────────────┴────────┘ diff --git a/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_True_slim_False_sample_rows_False_sample_pk_False.txt b/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_True_slim_False_sample_rows_False_sample_pk_False.txt deleted file mode 100644 index 15016e0..0000000 --- a/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_True_slim_False_sample_rows_False_sample_pk_False.txt +++ /dev/null @@ -1,26 +0,0 @@ -┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ -┃ Diffly Summary ┃ -┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ - Primary key: name - - Schemas - ▔▔▔▔▔▔▔ - Schemas match exactly (column count: 4). - - Rows - ▔▔▔▔ - Left count Right count - 6 (no change) 6 - - ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ - ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 3 equal (50.00%) │ - ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 6 joined - ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 3 unequal (50.00%) │ - ┗━┷━┷━┷━┷━┛╌╌╌┗━┷━┷━┷━┷━┛╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ - - Columns - ▔▔▔▔▔▔▔ - ┌─────────────────┬────────┬───────────────┐ - │ life_expectancy │ 50.00% │ 11 -> 12 (2x) │ - │ │ │ 12 -> 35 (1x) │ - └─────────────────┴────────┴───────────────┘ diff --git a/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_True_slim_False_sample_rows_True_sample_pk_False_hidden.txt b/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_True_slim_False_sample_rows_True_sample_pk_False_hidden.txt deleted file mode 100644 index 00fe709..0000000 --- a/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_True_slim_False_sample_rows_True_sample_pk_False_hidden.txt +++ /dev/null @@ -1,25 +0,0 @@ -┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ -┃ Diffly Summary ┃ -┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ - Primary key: name - - Schemas - ▔▔▔▔▔▔▔ - Schemas match exactly (column count: 4). - - Rows - ▔▔▔▔ - Left count Right count - 6 (no change) 6 - - ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ - ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 3 equal (50.00%) │ - ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 6 joined - ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 3 unequal (50.00%) │ - ┗━┷━┷━┷━┷━┛╌╌╌┗━┷━┷━┷━┷━┛╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ - - Columns - ▔▔▔▔▔▔▔ - ┌─────────────────┬────────┐ - │ life_expectancy │ 50.00% │ - └─────────────────┴────────┘ diff --git a/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_True_slim_False_sample_rows_True_sample_pk_True.txt b/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_True_slim_False_sample_rows_True_sample_pk_True.txt deleted file mode 100644 index 6b5096e..0000000 --- a/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_True_slim_False_sample_rows_True_sample_pk_True.txt +++ /dev/null @@ -1,26 +0,0 @@ -┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ -┃ Diffly Summary ┃ -┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ - Primary key: name - - Schemas - ▔▔▔▔▔▔▔ - Schemas match exactly (column count: 4). - - Rows - ▔▔▔▔ - Left count Right count - 6 (no change) 6 - - ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ - ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 3 equal (50.00%) │ - ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 6 joined - ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 3 unequal (50.00%) │ - ┗━┷━┷━┷━┷━┛╌╌╌┗━┷━┷━┷━┷━┛╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ - - Columns - ▔▔▔▔▔▔▔ - ┌─────────────────┬────────┬───────────────────────────────┐ - │ life_expectancy │ 50.00% │ 11 -> 12 (2x, e.g. "sloth") │ - │ │ │ 12 -> 35 (1x, e.g. "dolphin") │ - └─────────────────┴────────┴───────────────────────────────┘ diff --git a/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_True_slim_True_sample_rows_False_sample_pk_False.txt b/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_True_slim_True_sample_rows_False_sample_pk_False.txt deleted file mode 100644 index a6f7adc..0000000 --- a/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_True_slim_True_sample_rows_False_sample_pk_False.txt +++ /dev/null @@ -1,14 +0,0 @@ - Rows - ▔▔▔▔ - ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ - ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 3 equal (50.00%) │ - ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 6 joined - ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 3 unequal (50.00%) │ - ┗━┷━┷━┷━┷━┛╌╌╌┗━┷━┷━┷━┷━┛╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ - - Columns - ▔▔▔▔▔▔▔ - ┌─────────────────┬────────┬───────────────┐ - │ life_expectancy │ 50.00% │ 11 -> 12 (2x) │ - │ │ │ 12 -> 35 (1x) │ - └─────────────────┴────────┴───────────────┘ diff --git a/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_True_slim_True_sample_rows_True_sample_pk_True.txt b/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_True_slim_True_sample_rows_True_sample_pk_True.txt deleted file mode 100644 index a2b8ac9..0000000 --- a/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_True_slim_True_sample_rows_True_sample_pk_True.txt +++ /dev/null @@ -1,14 +0,0 @@ - Rows - ▔▔▔▔ - ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ - ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 3 equal (50.00%) │ - ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 6 joined - ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 3 unequal (50.00%) │ - ┗━┷━┷━┷━┷━┛╌╌╌┗━┷━┷━┷━┷━┛╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ - - Columns - ▔▔▔▔▔▔▔ - ┌─────────────────┬────────┬───────────────────────────────┐ - │ life_expectancy │ 50.00% │ 11 -> 12 (2x, e.g. "sloth") │ - │ │ │ 12 -> 35 (1x, e.g. "dolphin") │ - └─────────────────┴────────┴───────────────────────────────┘ diff --git a/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_False_slim_False_sample_rows_False_sample_pk_False.txt b/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_False_slim_False_sample_rows_False_sample_pk_False.txt deleted file mode 100644 index f0c7e22..0000000 --- a/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_False_slim_False_sample_rows_False_sample_pk_False.txt +++ /dev/null @@ -1,27 +0,0 @@ -┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ -┃ Diffly Summary ┃ -┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ - Primary key: name - - Schemas - ▔▔▔▔▔▔▔ - Schemas match exactly (column count: 4). - - Rows - ▔▔▔▔ - Left count Right count - 6 (no change) 6 - - ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ - ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 3 equal (50.00%) │ - ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 6 joined - ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 3 unequal (50.00%) │ - ┗━┷━┷━┷━┷━┛╌╌╌┗━┷━┷━┷━┷━┛╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ - - Columns - ▔▔▔▔▔▔▔ - ┌─────────────────┬─────────┐ - │ life_expectancy │ 50.00% │ - │ speed_kph │ 100.00% │ - │ weight_kg │ 100.00% │ - └─────────────────┴─────────┘ diff --git a/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_False_slim_False_sample_rows_True_sample_pk_False.txt b/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_False_slim_False_sample_rows_True_sample_pk_False.txt deleted file mode 100644 index f0c7e22..0000000 --- a/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_False_slim_False_sample_rows_True_sample_pk_False.txt +++ /dev/null @@ -1,27 +0,0 @@ -┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ -┃ Diffly Summary ┃ -┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ - Primary key: name - - Schemas - ▔▔▔▔▔▔▔ - Schemas match exactly (column count: 4). - - Rows - ▔▔▔▔ - Left count Right count - 6 (no change) 6 - - ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ - ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 3 equal (50.00%) │ - ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 6 joined - ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 3 unequal (50.00%) │ - ┗━┷━┷━┷━┷━┛╌╌╌┗━┷━┷━┷━┷━┛╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ - - Columns - ▔▔▔▔▔▔▔ - ┌─────────────────┬─────────┐ - │ life_expectancy │ 50.00% │ - │ speed_kph │ 100.00% │ - │ weight_kg │ 100.00% │ - └─────────────────┴─────────┘ diff --git a/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_False_slim_True_sample_rows_False_sample_pk_False.txt b/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_False_slim_True_sample_rows_False_sample_pk_False.txt deleted file mode 100644 index c290604..0000000 --- a/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_False_slim_True_sample_rows_False_sample_pk_False.txt +++ /dev/null @@ -1,15 +0,0 @@ - Rows - ▔▔▔▔ - ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ - ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 3 equal (50.00%) │ - ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 6 joined - ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 3 unequal (50.00%) │ - ┗━┷━┷━┷━┷━┛╌╌╌┗━┷━┷━┷━┷━┛╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ - - Columns - ▔▔▔▔▔▔▔ - ┌─────────────────┬─────────┐ - │ life_expectancy │ 50.00% │ - │ speed_kph │ 100.00% │ - │ weight_kg │ 100.00% │ - └─────────────────┴─────────┘ diff --git a/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_False_slim_True_sample_rows_True_sample_pk_False.txt b/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_False_slim_True_sample_rows_True_sample_pk_False.txt deleted file mode 100644 index c290604..0000000 --- a/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_False_slim_True_sample_rows_True_sample_pk_False.txt +++ /dev/null @@ -1,15 +0,0 @@ - Rows - ▔▔▔▔ - ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ - ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 3 equal (50.00%) │ - ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 6 joined - ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 3 unequal (50.00%) │ - ┗━┷━┷━┷━┷━┛╌╌╌┗━┷━┷━┷━┷━┛╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ - - Columns - ▔▔▔▔▔▔▔ - ┌─────────────────┬─────────┐ - │ life_expectancy │ 50.00% │ - │ speed_kph │ 100.00% │ - │ weight_kg │ 100.00% │ - └─────────────────┴─────────┘ diff --git a/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_True_slim_False_sample_rows_False_sample_pk_False.txt b/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_True_slim_False_sample_rows_False_sample_pk_False.txt deleted file mode 100644 index ee87394..0000000 --- a/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_True_slim_False_sample_rows_False_sample_pk_False.txt +++ /dev/null @@ -1,30 +0,0 @@ -┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ -┃ Diffly Summary ┃ -┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ - Primary key: name - - Schemas - ▔▔▔▔▔▔▔ - Schemas match exactly (column count: 4). - - Rows - ▔▔▔▔ - Left count Right count - 6 (no change) 6 - - ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ - ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 3 equal (50.00%) │ - ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 6 joined - ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 3 unequal (50.00%) │ - ┗━┷━┷━┷━┷━┛╌╌╌┗━┷━┷━┷━┷━┛╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ - - Columns - ▔▔▔▔▔▔▔ - ┌─────────────────┬─────────┬───────────────┐ - │ life_expectancy │ 50.00% │ 11 -> 12 (2x) │ - │ │ │ 12 -> 35 (1x) │ - ├─────────────────┼─────────┼───────────────┤ - │ speed_kph │ 100.00% │ │ - ├─────────────────┼─────────┼───────────────┤ - │ weight_kg │ 100.00% │ │ - └─────────────────┴─────────┴───────────────┘ diff --git a/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_True_slim_False_sample_rows_True_sample_pk_True.txt b/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_True_slim_False_sample_rows_True_sample_pk_True.txt deleted file mode 100644 index fb56677..0000000 --- a/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_True_slim_False_sample_rows_True_sample_pk_True.txt +++ /dev/null @@ -1,30 +0,0 @@ -┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ -┃ Diffly Summary ┃ -┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ - Primary key: name - - Schemas - ▔▔▔▔▔▔▔ - Schemas match exactly (column count: 4). - - Rows - ▔▔▔▔ - Left count Right count - 6 (no change) 6 - - ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ - ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 3 equal (50.00%) │ - ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 6 joined - ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 3 unequal (50.00%) │ - ┗━┷━┷━┷━┷━┛╌╌╌┗━┷━┷━┷━┷━┛╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ - - Columns - ▔▔▔▔▔▔▔ - ┌─────────────────┬─────────┬───────────────────────────────┐ - │ life_expectancy │ 50.00% │ 11 -> 12 (2x, e.g. "sloth") │ - │ │ │ 12 -> 35 (1x, e.g. "dolphin") │ - ├─────────────────┼─────────┼───────────────────────────────┤ - │ speed_kph │ 100.00% │ │ - ├─────────────────┼─────────┼───────────────────────────────┤ - │ weight_kg │ 100.00% │ │ - └─────────────────┴─────────┴───────────────────────────────┘ diff --git a/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_True_slim_True_sample_rows_False_sample_pk_False.txt b/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_True_slim_True_sample_rows_False_sample_pk_False.txt deleted file mode 100644 index c9a5996..0000000 --- a/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_True_slim_True_sample_rows_False_sample_pk_False.txt +++ /dev/null @@ -1,18 +0,0 @@ - Rows - ▔▔▔▔ - ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ - ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 3 equal (50.00%) │ - ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 6 joined - ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 3 unequal (50.00%) │ - ┗━┷━┷━┷━┷━┛╌╌╌┗━┷━┷━┷━┷━┛╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ - - Columns - ▔▔▔▔▔▔▔ - ┌─────────────────┬─────────┬───────────────┐ - │ life_expectancy │ 50.00% │ 11 -> 12 (2x) │ - │ │ │ 12 -> 35 (1x) │ - ├─────────────────┼─────────┼───────────────┤ - │ speed_kph │ 100.00% │ │ - ├─────────────────┼─────────┼───────────────┤ - │ weight_kg │ 100.00% │ │ - └─────────────────┴─────────┴───────────────┘ diff --git a/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_True_slim_True_sample_rows_True_sample_pk_True.txt b/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_True_slim_True_sample_rows_True_sample_pk_True.txt deleted file mode 100644 index 24a320d..0000000 --- a/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_True_slim_True_sample_rows_True_sample_pk_True.txt +++ /dev/null @@ -1,18 +0,0 @@ - Rows - ▔▔▔▔ - ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ - ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 3 equal (50.00%) │ - ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 6 joined - ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 3 unequal (50.00%) │ - ┗━┷━┷━┷━┷━┛╌╌╌┗━┷━┷━┷━┷━┛╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ - - Columns - ▔▔▔▔▔▔▔ - ┌─────────────────┬─────────┬───────────────────────────────┐ - │ life_expectancy │ 50.00% │ 11 -> 12 (2x, e.g. "sloth") │ - │ │ │ 12 -> 35 (1x, e.g. "dolphin") │ - ├─────────────────┼─────────┼───────────────────────────────┤ - │ speed_kph │ 100.00% │ │ - ├─────────────────┼─────────┼───────────────────────────────┤ - │ weight_kg │ 100.00% │ │ - └─────────────────┴─────────┴───────────────────────────────┘ diff --git a/tests/summary/fixtures/unequal_rows/gen/pretty_True_perfect_False_top_False_slim_False_sample_rows_False_sample_pk_False.txt b/tests/summary/fixtures/unequal_rows/gen/pretty_True_perfect_False_top_False_slim_False_sample_rows_False_sample_pk_False.txt deleted file mode 100644 index 722a990..0000000 --- a/tests/summary/fixtures/unequal_rows/gen/pretty_True_perfect_False_top_False_slim_False_sample_rows_False_sample_pk_False.txt +++ /dev/null @@ -1,25 +0,0 @@ -┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ -┃  Diffly Summary  ┃ -┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ - Primary key: name - - Schemas - ▔▔▔▔▔▔▔ - Schemas match exactly (column count: 4). - - Rows - ▔▔▔▔ - Left count Right count - 6 (no change) 6 - - ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ - ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 3 equal (50.00%) │ - ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 6 joined - ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 3 unequal (50.00%) │ - ┗━┷━┷━┷━┷━┛╌╌╌┗━┷━┷━┷━┷━┛╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ - - Columns - ▔▔▔▔▔▔▔ - ┌─────────────────┬────────┐ - │ life_expectancy │ 50.00% │ - └─────────────────┴────────┘ diff --git a/tests/summary/fixtures/unequal_rows/gen/pretty_True_perfect_False_top_False_slim_False_sample_rows_True_sample_pk_False.txt b/tests/summary/fixtures/unequal_rows/gen/pretty_True_perfect_False_top_False_slim_False_sample_rows_True_sample_pk_False.txt deleted file mode 100644 index 722a990..0000000 --- a/tests/summary/fixtures/unequal_rows/gen/pretty_True_perfect_False_top_False_slim_False_sample_rows_True_sample_pk_False.txt +++ /dev/null @@ -1,25 +0,0 @@ -┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ -┃  Diffly Summary  ┃ -┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ - Primary key: name - - Schemas - ▔▔▔▔▔▔▔ - Schemas match exactly (column count: 4). - - Rows - ▔▔▔▔ - Left count Right count - 6 (no change) 6 - - ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ - ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 3 equal (50.00%) │ - ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 6 joined - ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 3 unequal (50.00%) │ - ┗━┷━┷━┷━┷━┛╌╌╌┗━┷━┷━┷━┷━┛╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ - - Columns - ▔▔▔▔▔▔▔ - ┌─────────────────┬────────┐ - │ life_expectancy │ 50.00% │ - └─────────────────┴────────┘ diff --git a/tests/summary/fixtures/unequal_rows/gen/pretty_True_perfect_False_top_False_slim_True_sample_rows_False_sample_pk_False.txt b/tests/summary/fixtures/unequal_rows/gen/pretty_True_perfect_False_top_False_slim_True_sample_rows_False_sample_pk_False.txt deleted file mode 100644 index 67d5c36..0000000 --- a/tests/summary/fixtures/unequal_rows/gen/pretty_True_perfect_False_top_False_slim_True_sample_rows_False_sample_pk_False.txt +++ /dev/null @@ -1,13 +0,0 @@ - Rows - ▔▔▔▔ - ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ - ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 3 equal (50.00%) │ - ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 6 joined - ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 3 unequal (50.00%) │ - ┗━┷━┷━┷━┷━┛╌╌╌┗━┷━┷━┷━┷━┛╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ - - Columns - ▔▔▔▔▔▔▔ - ┌─────────────────┬────────┐ - │ life_expectancy │ 50.00% │ - └─────────────────┴────────┘ diff --git a/tests/summary/fixtures/unequal_rows/gen/pretty_True_perfect_False_top_False_slim_True_sample_rows_True_sample_pk_False.txt b/tests/summary/fixtures/unequal_rows/gen/pretty_True_perfect_False_top_False_slim_True_sample_rows_True_sample_pk_False.txt deleted file mode 100644 index 67d5c36..0000000 --- a/tests/summary/fixtures/unequal_rows/gen/pretty_True_perfect_False_top_False_slim_True_sample_rows_True_sample_pk_False.txt +++ /dev/null @@ -1,13 +0,0 @@ - Rows - ▔▔▔▔ - ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ - ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 3 equal (50.00%) │ - ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 6 joined - ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 3 unequal (50.00%) │ - ┗━┷━┷━┷━┷━┛╌╌╌┗━┷━┷━┷━┷━┛╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ - - Columns - ▔▔▔▔▔▔▔ - ┌─────────────────┬────────┐ - │ life_expectancy │ 50.00% │ - └─────────────────┴────────┘ diff --git a/tests/summary/fixtures/unequal_rows/gen/pretty_True_perfect_False_top_True_slim_False_sample_rows_False_sample_pk_False.txt b/tests/summary/fixtures/unequal_rows/gen/pretty_True_perfect_False_top_True_slim_False_sample_rows_False_sample_pk_False.txt deleted file mode 100644 index 8fea645..0000000 --- a/tests/summary/fixtures/unequal_rows/gen/pretty_True_perfect_False_top_True_slim_False_sample_rows_False_sample_pk_False.txt +++ /dev/null @@ -1,26 +0,0 @@ -┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ -┃  Diffly Summary  ┃ -┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ - Primary key: name - - Schemas - ▔▔▔▔▔▔▔ - Schemas match exactly (column count: 4). - - Rows - ▔▔▔▔ - Left count Right count - 6 (no change) 6 - - ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ - ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 3 equal (50.00%) │ - ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 6 joined - ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 3 unequal (50.00%) │ - ┗━┷━┷━┷━┷━┛╌╌╌┗━┷━┷━┷━┷━┛╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ - - Columns - ▔▔▔▔▔▔▔ - ┌─────────────────┬────────┬───────────────┐ - │ life_expectancy │ 50.00% │ 11 -> 12 (2x) │ - │ │ │ 12 -> 35 (1x) │ - └─────────────────┴────────┴───────────────┘ diff --git a/tests/test_performance.py b/tests/test_performance.py index 1b553bc..621aa3c 100644 --- a/tests/test_performance.py +++ b/tests/test_performance.py @@ -126,8 +126,8 @@ def test_eq_missing_not_slower_than_element_wise_for_list_columns() -> None: mean_time_cond = statistics.mean(times_cond[num_runs_warmup:]) ratio = mean_time_cond / mean_time_eq - assert ratio > 2.0, ( - f"Element-wise comparison was only {ratio:.1f}x slower than eq_missing " + assert ratio < 1.25, ( + f"condition_equal_columns was {ratio:.1f}x slower than eq_missing " f"({mean_time_cond:.3f}s vs {mean_time_eq:.3f}s). " - f"Expected at least 2x slowdown to justify the optimization." + f"Expected comparable performance since list should use eq_missing directly." ) From 3e0d66de2445ed449003ce917d7951ae50e828c9 Mon Sep 17 00:00:00 2001 From: Marius Merkle Date: Fri, 27 Mar 2026 23:43:49 +0100 Subject: [PATCH 2/6] perf: Element-wise comparison only for tolerance-requiring data types --- ...alse_sample_rows_False_sample_pk_False.txt | 25 ++++++++++++++++ ...False_sample_rows_True_sample_pk_False.txt | 25 ++++++++++++++++ ...True_sample_rows_False_sample_pk_False.txt | 13 ++++++++ ..._True_sample_rows_True_sample_pk_False.txt | 13 ++++++++ ...alse_sample_rows_False_sample_pk_False.txt | 26 ++++++++++++++++ ...ample_rows_True_sample_pk_False_hidden.txt | 25 ++++++++++++++++ ..._False_sample_rows_True_sample_pk_True.txt | 26 ++++++++++++++++ ...True_sample_rows_False_sample_pk_False.txt | 14 +++++++++ ...m_True_sample_rows_True_sample_pk_True.txt | 14 +++++++++ ...alse_sample_rows_False_sample_pk_False.txt | 27 +++++++++++++++++ ...False_sample_rows_True_sample_pk_False.txt | 27 +++++++++++++++++ ...True_sample_rows_False_sample_pk_False.txt | 15 ++++++++++ ..._True_sample_rows_True_sample_pk_False.txt | 15 ++++++++++ ...alse_sample_rows_False_sample_pk_False.txt | 30 +++++++++++++++++++ ..._False_sample_rows_True_sample_pk_True.txt | 30 +++++++++++++++++++ ...True_sample_rows_False_sample_pk_False.txt | 18 +++++++++++ ...m_True_sample_rows_True_sample_pk_True.txt | 18 +++++++++++ ...alse_sample_rows_False_sample_pk_False.txt | 25 ++++++++++++++++ ...False_sample_rows_True_sample_pk_False.txt | 25 ++++++++++++++++ ...True_sample_rows_False_sample_pk_False.txt | 13 ++++++++ ..._True_sample_rows_True_sample_pk_False.txt | 13 ++++++++ ...alse_sample_rows_False_sample_pk_False.txt | 26 ++++++++++++++++ 22 files changed, 463 insertions(+) create mode 100644 tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_False_slim_False_sample_rows_False_sample_pk_False.txt create mode 100644 tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_False_slim_False_sample_rows_True_sample_pk_False.txt create mode 100644 tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_False_slim_True_sample_rows_False_sample_pk_False.txt create mode 100644 tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_False_slim_True_sample_rows_True_sample_pk_False.txt create mode 100644 tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_True_slim_False_sample_rows_False_sample_pk_False.txt create mode 100644 tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_True_slim_False_sample_rows_True_sample_pk_False_hidden.txt create mode 100644 tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_True_slim_False_sample_rows_True_sample_pk_True.txt create mode 100644 tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_True_slim_True_sample_rows_False_sample_pk_False.txt create mode 100644 tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_True_slim_True_sample_rows_True_sample_pk_True.txt create mode 100644 tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_False_slim_False_sample_rows_False_sample_pk_False.txt create mode 100644 tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_False_slim_False_sample_rows_True_sample_pk_False.txt create mode 100644 tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_False_slim_True_sample_rows_False_sample_pk_False.txt create mode 100644 tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_False_slim_True_sample_rows_True_sample_pk_False.txt create mode 100644 tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_True_slim_False_sample_rows_False_sample_pk_False.txt create mode 100644 tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_True_slim_False_sample_rows_True_sample_pk_True.txt create mode 100644 tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_True_slim_True_sample_rows_False_sample_pk_False.txt create mode 100644 tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_True_slim_True_sample_rows_True_sample_pk_True.txt create mode 100644 tests/summary/fixtures/unequal_rows/gen/pretty_True_perfect_False_top_False_slim_False_sample_rows_False_sample_pk_False.txt create mode 100644 tests/summary/fixtures/unequal_rows/gen/pretty_True_perfect_False_top_False_slim_False_sample_rows_True_sample_pk_False.txt create mode 100644 tests/summary/fixtures/unequal_rows/gen/pretty_True_perfect_False_top_False_slim_True_sample_rows_False_sample_pk_False.txt create mode 100644 tests/summary/fixtures/unequal_rows/gen/pretty_True_perfect_False_top_False_slim_True_sample_rows_True_sample_pk_False.txt create mode 100644 tests/summary/fixtures/unequal_rows/gen/pretty_True_perfect_False_top_True_slim_False_sample_rows_False_sample_pk_False.txt diff --git a/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_False_slim_False_sample_rows_False_sample_pk_False.txt b/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_False_slim_False_sample_rows_False_sample_pk_False.txt new file mode 100644 index 0000000..00fe709 --- /dev/null +++ b/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_False_slim_False_sample_rows_False_sample_pk_False.txt @@ -0,0 +1,25 @@ +┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ +┃ Diffly Summary ┃ +┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ + Primary key: name + + Schemas + ▔▔▔▔▔▔▔ + Schemas match exactly (column count: 4). + + Rows + ▔▔▔▔ + Left count Right count + 6 (no change) 6 + + ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ + ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 3 equal (50.00%) │ + ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 6 joined + ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 3 unequal (50.00%) │ + ┗━┷━┷━┷━┷━┛╌╌╌┗━┷━┷━┷━┷━┛╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ + + Columns + ▔▔▔▔▔▔▔ + ┌─────────────────┬────────┐ + │ life_expectancy │ 50.00% │ + └─────────────────┴────────┘ diff --git a/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_False_slim_False_sample_rows_True_sample_pk_False.txt b/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_False_slim_False_sample_rows_True_sample_pk_False.txt new file mode 100644 index 0000000..00fe709 --- /dev/null +++ b/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_False_slim_False_sample_rows_True_sample_pk_False.txt @@ -0,0 +1,25 @@ +┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ +┃ Diffly Summary ┃ +┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ + Primary key: name + + Schemas + ▔▔▔▔▔▔▔ + Schemas match exactly (column count: 4). + + Rows + ▔▔▔▔ + Left count Right count + 6 (no change) 6 + + ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ + ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 3 equal (50.00%) │ + ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 6 joined + ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 3 unequal (50.00%) │ + ┗━┷━┷━┷━┷━┛╌╌╌┗━┷━┷━┷━┷━┛╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ + + Columns + ▔▔▔▔▔▔▔ + ┌─────────────────┬────────┐ + │ life_expectancy │ 50.00% │ + └─────────────────┴────────┘ diff --git a/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_False_slim_True_sample_rows_False_sample_pk_False.txt b/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_False_slim_True_sample_rows_False_sample_pk_False.txt new file mode 100644 index 0000000..6b9c0bb --- /dev/null +++ b/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_False_slim_True_sample_rows_False_sample_pk_False.txt @@ -0,0 +1,13 @@ + Rows + ▔▔▔▔ + ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ + ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 3 equal (50.00%) │ + ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 6 joined + ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 3 unequal (50.00%) │ + ┗━┷━┷━┷━┷━┛╌╌╌┗━┷━┷━┷━┷━┛╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ + + Columns + ▔▔▔▔▔▔▔ + ┌─────────────────┬────────┐ + │ life_expectancy │ 50.00% │ + └─────────────────┴────────┘ diff --git a/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_False_slim_True_sample_rows_True_sample_pk_False.txt b/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_False_slim_True_sample_rows_True_sample_pk_False.txt new file mode 100644 index 0000000..6b9c0bb --- /dev/null +++ b/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_False_slim_True_sample_rows_True_sample_pk_False.txt @@ -0,0 +1,13 @@ + Rows + ▔▔▔▔ + ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ + ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 3 equal (50.00%) │ + ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 6 joined + ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 3 unequal (50.00%) │ + ┗━┷━┷━┷━┷━┛╌╌╌┗━┷━┷━┷━┷━┛╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ + + Columns + ▔▔▔▔▔▔▔ + ┌─────────────────┬────────┐ + │ life_expectancy │ 50.00% │ + └─────────────────┴────────┘ diff --git a/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_True_slim_False_sample_rows_False_sample_pk_False.txt b/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_True_slim_False_sample_rows_False_sample_pk_False.txt new file mode 100644 index 0000000..15016e0 --- /dev/null +++ b/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_True_slim_False_sample_rows_False_sample_pk_False.txt @@ -0,0 +1,26 @@ +┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ +┃ Diffly Summary ┃ +┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ + Primary key: name + + Schemas + ▔▔▔▔▔▔▔ + Schemas match exactly (column count: 4). + + Rows + ▔▔▔▔ + Left count Right count + 6 (no change) 6 + + ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ + ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 3 equal (50.00%) │ + ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 6 joined + ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 3 unequal (50.00%) │ + ┗━┷━┷━┷━┷━┛╌╌╌┗━┷━┷━┷━┷━┛╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ + + Columns + ▔▔▔▔▔▔▔ + ┌─────────────────┬────────┬───────────────┐ + │ life_expectancy │ 50.00% │ 11 -> 12 (2x) │ + │ │ │ 12 -> 35 (1x) │ + └─────────────────┴────────┴───────────────┘ diff --git a/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_True_slim_False_sample_rows_True_sample_pk_False_hidden.txt b/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_True_slim_False_sample_rows_True_sample_pk_False_hidden.txt new file mode 100644 index 0000000..00fe709 --- /dev/null +++ b/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_True_slim_False_sample_rows_True_sample_pk_False_hidden.txt @@ -0,0 +1,25 @@ +┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ +┃ Diffly Summary ┃ +┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ + Primary key: name + + Schemas + ▔▔▔▔▔▔▔ + Schemas match exactly (column count: 4). + + Rows + ▔▔▔▔ + Left count Right count + 6 (no change) 6 + + ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ + ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 3 equal (50.00%) │ + ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 6 joined + ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 3 unequal (50.00%) │ + ┗━┷━┷━┷━┷━┛╌╌╌┗━┷━┷━┷━┷━┛╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ + + Columns + ▔▔▔▔▔▔▔ + ┌─────────────────┬────────┐ + │ life_expectancy │ 50.00% │ + └─────────────────┴────────┘ diff --git a/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_True_slim_False_sample_rows_True_sample_pk_True.txt b/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_True_slim_False_sample_rows_True_sample_pk_True.txt new file mode 100644 index 0000000..6b5096e --- /dev/null +++ b/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_True_slim_False_sample_rows_True_sample_pk_True.txt @@ -0,0 +1,26 @@ +┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ +┃ Diffly Summary ┃ +┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ + Primary key: name + + Schemas + ▔▔▔▔▔▔▔ + Schemas match exactly (column count: 4). + + Rows + ▔▔▔▔ + Left count Right count + 6 (no change) 6 + + ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ + ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 3 equal (50.00%) │ + ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 6 joined + ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 3 unequal (50.00%) │ + ┗━┷━┷━┷━┷━┛╌╌╌┗━┷━┷━┷━┷━┛╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ + + Columns + ▔▔▔▔▔▔▔ + ┌─────────────────┬────────┬───────────────────────────────┐ + │ life_expectancy │ 50.00% │ 11 -> 12 (2x, e.g. "sloth") │ + │ │ │ 12 -> 35 (1x, e.g. "dolphin") │ + └─────────────────┴────────┴───────────────────────────────┘ diff --git a/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_True_slim_True_sample_rows_False_sample_pk_False.txt b/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_True_slim_True_sample_rows_False_sample_pk_False.txt new file mode 100644 index 0000000..a6f7adc --- /dev/null +++ b/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_True_slim_True_sample_rows_False_sample_pk_False.txt @@ -0,0 +1,14 @@ + Rows + ▔▔▔▔ + ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ + ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 3 equal (50.00%) │ + ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 6 joined + ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 3 unequal (50.00%) │ + ┗━┷━┷━┷━┷━┛╌╌╌┗━┷━┷━┷━┷━┛╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ + + Columns + ▔▔▔▔▔▔▔ + ┌─────────────────┬────────┬───────────────┐ + │ life_expectancy │ 50.00% │ 11 -> 12 (2x) │ + │ │ │ 12 -> 35 (1x) │ + └─────────────────┴────────┴───────────────┘ diff --git a/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_True_slim_True_sample_rows_True_sample_pk_True.txt b/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_True_slim_True_sample_rows_True_sample_pk_True.txt new file mode 100644 index 0000000..a2b8ac9 --- /dev/null +++ b/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_False_top_True_slim_True_sample_rows_True_sample_pk_True.txt @@ -0,0 +1,14 @@ + Rows + ▔▔▔▔ + ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ + ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 3 equal (50.00%) │ + ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 6 joined + ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 3 unequal (50.00%) │ + ┗━┷━┷━┷━┷━┛╌╌╌┗━┷━┷━┷━┷━┛╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ + + Columns + ▔▔▔▔▔▔▔ + ┌─────────────────┬────────┬───────────────────────────────┐ + │ life_expectancy │ 50.00% │ 11 -> 12 (2x, e.g. "sloth") │ + │ │ │ 12 -> 35 (1x, e.g. "dolphin") │ + └─────────────────┴────────┴───────────────────────────────┘ diff --git a/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_False_slim_False_sample_rows_False_sample_pk_False.txt b/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_False_slim_False_sample_rows_False_sample_pk_False.txt new file mode 100644 index 0000000..f0c7e22 --- /dev/null +++ b/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_False_slim_False_sample_rows_False_sample_pk_False.txt @@ -0,0 +1,27 @@ +┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ +┃ Diffly Summary ┃ +┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ + Primary key: name + + Schemas + ▔▔▔▔▔▔▔ + Schemas match exactly (column count: 4). + + Rows + ▔▔▔▔ + Left count Right count + 6 (no change) 6 + + ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ + ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 3 equal (50.00%) │ + ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 6 joined + ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 3 unequal (50.00%) │ + ┗━┷━┷━┷━┷━┛╌╌╌┗━┷━┷━┷━┷━┛╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ + + Columns + ▔▔▔▔▔▔▔ + ┌─────────────────┬─────────┐ + │ life_expectancy │ 50.00% │ + │ speed_kph │ 100.00% │ + │ weight_kg │ 100.00% │ + └─────────────────┴─────────┘ diff --git a/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_False_slim_False_sample_rows_True_sample_pk_False.txt b/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_False_slim_False_sample_rows_True_sample_pk_False.txt new file mode 100644 index 0000000..f0c7e22 --- /dev/null +++ b/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_False_slim_False_sample_rows_True_sample_pk_False.txt @@ -0,0 +1,27 @@ +┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ +┃ Diffly Summary ┃ +┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ + Primary key: name + + Schemas + ▔▔▔▔▔▔▔ + Schemas match exactly (column count: 4). + + Rows + ▔▔▔▔ + Left count Right count + 6 (no change) 6 + + ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ + ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 3 equal (50.00%) │ + ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 6 joined + ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 3 unequal (50.00%) │ + ┗━┷━┷━┷━┷━┛╌╌╌┗━┷━┷━┷━┷━┛╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ + + Columns + ▔▔▔▔▔▔▔ + ┌─────────────────┬─────────┐ + │ life_expectancy │ 50.00% │ + │ speed_kph │ 100.00% │ + │ weight_kg │ 100.00% │ + └─────────────────┴─────────┘ diff --git a/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_False_slim_True_sample_rows_False_sample_pk_False.txt b/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_False_slim_True_sample_rows_False_sample_pk_False.txt new file mode 100644 index 0000000..c290604 --- /dev/null +++ b/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_False_slim_True_sample_rows_False_sample_pk_False.txt @@ -0,0 +1,15 @@ + Rows + ▔▔▔▔ + ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ + ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 3 equal (50.00%) │ + ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 6 joined + ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 3 unequal (50.00%) │ + ┗━┷━┷━┷━┷━┛╌╌╌┗━┷━┷━┷━┷━┛╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ + + Columns + ▔▔▔▔▔▔▔ + ┌─────────────────┬─────────┐ + │ life_expectancy │ 50.00% │ + │ speed_kph │ 100.00% │ + │ weight_kg │ 100.00% │ + └─────────────────┴─────────┘ diff --git a/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_False_slim_True_sample_rows_True_sample_pk_False.txt b/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_False_slim_True_sample_rows_True_sample_pk_False.txt new file mode 100644 index 0000000..c290604 --- /dev/null +++ b/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_False_slim_True_sample_rows_True_sample_pk_False.txt @@ -0,0 +1,15 @@ + Rows + ▔▔▔▔ + ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ + ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 3 equal (50.00%) │ + ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 6 joined + ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 3 unequal (50.00%) │ + ┗━┷━┷━┷━┷━┛╌╌╌┗━┷━┷━┷━┷━┛╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ + + Columns + ▔▔▔▔▔▔▔ + ┌─────────────────┬─────────┐ + │ life_expectancy │ 50.00% │ + │ speed_kph │ 100.00% │ + │ weight_kg │ 100.00% │ + └─────────────────┴─────────┘ diff --git a/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_True_slim_False_sample_rows_False_sample_pk_False.txt b/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_True_slim_False_sample_rows_False_sample_pk_False.txt new file mode 100644 index 0000000..ee87394 --- /dev/null +++ b/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_True_slim_False_sample_rows_False_sample_pk_False.txt @@ -0,0 +1,30 @@ +┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ +┃ Diffly Summary ┃ +┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ + Primary key: name + + Schemas + ▔▔▔▔▔▔▔ + Schemas match exactly (column count: 4). + + Rows + ▔▔▔▔ + Left count Right count + 6 (no change) 6 + + ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ + ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 3 equal (50.00%) │ + ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 6 joined + ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 3 unequal (50.00%) │ + ┗━┷━┷━┷━┷━┛╌╌╌┗━┷━┷━┷━┷━┛╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ + + Columns + ▔▔▔▔▔▔▔ + ┌─────────────────┬─────────┬───────────────┐ + │ life_expectancy │ 50.00% │ 11 -> 12 (2x) │ + │ │ │ 12 -> 35 (1x) │ + ├─────────────────┼─────────┼───────────────┤ + │ speed_kph │ 100.00% │ │ + ├─────────────────┼─────────┼───────────────┤ + │ weight_kg │ 100.00% │ │ + └─────────────────┴─────────┴───────────────┘ diff --git a/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_True_slim_False_sample_rows_True_sample_pk_True.txt b/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_True_slim_False_sample_rows_True_sample_pk_True.txt new file mode 100644 index 0000000..fb56677 --- /dev/null +++ b/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_True_slim_False_sample_rows_True_sample_pk_True.txt @@ -0,0 +1,30 @@ +┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ +┃ Diffly Summary ┃ +┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ + Primary key: name + + Schemas + ▔▔▔▔▔▔▔ + Schemas match exactly (column count: 4). + + Rows + ▔▔▔▔ + Left count Right count + 6 (no change) 6 + + ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ + ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 3 equal (50.00%) │ + ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 6 joined + ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 3 unequal (50.00%) │ + ┗━┷━┷━┷━┷━┛╌╌╌┗━┷━┷━┷━┷━┛╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ + + Columns + ▔▔▔▔▔▔▔ + ┌─────────────────┬─────────┬───────────────────────────────┐ + │ life_expectancy │ 50.00% │ 11 -> 12 (2x, e.g. "sloth") │ + │ │ │ 12 -> 35 (1x, e.g. "dolphin") │ + ├─────────────────┼─────────┼───────────────────────────────┤ + │ speed_kph │ 100.00% │ │ + ├─────────────────┼─────────┼───────────────────────────────┤ + │ weight_kg │ 100.00% │ │ + └─────────────────┴─────────┴───────────────────────────────┘ diff --git a/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_True_slim_True_sample_rows_False_sample_pk_False.txt b/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_True_slim_True_sample_rows_False_sample_pk_False.txt new file mode 100644 index 0000000..c9a5996 --- /dev/null +++ b/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_True_slim_True_sample_rows_False_sample_pk_False.txt @@ -0,0 +1,18 @@ + Rows + ▔▔▔▔ + ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ + ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 3 equal (50.00%) │ + ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 6 joined + ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 3 unequal (50.00%) │ + ┗━┷━┷━┷━┷━┛╌╌╌┗━┷━┷━┷━┷━┛╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ + + Columns + ▔▔▔▔▔▔▔ + ┌─────────────────┬─────────┬───────────────┐ + │ life_expectancy │ 50.00% │ 11 -> 12 (2x) │ + │ │ │ 12 -> 35 (1x) │ + ├─────────────────┼─────────┼───────────────┤ + │ speed_kph │ 100.00% │ │ + ├─────────────────┼─────────┼───────────────┤ + │ weight_kg │ 100.00% │ │ + └─────────────────┴─────────┴───────────────┘ diff --git a/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_True_slim_True_sample_rows_True_sample_pk_True.txt b/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_True_slim_True_sample_rows_True_sample_pk_True.txt new file mode 100644 index 0000000..24a320d --- /dev/null +++ b/tests/summary/fixtures/unequal_rows/gen/pretty_False_perfect_True_top_True_slim_True_sample_rows_True_sample_pk_True.txt @@ -0,0 +1,18 @@ + Rows + ▔▔▔▔ + ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ + ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 3 equal (50.00%) │ + ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 6 joined + ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 3 unequal (50.00%) │ + ┗━┷━┷━┷━┷━┛╌╌╌┗━┷━┷━┷━┷━┛╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ + + Columns + ▔▔▔▔▔▔▔ + ┌─────────────────┬─────────┬───────────────────────────────┐ + │ life_expectancy │ 50.00% │ 11 -> 12 (2x, e.g. "sloth") │ + │ │ │ 12 -> 35 (1x, e.g. "dolphin") │ + ├─────────────────┼─────────┼───────────────────────────────┤ + │ speed_kph │ 100.00% │ │ + ├─────────────────┼─────────┼───────────────────────────────┤ + │ weight_kg │ 100.00% │ │ + └─────────────────┴─────────┴───────────────────────────────┘ diff --git a/tests/summary/fixtures/unequal_rows/gen/pretty_True_perfect_False_top_False_slim_False_sample_rows_False_sample_pk_False.txt b/tests/summary/fixtures/unequal_rows/gen/pretty_True_perfect_False_top_False_slim_False_sample_rows_False_sample_pk_False.txt new file mode 100644 index 0000000..722a990 --- /dev/null +++ b/tests/summary/fixtures/unequal_rows/gen/pretty_True_perfect_False_top_False_slim_False_sample_rows_False_sample_pk_False.txt @@ -0,0 +1,25 @@ +┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ +┃  Diffly Summary  ┃ +┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ + Primary key: name + + Schemas + ▔▔▔▔▔▔▔ + Schemas match exactly (column count: 4). + + Rows + ▔▔▔▔ + Left count Right count + 6 (no change) 6 + + ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ + ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 3 equal (50.00%) │ + ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 6 joined + ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 3 unequal (50.00%) │ + ┗━┷━┷━┷━┷━┛╌╌╌┗━┷━┷━┷━┷━┛╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ + + Columns + ▔▔▔▔▔▔▔ + ┌─────────────────┬────────┐ + │ life_expectancy │ 50.00% │ + └─────────────────┴────────┘ diff --git a/tests/summary/fixtures/unequal_rows/gen/pretty_True_perfect_False_top_False_slim_False_sample_rows_True_sample_pk_False.txt b/tests/summary/fixtures/unequal_rows/gen/pretty_True_perfect_False_top_False_slim_False_sample_rows_True_sample_pk_False.txt new file mode 100644 index 0000000..722a990 --- /dev/null +++ b/tests/summary/fixtures/unequal_rows/gen/pretty_True_perfect_False_top_False_slim_False_sample_rows_True_sample_pk_False.txt @@ -0,0 +1,25 @@ +┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ +┃  Diffly Summary  ┃ +┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ + Primary key: name + + Schemas + ▔▔▔▔▔▔▔ + Schemas match exactly (column count: 4). + + Rows + ▔▔▔▔ + Left count Right count + 6 (no change) 6 + + ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ + ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 3 equal (50.00%) │ + ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 6 joined + ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 3 unequal (50.00%) │ + ┗━┷━┷━┷━┷━┛╌╌╌┗━┷━┷━┷━┷━┛╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ + + Columns + ▔▔▔▔▔▔▔ + ┌─────────────────┬────────┐ + │ life_expectancy │ 50.00% │ + └─────────────────┴────────┘ diff --git a/tests/summary/fixtures/unequal_rows/gen/pretty_True_perfect_False_top_False_slim_True_sample_rows_False_sample_pk_False.txt b/tests/summary/fixtures/unequal_rows/gen/pretty_True_perfect_False_top_False_slim_True_sample_rows_False_sample_pk_False.txt new file mode 100644 index 0000000..67d5c36 --- /dev/null +++ b/tests/summary/fixtures/unequal_rows/gen/pretty_True_perfect_False_top_False_slim_True_sample_rows_False_sample_pk_False.txt @@ -0,0 +1,13 @@ + Rows + ▔▔▔▔ + ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ + ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 3 equal (50.00%) │ + ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 6 joined + ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 3 unequal (50.00%) │ + ┗━┷━┷━┷━┷━┛╌╌╌┗━┷━┷━┷━┷━┛╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ + + Columns + ▔▔▔▔▔▔▔ + ┌─────────────────┬────────┐ + │ life_expectancy │ 50.00% │ + └─────────────────┴────────┘ diff --git a/tests/summary/fixtures/unequal_rows/gen/pretty_True_perfect_False_top_False_slim_True_sample_rows_True_sample_pk_False.txt b/tests/summary/fixtures/unequal_rows/gen/pretty_True_perfect_False_top_False_slim_True_sample_rows_True_sample_pk_False.txt new file mode 100644 index 0000000..67d5c36 --- /dev/null +++ b/tests/summary/fixtures/unequal_rows/gen/pretty_True_perfect_False_top_False_slim_True_sample_rows_True_sample_pk_False.txt @@ -0,0 +1,13 @@ + Rows + ▔▔▔▔ + ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ + ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 3 equal (50.00%) │ + ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 6 joined + ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 3 unequal (50.00%) │ + ┗━┷━┷━┷━┷━┛╌╌╌┗━┷━┷━┷━┷━┛╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ + + Columns + ▔▔▔▔▔▔▔ + ┌─────────────────┬────────┐ + │ life_expectancy │ 50.00% │ + └─────────────────┴────────┘ diff --git a/tests/summary/fixtures/unequal_rows/gen/pretty_True_perfect_False_top_True_slim_False_sample_rows_False_sample_pk_False.txt b/tests/summary/fixtures/unequal_rows/gen/pretty_True_perfect_False_top_True_slim_False_sample_rows_False_sample_pk_False.txt new file mode 100644 index 0000000..8fea645 --- /dev/null +++ b/tests/summary/fixtures/unequal_rows/gen/pretty_True_perfect_False_top_True_slim_False_sample_rows_False_sample_pk_False.txt @@ -0,0 +1,26 @@ +┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ +┃  Diffly Summary  ┃ +┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ + Primary key: name + + Schemas + ▔▔▔▔▔▔▔ + Schemas match exactly (column count: 4). + + Rows + ▔▔▔▔ + Left count Right count + 6 (no change) 6 + + ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ + ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 3 equal (50.00%) │ + ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 6 joined + ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 3 unequal (50.00%) │ + ┗━┷━┷━┷━┷━┛╌╌╌┗━┷━┷━┷━┷━┛╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ + + Columns + ▔▔▔▔▔▔▔ + ┌─────────────────┬────────┬───────────────┐ + │ life_expectancy │ 50.00% │ 11 -> 12 (2x) │ + │ │ │ 12 -> 35 (1x) │ + └─────────────────┴────────┴───────────────┘ From 77cd4da9540b793bf413a69f0b3b1ff5d09bb2ba Mon Sep 17 00:00:00 2001 From: Marius Merkle Date: Sat, 28 Mar 2026 00:02:04 +0100 Subject: [PATCH 3/6] merge base --- tests/test_performance.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_performance.py b/tests/test_performance.py index bccee72..621aa3c 100644 --- a/tests/test_performance.py +++ b/tests/test_performance.py @@ -83,10 +83,10 @@ def expensive_computation(col: pl.Expr) -> pl.Expr: ) -def test_element_wise_comparison_slower_than_eq_missing_for_list_columns() -> None: - """Confirm that comparing list columns with non-tolerance inner types via - eq_missing() is significantly faster than the element-wise - _compare_sequence_columns() path.""" +def test_eq_missing_not_slower_than_element_wise_for_list_columns() -> None: + """Ensure that comparing list columns with non-tolerance inner types via + eq_missing() is not slower than the element-wise _compare_sequence_columns() + path.""" n_rows = 500_000 list_len = 20 num_runs_measured = 10 From 9815b7546cb7841a4c92556c5087d7fbed61261e Mon Sep 17 00:00:00 2001 From: Marius Merkle Date: Sat, 28 Mar 2026 00:30:31 +0100 Subject: [PATCH 4/6] feedback copilot --- diffly/_conditions.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/diffly/_conditions.py b/diffly/_conditions.py index d28c4bb..fa77b6b 100644 --- a/diffly/_conditions.py +++ b/diffly/_conditions.py @@ -153,11 +153,9 @@ def _compare_columns( ) return col_left.eq_missing(col_right) - if ( - isinstance(dtype_left, pl.Enum) - and isinstance(dtype_right, pl.Enum) - and dtype_left != dtype_right - ) or _enum_and_categorical(dtype_left, dtype_right): + if _different_enums(dtype_left, dtype_right) or _enum_and_categorical( + dtype_left, dtype_right + ): # Enums with different categories as well as enums and categoricals # can't be compared directly. # Fall back to comparison of strings. @@ -269,6 +267,10 @@ def _needs_element_wise_comparison( return True if _is_temporal_pair(dtype_left, dtype_right): return True + if _different_enums(dtype_left, dtype_right) or _enum_and_categorical( + dtype_left, dtype_right + ): + return True if isinstance(dtype_left, pl.Struct) and isinstance(dtype_right, pl.Struct): fields_left = {f.name: f.dtype for f in dtype_left.fields} fields_right = {f.name: f.dtype for f in dtype_right.fields} @@ -315,6 +317,12 @@ def _eq_missing_with_nan(expr: pl.Expr, lhs: pl.Expr, rhs: pl.Expr) -> pl.Expr: return _eq_missing(expr, lhs, rhs) | both_nan +def _different_enums( + left: DataType | DataTypeClass, right: DataType | DataTypeClass +) -> bool: + return isinstance(left, pl.Enum) and isinstance(right, pl.Enum) and left != right + + def _enum_and_categorical( left: DataType | DataTypeClass, right: DataType | DataTypeClass ) -> bool: From 83e79b4ea4d2a9ee53a840a6c18b4fb12fe6219a Mon Sep 17 00:00:00 2001 From: Marius Merkle Date: Sat, 28 Mar 2026 00:42:44 +0100 Subject: [PATCH 5/6] feedback copilot --- tests/test_conditions.py | 45 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/tests/test_conditions.py b/tests/test_conditions.py index 308d2a3..82cb3f3 100644 --- a/tests/test_conditions.py +++ b/tests/test_conditions.py @@ -6,7 +6,11 @@ import polars as pl import pytest -from diffly._conditions import _can_compare_dtypes, condition_equal_columns +from diffly._conditions import ( + _can_compare_dtypes, + _needs_element_wise_comparison, + condition_equal_columns, +) from diffly.comparison import compare_frames @@ -512,6 +516,45 @@ def test_condition_equal_columns_lists_only_inner() -> None: assert actual.to_list() == [True, False] +def test_condition_equal_columns_list_of_different_enums() -> None: + # Arrange + first_enum = pl.Enum(["one", "two"]) + second_enum = pl.Enum(["one", "two", "three"]) + + lhs = pl.DataFrame( + {"pk": [1, 2], "a": [["one", "two"], ["one", "one"]]}, + schema_overrides={"a": pl.List(first_enum)}, + ) + rhs = pl.DataFrame( + {"pk": [1, 2], "a": [["one", "two"], ["one", "three"]]}, + schema_overrides={"a": pl.List(second_enum)}, + ) + c = compare_frames(lhs, rhs, primary_key="pk") + + # Act + lhs = lhs.rename({"a": "a_left"}) + rhs = rhs.rename({"a": "a_right"}) + actual = ( + lhs.join(rhs, on="pk", maintain_order="left") + .select( + condition_equal_columns( + "a", + dtype_left=lhs.schema["a_left"], + dtype_right=rhs.schema["a_right"], + max_list_length=c._max_list_lengths_by_column.get("a"), + abs_tol=c.abs_tol_by_column["a"], + rel_tol=c.rel_tol_by_column["a"], + ) + ) + .to_series() + ) + + # Assert + assert c._max_list_lengths_by_column == {"a": 2} + assert _needs_element_wise_comparison(first_enum, second_enum) + assert actual.to_list() == [True, False] + + @pytest.mark.parametrize( ("dtype_left", "dtype_right", "can_compare_dtypes"), [ From 55766c47cabf71b4d59438e5237752a07c2bb1bd Mon Sep 17 00:00:00 2001 From: Marius Merkle Date: Sat, 28 Mar 2026 08:16:00 +0100 Subject: [PATCH 6/6] add test --- tests/test_conditions.py | 70 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/tests/test_conditions.py b/tests/test_conditions.py index 82cb3f3..5895be8 100644 --- a/tests/test_conditions.py +++ b/tests/test_conditions.py @@ -577,3 +577,73 @@ def test_can_compare_dtypes( dtype_left=dtype_left, dtype_right=dtype_right ) assert can_compare_dtypes_actual == can_compare_dtypes + + +@pytest.mark.parametrize( + ("dtype_left", "dtype_right", "expected"), + [ + # Primitives that don't need element-wise comparison + (pl.Int64, pl.Int64, False), + (pl.String, pl.String, False), + (pl.Boolean, pl.Boolean, False), + # Float/numeric pairs + (pl.Float64, pl.Float64, True), + (pl.Int64, pl.Float64, True), + (pl.Float32, pl.Int32, True), + # Temporal pairs + (pl.Datetime, pl.Datetime, True), + (pl.Date, pl.Date, True), + (pl.Datetime, pl.Date, True), + # Enum/categorical + (pl.Enum(["a", "b"]), pl.Enum(["a", "b"]), False), + (pl.Enum(["a", "b"]), pl.Enum(["a", "b", "c"]), True), + (pl.Enum(["a"]), pl.Categorical(), True), + (pl.Categorical(), pl.Enum(["a"]), True), + # Struct with no tolerance-requiring fields + ( + pl.Struct({"x": pl.Int64, "y": pl.String}), + pl.Struct({"x": pl.Int64, "y": pl.String}), + False, + ), + # Struct with a float field + ( + pl.Struct({"x": pl.Int64, "y": pl.Float64}), + pl.Struct({"x": pl.Int64, "y": pl.Float64}), + True, + ), + # Struct with different-category enums + ( + pl.Struct({"x": pl.Enum(["a"])}), + pl.Struct({"x": pl.Enum(["b"])}), + True, + ), + # List/Array with non-tolerance inner type + (pl.List(pl.Int64), pl.List(pl.Int64), False), + (pl.Array(pl.String, shape=3), pl.Array(pl.String, shape=3), False), + # List/Array with tolerance-requiring inner type + (pl.List(pl.Float64), pl.List(pl.Float64), True), + (pl.Array(pl.Datetime, shape=2), pl.Array(pl.Datetime, shape=2), True), + # Nested: list of structs with a float field + ( + pl.List(pl.Struct({"x": pl.Float64})), + pl.List(pl.Struct({"x": pl.Float64})), + True, + ), + # Nested: list of structs without tolerance-requiring fields + ( + pl.List(pl.Struct({"x": pl.Int64})), + pl.List(pl.Struct({"x": pl.Int64})), + False, + ), + # Deeply nested: struct with a list of structs with a float field + ( + pl.List(pl.Struct({"x": pl.String, "y": pl.List(pl.Float64)})), + pl.List(pl.Struct({"x": pl.String, "y": pl.List(pl.Float64)})), + True, + ), + ], +) +def test_needs_element_wise_comparison( + dtype_left: pl.DataType, dtype_right: pl.DataType, expected: bool +) -> None: + assert _needs_element_wise_comparison(dtype_left, dtype_right) == expected