Bugfix: GROUP BY/HAVING alias resolution#15344
Conversation
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
44dca2d to
7a0834e
Compare
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
a74875d to
032275f
Compare
Signed-off-by: Andres Taylor <andres@planetscale.com>
689f3c2 to
1f8838f
Compare
| ] | ||
| } | ||
| }, | ||
| { |
There was a problem hiding this comment.
Removed this since it fails on mysql. a is not the same as a collate utf8_general_ci, so if full_group_by is enabled, this query would fail
| } | ||
| }, | ||
| { | ||
| "comment": "aggregation filtering by having on a route with no group by with non-unique vindex filter", |
There was a problem hiding this comment.
this query fails on both mysql and vitess. name is not accessible on the having clause
There was a problem hiding this comment.
This query does not fail anymore, we should bring the test back.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #15344 +/- ##
==========================================
- Coverage 67.41% 65.43% -1.98%
==========================================
Files 1560 1562 +2
Lines 192752 193863 +1111
==========================================
- Hits 129952 126863 -3089
- Misses 62800 67000 +4200 ☔ View full report in Codecov by Sentry. |
your comment was not connected to anything I could see, so I'm not sure what the question is about. Generally - if you are grouping by an alias introduced in the SELECT expression, and we have to do some or most of the aggregating on the vtgate, queries might start having issues if you are running without schema tracking |
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
…ER BY/HAVING clause Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
…GROUP BY Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
56e4696 to
70348a3
Compare
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
* fix test cases * Merge branch 'master' into split-table-merge-master0306 * fix ci test * Bugfix: GROUP BY/HAVING alias resolution (vitessio#15344) (vitessio#15381 * add params for proxy support ddl operations * merge origin * fix client_found_row (vitessio#203) * merge origin to a2c986c * fix client found rows * Use GetTabletsByCell in healthcheck * delete start params:track_schema_versions. * auto delete logs from three days ago * 解决跨cell获取节点失败和SQL权限没有正确拦截的问题 * merge origin 3a35dd * 支持MySQL8.0编译... (vitessio#185) * 修改show vitess_shards|vitess_tables和 show variables (vitessio#175) * fix binaryhash * fix: container restart ,programs restart failed * add start params * merge origin with laster pr:f39ada * fix vttablet startup * fix openEuler dockerfile * merge origin bugfix * fix master ci * Bugfix: fix pinned table for splitclone (vitessio#141)
* Merge branch 'master' into split-table-merge-master0306 * 修复agent容器无法跨容器恢复MySQL数据的问题 * fix test cases * fix ci test * Bugfix: GROUP BY/HAVING alias resolution (vitessio#15344) (vitessio#15381 * add params for proxy support ddl operations * merge origin * fix client_found_row (vitessio#203) * merge origin to a2c986c * fix client found rows * Use GetTabletsByCell in healthcheck * delete start params:track_schema_versions. * auto delete logs from three days ago * 解决跨cell获取节点失败和SQL权限没有正确拦截的问题 * merge origin 3a35dd * 支持MySQL8.0编译... (vitessio#185) * 修改show vitess_shards|vitess_tables和 show variables (vitessio#175) * fix binaryhash * fix: container restart ,programs restart failed * add start params * merge origin with laster pr:f39ada * fix vttablet startup * fix openEuler dockerfile * merge origin bugfix * fix master ci * Bugfix: fix pinned table for splitclone (vitessio#141)
Description
Following up on #15302, this PR does the same fix for
GROUP BYandHAVING.Related Issue(s)
#15302 (fix for
ORDER BY)#14935 (pr that introduced some bad rewrites)
Checklist