Commit 5ed5af1
committed
Add Distinct::All variant to preserve SELECT ALL in AST
Previously, `SELECT ALL` was parsed but the ALL keyword was discarded,
with `one_statement_parses_to` tests verifying it normalized away. Now
the parser returns `Distinct::All` so the AST represents the original
SQL.
Also improves error messages for conflicting ALL/DISTINCT to indicate
which keyword came first.1 parent 3ac5670 commit 5ed5af1
3 files changed
Lines changed: 43 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3351 | 3351 | | |
3352 | 3352 | | |
3353 | 3353 | | |
3354 | | - | |
| 3354 | + | |
3355 | 3355 | | |
| 3356 | + | |
| 3357 | + | |
| 3358 | + | |
| 3359 | + | |
| 3360 | + | |
| 3361 | + | |
3356 | 3362 | | |
3357 | 3363 | | |
3358 | 3364 | | |
| |||
3363 | 3369 | | |
3364 | 3370 | | |
3365 | 3371 | | |
| 3372 | + | |
3366 | 3373 | | |
3367 | 3374 | | |
3368 | 3375 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4927 | 4927 | | |
4928 | 4928 | | |
4929 | 4929 | | |
4930 | | - | |
4931 | | - | |
4932 | | - | |
4933 | | - | |
4934 | | - | |
4935 | | - | |
4936 | | - | |
4937 | | - | |
4938 | | - | |
4939 | | - | |
| 4930 | + | |
| 4931 | + | |
| 4932 | + | |
| 4933 | + | |
| 4934 | + | |
| 4935 | + | |
| 4936 | + | |
| 4937 | + | |
| 4938 | + | |
| 4939 | + | |
| 4940 | + | |
| 4941 | + | |
| 4942 | + | |
| 4943 | + | |
| 4944 | + | |
| 4945 | + | |
| 4946 | + | |
| 4947 | + | |
| 4948 | + | |
| 4949 | + | |
| 4950 | + | |
4940 | 4951 | | |
4941 | 4952 | | |
4942 | 4953 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1074 | 1074 | | |
1075 | 1075 | | |
1076 | 1076 | | |
1077 | | - | |
| 1077 | + | |
1078 | 1078 | | |
1079 | 1079 | | |
1080 | 1080 | | |
1081 | 1081 | | |
1082 | 1082 | | |
1083 | 1083 | | |
1084 | | - | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
1085 | 1095 | | |
1086 | 1096 | | |
1087 | 1097 | | |
| |||
14830 | 14840 | | |
14831 | 14841 | | |
14832 | 14842 | | |
14833 | | - | |
| 14843 | + | |
14834 | 14844 | | |
14835 | | - | |
| 14845 | + | |
14836 | 14846 | | |
14837 | 14847 | | |
14838 | 14848 | | |
| |||
0 commit comments