Commit 7708a40
committed
Support multi-column aliases in SELECT items for Databricks
Spark SQL grammar allows parenthesized identifier lists as SELECT
item aliases:
namedExpression: expression (AS? (identifier | identifierList))?
identifierList: '(' identifier (',' identifier)* ')'
This enables syntax like:
SELECT stack(2, 'a', 'b', 'c', 'd') AS (col1, col2)1 parent ea9b413 commit 7708a40
File tree
7 files changed
+65
-0
lines changed- src
- ast
- dialect
- parser
- tests
7 files changed
+65
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
872 | 872 | | |
873 | 873 | | |
874 | 874 | | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
875 | 884 | | |
876 | 885 | | |
877 | 886 | | |
| |||
1175 | 1184 | | |
1176 | 1185 | | |
1177 | 1186 | | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
1178 | 1193 | | |
1179 | 1194 | | |
1180 | 1195 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1821 | 1821 | | |
1822 | 1822 | | |
1823 | 1823 | | |
| 1824 | + | |
| 1825 | + | |
| 1826 | + | |
1824 | 1827 | | |
1825 | 1828 | | |
1826 | 1829 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
102 | 106 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
288 | 288 | | |
289 | 289 | | |
290 | 290 | | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
291 | 295 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1670 | 1670 | | |
1671 | 1671 | | |
1672 | 1672 | | |
| 1673 | + | |
| 1674 | + | |
| 1675 | + | |
| 1676 | + | |
| 1677 | + | |
| 1678 | + | |
| 1679 | + | |
| 1680 | + | |
| 1681 | + | |
| 1682 | + | |
| 1683 | + | |
1673 | 1684 | | |
1674 | 1685 | | |
1675 | 1686 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18074 | 18074 | | |
18075 | 18075 | | |
18076 | 18076 | | |
| 18077 | + | |
| 18078 | + | |
| 18079 | + | |
| 18080 | + | |
| 18081 | + | |
| 18082 | + | |
| 18083 | + | |
| 18084 | + | |
| 18085 | + | |
| 18086 | + | |
| 18087 | + | |
| 18088 | + | |
| 18089 | + | |
18077 | 18090 | | |
18078 | 18091 | | |
18079 | 18092 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18754 | 18754 | | |
18755 | 18755 | | |
18756 | 18756 | | |
| 18757 | + | |
| 18758 | + | |
| 18759 | + | |
| 18760 | + | |
| 18761 | + | |
| 18762 | + | |
| 18763 | + | |
| 18764 | + | |
| 18765 | + | |
| 18766 | + | |
| 18767 | + | |
| 18768 | + | |
| 18769 | + | |
| 18770 | + | |
| 18771 | + | |
0 commit comments