forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit9e8b994
committed
Improve handling of group-column indexes in GroupingSetsPath.
Instead of having planner.c compute a groupColIdx array and store it inGroupingSetsPaths, make create_groupingsets_plan() find the groupingcolumns by searching in the child plan node's tlist. Although that'sprobably a bit slower for create_groupingsets_plan(), it's more likethe way every other plan node type does this, and it provides positiveconfirmation that we know which child output columns we're supposed to begrouping on. (Indeed, looking at this now, I'm not at all sure that itwasn't broken before, because create_groupingsets_plan() isn't demandingan exact tlist match from its child node.) Also, this allows substantialsimplification in planner.c, because it no longer needs to compute thegroupColIdx array at all; no other cases were using it.I'd intended to put off this refactoring until later (like 9.7), butin view of the likely bug fix and the need to rationalize planner.c'stlist handling so we can do something sane with Konstantin Knizhnik'sfunction-evaluation-postponement patch, I think it can't wait.1 parenta40814d commit9e8b994
File tree
8 files changed
+57
-115
lines changed- src
- backend
- nodes
- optimizer
- plan
- util
- include
- nodes
- optimizer
8 files changed
+57
-115
lines changedLines changed: 0 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1875 | 1875 |
| |
1876 | 1876 |
| |
1877 | 1877 |
| |
1878 |
| - | |
1879 | 1878 |
| |
1880 | 1879 |
| |
1881 | 1880 |
| |
|
Lines changed: 6 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1640 | 1640 |
| |
1641 | 1641 |
| |
1642 | 1642 |
| |
1643 |
| - | |
1644 | 1643 |
| |
1645 | 1644 |
| |
1646 | 1645 |
| |
1647 | 1646 |
| |
1648 | 1647 |
| |
1649 |
| - | |
1650 | 1648 |
| |
1651 | 1649 |
| |
1652 | 1650 |
| |
| |||
1662 | 1660 |
| |
1663 | 1661 |
| |
1664 | 1662 |
| |
1665 |
| - | |
1666 |
| - | |
| 1663 | + | |
| 1664 | + | |
| 1665 | + | |
1667 | 1666 |
| |
1668 | 1667 |
| |
1669 | 1668 |
| |
| |||
1676 | 1675 |
| |
1677 | 1676 |
| |
1678 | 1677 |
| |
1679 |
| - | |
| 1678 | + | |
1680 | 1679 |
| |
1681 | 1680 |
| |
1682 | 1681 |
| |
| 1682 | + | |
1683 | 1683 |
| |
1684 |
| - | |
| 1684 | + | |
1685 | 1685 |
| |
1686 | 1686 |
| |
1687 | 1687 |
| |
|
Lines changed: 28 additions & 102 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
104 | 104 |
| |
105 | 105 |
| |
106 | 106 |
| |
107 |
| - | |
108 | 107 |
| |
109 | 108 |
| |
110 | 109 |
| |
| |||
125 | 124 |
| |
126 | 125 |
| |
127 | 126 |
| |
128 |
| - | |
129 |
| - | |
130 |
| - | |
| 127 | + | |
131 | 128 |
| |
132 | 129 |
| |
133 | 130 |
| |
| |||
1462 | 1459 |
| |
1463 | 1460 |
| |
1464 | 1461 |
| |
1465 |
| - | |
1466 | 1462 |
| |
1467 | 1463 |
| |
1468 | 1464 |
| |
| |||
1656 | 1652 |
| |
1657 | 1653 |
| |
1658 | 1654 |
| |
1659 |
| - | |
1660 |
| - | |
| 1655 | + | |
1661 | 1656 |
| |
1662 | 1657 |
| |
1663 | 1658 |
| |
| |||
1714 | 1709 |
| |
1715 | 1710 |
| |
1716 | 1711 |
| |
1717 |
| - | |
1718 | 1712 |
| |
1719 | 1713 |
| |
1720 | 1714 |
| |
| |||
3077 | 3071 |
| |
3078 | 3072 |
| |
3079 | 3073 |
| |
3080 |
| - | |
3081 | 3074 |
| |
3082 | 3075 |
| |
3083 | 3076 |
| |
| |||
3092 | 3085 |
| |
3093 | 3086 |
| |
3094 | 3087 |
| |
3095 |
| - | |
3096 | 3088 |
| |
3097 | 3089 |
| |
3098 | 3090 |
| |
| |||
3236 | 3228 |
| |
3237 | 3229 |
| |
3238 | 3230 |
| |
3239 |
| - | |
3240 | 3231 |
| |
3241 | 3232 |
| |
3242 | 3233 |
| |
| |||
3766 | 3757 |
| |
3767 | 3758 |
| |
3768 | 3759 |
| |
3769 |
| - | |
3770 |
| - | |
3771 | 3760 |
| |
3772 | 3761 |
| |
3773 | 3762 |
| |
3774 | 3763 |
| |
3775 | 3764 |
| |
3776 | 3765 |
| |
3777 |
| - | |
3778 |
| - | |
| 3766 | + | |
3779 | 3767 |
| |
3780 | 3768 |
| |
3781 | 3769 |
| |
3782 | 3770 |
| |
3783 | 3771 |
| |
3784 |
| - | |
3785 |
| - | |
3786 |
| - | |
| 3772 | + | |
3787 | 3773 |
| |
3788 | 3774 |
| |
3789 | 3775 |
| |
| |||
3800 | 3786 |
| |
3801 | 3787 |
| |
3802 | 3788 |
| |
3803 |
| - | |
3804 |
| - | |
| 3789 | + | |
3805 | 3790 |
| |
3806 |
| - | |
3807 |
| - | |
3808 |
| - | |
3809 |
| - | |
3810 |
| - | |
3811 |
| - | |
3812 |
| - | |
3813 |
| - | |
3814 |
| - | |
3815 |
| - | |
3816 |
| - | |
3817 |
| - | |
| 3791 | + | |
3818 | 3792 |
| |
3819 |
| - | |
| 3793 | + | |
| 3794 | + | |
| 3795 | + | |
3820 | 3796 |
| |
3821 |
| - | |
3822 |
| - | |
3823 |
| - | |
3824 |
| - | |
3825 |
| - | |
3826 |
| - | |
3827 |
| - | |
3828 |
| - | |
3829 |
| - | |
3830 |
| - | |
3831 |
| - | |
3832 |
| - | |
3833 |
| - | |
3834 |
| - | |
3835 |
| - | |
3836 |
| - | |
3837 |
| - | |
3838 |
| - | |
| 3797 | + | |
| 3798 | + | |
| 3799 | + | |
| 3800 | + | |
3839 | 3801 |
| |
3840 |
| - | |
3841 |
| - | |
3842 |
| - | |
3843 |
| - | |
3844 |
| - | |
3845 |
| - | |
3846 |
| - | |
3847 |
| - | |
3848 |
| - | |
3849 |
| - | |
3850 |
| - | |
3851 |
| - | |
| 3802 | + | |
| 3803 | + | |
| 3804 | + | |
| 3805 | + | |
| 3806 | + | |
| 3807 | + | |
| 3808 | + | |
| 3809 | + | |
| 3810 | + | |
| 3811 | + | |
| 3812 | + | |
| 3813 | + | |
| 3814 | + | |
| 3815 | + | |
| 3816 | + | |
3852 | 3817 |
| |
3853 |
| - | |
3854 |
| - | |
3855 |
| - | |
3856 |
| - | |
3857 |
| - | |
3858 |
| - | |
3859 |
| - | |
3860 |
| - | |
3861 | 3818 |
| |
3862 | 3819 |
| |
3863 | 3820 |
| |
| |||
3886 | 3843 |
| |
3887 | 3844 |
| |
3888 | 3845 |
| |
3889 |
| - | |
3890 |
| - | |
3891 |
| - | |
3892 |
| - | |
3893 |
| - | |
3894 |
| - | |
3895 |
| - | |
3896 |
| - | |
3897 |
| - | |
3898 |
| - | |
3899 |
| - | |
3900 |
| - | |
3901 |
| - | |
3902 |
| - | |
3903 |
| - | |
3904 |
| - | |
3905 |
| - | |
3906 |
| - | |
3907 |
| - | |
3908 |
| - | |
3909 |
| - | |
3910 |
| - | |
3911 |
| - | |
3912 |
| - | |
3913 |
| - | |
3914 |
| - | |
3915 |
| - | |
3916 |
| - | |
3917 |
| - | |
3918 |
| - | |
3919 |
| - | |
3920 | 3846 |
| |
3921 | 3847 |
| |
3922 | 3848 |
| |
|
Lines changed: 1 addition & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2438 | 2438 |
| |
2439 | 2439 |
| |
2440 | 2440 |
| |
2441 |
| - | |
| 2441 | + | |
2442 | 2442 |
| |
2443 | 2443 |
| |
2444 | 2444 |
| |
2445 | 2445 |
| |
2446 | 2446 |
| |
2447 |
| - | |
2448 | 2447 |
| |
2449 | 2448 |
| |
2450 | 2449 |
| |
| |||
2456 | 2455 |
| |
2457 | 2456 |
| |
2458 | 2457 |
| |
2459 |
| - | |
2460 | 2458 |
| |
2461 | 2459 |
| |
2462 | 2460 |
| |
| |||
2487 | 2485 |
| |
2488 | 2486 |
| |
2489 | 2487 |
| |
2490 |
| - | |
2491 | 2488 |
| |
2492 | 2489 |
| |
2493 | 2490 |
| |
|
Lines changed: 20 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
444 | 444 |
| |
445 | 445 |
| |
446 | 446 |
| |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
447 | 467 |
| |
448 | 468 |
| |
449 | 469 |
| |
|
Lines changed: 0 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1311 | 1311 |
| |
1312 | 1312 |
| |
1313 | 1313 |
| |
1314 |
| - | |
1315 | 1314 |
| |
1316 | 1315 |
| |
1317 | 1316 |
| |
|
Lines changed: 0 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
173 | 173 |
| |
174 | 174 |
| |
175 | 175 |
| |
176 |
| - | |
177 | 176 |
| |
178 | 177 |
| |
179 | 178 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
46 | 46 |
| |
47 | 47 |
| |
48 | 48 |
| |
| 49 | + | |
| 50 | + | |
49 | 51 |
| |
50 | 52 |
| |
51 | 53 |
| |
|
0 commit comments
Comments
(0)