| 652 | return (key, row_a[0], row_b[0], DiffRatio(row_a[0], row_b[0])) |
| 653 | |
| 654 | def join_columns(self, columns: Columns) -> Columns: |
| 655 | match self.join_mode: |
| 656 | case JoinMode.SIMPLE: |
| 657 | return ( |
| 658 | columns[0], |
| 659 | *("Base " + x for x in columns[1:]), |
| 660 | *("Head " + x for x in columns[1:]), |
| 661 | ) |
| 662 | case JoinMode.CHANGE | JoinMode.CHANGE_NO_SORT: |
| 663 | return ( |
| 664 | columns[0], |
| 665 | *("Base " + x for x in columns[1:]), |
| 666 | *("Head " + x for x in columns[1:]), |
| 667 | ) + ("Change:",) |
| 668 | case JoinMode.CHANGE_ONE_COLUMN: |
| 669 | return ( |
| 670 | columns[0], |
| 671 | "Base " + columns[1], |
| 672 | "Head " + columns[1], |
| 673 | "Change:", |
| 674 | ) |
| 675 | |
| 676 | def join_tables(self, rows_a: Rows, rows_b: Rows) -> tuple[Columns, Rows]: |
| 677 | ncols = len(self.columns) |