Commit 301f78f
committed
nom-sql: Fix GROUP BY parsing for Postgres
Postgres allows you to identify columns in a `GROUP BY` clause by their
ordinal position in the column list of a query; however our parser was
written with the assumption that this was only possible for MySQL. This
commit updates our parser to support column indices in the `GROUP BY`
clause for both MySQL *and* Postgres.
Release-Note-Core: Fixed an issue where Readyset was not correctly
handling entries in the `GROUP BY` clause that identified columns by
their position in the column list of the query
Change-Id: Ib84789e903ca8b7137b780ee1e8e791439dab1ae
Reviewed-on: https://gerrit.readyset.name/c/readyset/+/6980
Tested-by: Buildkite CI
Reviewed-by: Luke Osborne <[email protected]>1 parent 048fd4b commit 301f78f
File tree
2 files changed
+63
-14
lines changed- logictests/psql
- nom-sql/src
2 files changed
+63
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
827 | 827 | | |
828 | 828 | | |
829 | 829 | | |
830 | | - | |
831 | | - | |
832 | | - | |
833 | | - | |
834 | | - | |
835 | | - | |
836 | | - | |
837 | | - | |
838 | | - | |
839 | | - | |
840 | | - | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
841 | 835 | | |
842 | | - | |
843 | | - | |
844 | | - | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
845 | 840 | | |
846 | 841 | | |
847 | 842 | | |
| |||
0 commit comments