forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit981643d
committed
Allow partitionwise join to handle nested FULL JOIN USING cases.
This case didn't work because columns merged by FULL JOIN USING arerepresented in the parse tree by COALESCE expressions, and the logicfor recognizing a partitionable join failed to match upper-level joinclauses to such expressions. To fix, synthesize suitable COALESCEexpressions and add them to the nullable_partexprs lists. This ispretty ugly and brute-force, but it gets the job done. (I haveambitions of rethinking the way outer-join output Vars arerepresented, so maybe that will provide a cleaner solution someday.For now, do this.)Amit Langote, reviewed by Justin Pryzby, Richard Guo, and myselfDiscussion:https://postgr.es/m/CA+HiwqG2WVUGmLJqtR0tPFhniO=H=9qQ+Z3L_ZC+Y3-EVQHFGg@mail.gmail.com1 parentc8434d6 commit981643d
File tree
4 files changed
+174
-2
lines changed- src
- backend/optimizer/util
- include/nodes
- test/regress
- expected
- sql
4 files changed
+174
-2
lines changedLines changed: 43 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
17 | 17 |
| |
18 | 18 |
| |
19 | 19 |
| |
| 20 | + | |
20 | 21 |
| |
21 | 22 |
| |
22 | 23 |
| |
| |||
1875 | 1876 |
| |
1876 | 1877 |
| |
1877 | 1878 |
| |
1878 |
| - | |
| 1879 | + | |
| 1880 | + | |
1879 | 1881 |
| |
1880 | 1882 |
| |
1881 | 1883 |
| |
| |||
1884 | 1886 |
| |
1885 | 1887 |
| |
1886 | 1888 |
| |
1887 |
| - | |
| 1889 | + | |
| 1890 | + | |
1888 | 1891 |
| |
1889 | 1892 |
| |
1890 | 1893 |
| |
| |||
1895 | 1898 |
| |
1896 | 1899 |
| |
1897 | 1900 |
| |
| 1901 | + | |
1898 | 1902 |
| |
1899 | 1903 |
| |
1900 | 1904 |
| |
| |||
1954 | 1958 |
| |
1955 | 1959 |
| |
1956 | 1960 |
| |
| 1961 | + | |
| 1962 | + | |
| 1963 | + | |
| 1964 | + | |
| 1965 | + | |
| 1966 | + | |
| 1967 | + | |
| 1968 | + | |
| 1969 | + | |
| 1970 | + | |
| 1971 | + | |
| 1972 | + | |
| 1973 | + | |
| 1974 | + | |
| 1975 | + | |
| 1976 | + | |
| 1977 | + | |
| 1978 | + | |
| 1979 | + | |
| 1980 | + | |
| 1981 | + | |
| 1982 | + | |
| 1983 | + | |
| 1984 | + | |
| 1985 | + | |
| 1986 | + | |
| 1987 | + | |
| 1988 | + | |
| 1989 | + | |
| 1990 | + | |
| 1991 | + | |
| 1992 | + | |
| 1993 | + | |
| 1994 | + | |
| 1995 | + | |
| 1996 | + | |
| 1997 | + | |
1957 | 1998 |
| |
1958 | 1999 |
| |
1959 | 2000 |
| |
|
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
615 | 615 |
| |
616 | 616 |
| |
617 | 617 |
| |
| 618 | + | |
| 619 | + | |
| 620 | + | |
618 | 621 |
| |
619 | 622 |
| |
620 | 623 |
| |
|
Lines changed: 110 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
750 | 750 |
| |
751 | 751 |
| |
752 | 752 |
| |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
753 | 863 |
| |
754 | 864 |
| |
755 | 865 |
| |
|
Lines changed: 18 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
145 | 145 |
| |
146 | 146 |
| |
147 | 147 |
| |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
148 | 166 |
| |
149 | 167 |
| |
150 | 168 |
| |
|
0 commit comments
Comments
(0)