Commit 0994664
committed
Add window function support to keyword-as-function parsing
When keywords like ANY, ALL, etc. are used as function names (e.g.,
any(number)), they were being parsed by parseKeywordAsFunction which
didn't handle OVER clause for window functions.
Added support for:
- DISTINCT inside keyword functions
- IGNORE NULLS / RESPECT NULLS modifiers
- FILTER clause for aggregate functions
- OVER clause for window functions
This fixes parsing of queries like:
SELECT any(number) OVER () FROM numbers(2);1 parent 9a0b0ad commit 0994664
5 files changed
Lines changed: 48 additions & 26 deletions
File tree
- parser
- testdata
- 01591_window_functions
- 02900_window_function_with_sparse_column
- 02922_respect_nulls_extensive
- 02941_any_RESPECT_NULL_sparse_column
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1897 | 1897 | | |
1898 | 1898 | | |
1899 | 1899 | | |
1900 | | - | |
| 1900 | + | |
| 1901 | + | |
| 1902 | + | |
| 1903 | + | |
| 1904 | + | |
| 1905 | + | |
| 1906 | + | |
| 1907 | + | |
| 1908 | + | |
| 1909 | + | |
| 1910 | + | |
1901 | 1911 | | |
1902 | 1912 | | |
1903 | 1913 | | |
1904 | | - | |
| 1914 | + | |
1905 | 1915 | | |
1906 | | - | |
| 1916 | + | |
1907 | 1917 | | |
1908 | 1918 | | |
1909 | 1919 | | |
1910 | 1920 | | |
1911 | | - | |
1912 | | - | |
1913 | | - | |
1914 | | - | |
| 1921 | + | |
| 1922 | + | |
| 1923 | + | |
| 1924 | + | |
| 1925 | + | |
| 1926 | + | |
| 1927 | + | |
| 1928 | + | |
| 1929 | + | |
| 1930 | + | |
| 1931 | + | |
| 1932 | + | |
| 1933 | + | |
| 1934 | + | |
| 1935 | + | |
| 1936 | + | |
| 1937 | + | |
| 1938 | + | |
| 1939 | + | |
| 1940 | + | |
| 1941 | + | |
| 1942 | + | |
| 1943 | + | |
| 1944 | + | |
| 1945 | + | |
| 1946 | + | |
| 1947 | + | |
| 1948 | + | |
| 1949 | + | |
| 1950 | + | |
1915 | 1951 | | |
| 1952 | + | |
| 1953 | + | |
1916 | 1954 | | |
1917 | 1955 | | |
1918 | 1956 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | 14 | | |
16 | 15 | | |
17 | 16 | | |
| |||
Lines changed: 1 addition & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
| 1 | + | |
Lines changed: 1 addition & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | 3 | | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
| 4 | + | |
12 | 5 | | |
13 | 6 | | |
Lines changed: 1 addition & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
| 1 | + | |
0 commit comments