Commit f45faec
authored
Skip dimension slices when we have empty dimension restriction (#9728)
During hypertable expansion, we process the qualifiers to derive the
range for a dimension variable that encloses all matching rows. This
range is used to find the chunks that could possibly contain these rows.
When the qualifiers are contradictory, an invalid range can arise, with
upper bound below lower bound. At the moment such a range can still
match some dimension slices, because the dimension slice ends are
checked against this range separately. The chunk will then be excluded
by the Postgres constraint exclusion that handles contradictory clauses.
Add a simple check to not match such contradictory search ranges, to
save some work. In the long run, this moves the hypertable expansion
closer to feature parity with Postgres constraint exclusion, which is
costly and maybe could be avoided eventually.
This is not visible in any tests, because the Postgres constrain
exclusion compensates for whatever our hypertable expansion might miss.1 parent 501714a commit f45faec
1 file changed
Lines changed: 42 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
727 | 727 | | |
728 | 728 | | |
729 | 729 | | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
730 | 772 | | |
731 | 773 | | |
732 | 774 | | |
| |||
0 commit comments