Commit 3b2445a
authored
Fix SQLColumnCheckOperator crash on non-numeric column bounds (#70895)
The tolerance rewrite made every bound go through arithmetic, including
when no tolerance is configured. A min/max check declared on a date or
text column has a bound that cannot be subtracted from, so checks that
compared cleanly before now fail the task with a TypeError.
An equal_to check also stopped reporting a NULL result as a failed check
and started raising instead, because a degenerate range still orders the
record against the bound.1 parent 0191b11 commit 3b2445a
2 files changed
Lines changed: 47 additions & 12 deletions
File tree
- providers/common/sql
- src/airflow/providers/common/sql/operators
- tests/unit/common/sql/operators
Lines changed: 17 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
746 | 746 | | |
747 | 747 | | |
748 | 748 | | |
749 | | - | |
750 | | - | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
751 | 756 | | |
752 | 757 | | |
753 | | - | |
| 758 | + | |
754 | 759 | | |
755 | | - | |
| 760 | + | |
756 | 761 | | |
757 | | - | |
758 | | - | |
759 | | - | |
| 762 | + | |
760 | 763 | | |
761 | | - | |
762 | | - | |
763 | | - | |
| 764 | + | |
764 | 765 | | |
765 | 766 | | |
766 | | - | |
767 | | - | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
768 | 773 | | |
769 | 774 | | |
770 | 775 | | |
| |||
Lines changed: 30 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1721 | 1721 | | |
1722 | 1722 | | |
1723 | 1723 | | |
| 1724 | + | |
| 1725 | + | |
| 1726 | + | |
| 1727 | + | |
| 1728 | + | |
| 1729 | + | |
| 1730 | + | |
| 1731 | + | |
| 1732 | + | |
| 1733 | + | |
| 1734 | + | |
| 1735 | + | |
| 1736 | + | |
| 1737 | + | |
| 1738 | + | |
| 1739 | + | |
| 1740 | + | |
| 1741 | + | |
| 1742 | + | |
| 1743 | + | |
| 1744 | + | |
| 1745 | + | |
| 1746 | + | |
| 1747 | + | |
| 1748 | + | |
| 1749 | + | |
| 1750 | + | |
| 1751 | + | |
| 1752 | + | |
| 1753 | + | |
1724 | 1754 | | |
1725 | 1755 | | |
1726 | 1756 | | |
| |||
0 commit comments