-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 <[email protected]>
Signed-off-by: Andres Taylor <[email protected]>
Signed-off-by: Andres Taylor <[email protected]>
Signed-off-by: Andres Taylor <[email protected]>
Signed-off-by: Andres Taylor <[email protected]>
a74875d
to
032275f
Compare
Signed-off-by: Andres Taylor <[email protected]>
689f3c2
to
1f8838f
Compare
@@ -1041,32 +1073,6 @@ | |||
] | |||
} | |||
}, | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
@@ -2113,71 +2119,6 @@ | |||
] | |||
} | |||
}, | |||
{ | |||
"comment": "aggregation filtering by having on a route with no group by with non-unique vindex filter", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this query fails on both mysql and vitess. name
is not accessible on the having
clause
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rest LGTM
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 <[email protected]>
Signed-off-by: Andres Taylor <[email protected]>
…ER BY/HAVING clause Signed-off-by: Andres Taylor <[email protected]>
Signed-off-by: Andres Taylor <[email protected]>
Signed-off-by: Andres Taylor <[email protected]>
…GROUP BY Signed-off-by: Andres Taylor <[email protected]>
Signed-off-by: Andres Taylor <[email protected]>
Signed-off-by: Andres Taylor <[email protected]>
56e4696
to
70348a3
Compare
Signed-off-by: Andres Taylor <[email protected]>
Signed-off-by: Andres Taylor <[email protected]>
Signed-off-by: Andres Taylor <[email protected]>
Signed-off-by: Andres Taylor <[email protected]> Signed-off-by: Manan Gupta <[email protected]> Co-authored-by: Manan Gupta <[email protected]>
) Signed-off-by: Andres Taylor <[email protected]> Signed-off-by: Manan Gupta <[email protected]> Co-authored-by: Andrés Taylor <[email protected]> Co-authored-by: Manan Gupta <[email protected]>
* 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 BY
andHAVING
.Related Issue(s)
#15302 (fix for
ORDER BY
)#14935 (pr that introduced some bad rewrites)
Checklist