Commit 156b6ff
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 6f8e7b8 commit 156b6ff
File tree
7 files changed
+64
-0
lines changed- src
- ast
- dialect
- parser
- tests
7 files changed
+64
-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 | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
93 | 97 | | |
| 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 | |
|---|---|---|---|
| |||
1664 | 1664 | | |
1665 | 1665 | | |
1666 | 1666 | | |
| 1667 | + | |
| 1668 | + | |
| 1669 | + | |
| 1670 | + | |
| 1671 | + | |
| 1672 | + | |
| 1673 | + | |
| 1674 | + | |
| 1675 | + | |
| 1676 | + | |
| 1677 | + | |
1667 | 1678 | | |
1668 | 1679 | | |
1669 | 1680 | | |
| |||
| 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 | |
|---|---|---|---|
| |||
644 | 644 | | |
645 | 645 | | |
646 | 646 | | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
0 commit comments