Commit 2774bee
committed
Prune real-time branch of deep hierarchical caggs
A single application of ts_transform_time_bucket_comparison() strips
only the outermost time_bucket() from a comparison. In a hierarchical
continuous aggregate the bucket input is itself another time_bucket()
call. The real-time branch could not be proven empty and the refresh
re-scanned the whole raw un-materialized tail of the base hypertable.
Add ts_transform_nested_time_bucket_comparison(), which applies the
single-level transform repeatedly until the bound is expressed on the
raw column. Only the original qual and the fully reduced qual are kept;
the intermediate levels have no consumer.
Fixes: #100711 parent 0eb017d commit 2774bee
6 files changed
Lines changed: 53 additions & 85 deletions
File tree
- .unreleased
- src
- nodes/chunk_append
- planner
- tsl/test
- expected
- sql
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1001 | 1001 | | |
1002 | 1002 | | |
1003 | 1003 | | |
1004 | | - | |
| 1004 | + | |
1005 | 1005 | | |
1006 | 1006 | | |
1007 | 1007 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
731 | 731 | | |
732 | 732 | | |
733 | 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 | + | |
734 | 760 | | |
735 | 761 | | |
736 | 762 | | |
| |||
784 | 810 | | |
785 | 811 | | |
786 | 812 | | |
787 | | - | |
| 813 | + | |
788 | 814 | | |
789 | 815 | | |
790 | 816 | | |
| |||
835 | 861 | | |
836 | 862 | | |
837 | 863 | | |
838 | | - | |
| 864 | + | |
839 | 865 | | |
840 | 866 | | |
841 | 867 | | |
| |||
1054 | 1080 | | |
1055 | 1081 | | |
1056 | 1082 | | |
1057 | | - | |
| 1083 | + | |
1058 | 1084 | | |
1059 | 1085 | | |
1060 | 1086 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| 100 | + | |
100 | 101 | | |
101 | 102 | | |
102 | 103 | | |
| |||
0 commit comments