Skip to content
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

Gen4: Distinct #8479

Merged
merged 14 commits into from
Jul 19, 2021
Merged

Gen4: Distinct #8479

merged 14 commits into from
Jul 19, 2021

Conversation

systay
Copy link
Collaborator

@systay systay commented Jul 15, 2021

Description

Adds DISTINCT planning to the gen4 planner

Related Issue(s)

Tracking #7280

Checklist

  • Tests were added or are not required
  • Documentation was added or is not required

frouioui and others added 7 commits July 15, 2021 09:52
Signed-off-by: Florent Poinsard <[email protected]>
Co-authored-by: Andres Taylor <[email protected]>
Signed-off-by: Florent Poinsard <[email protected]>
Co-authored-by: Andres Taylor <[email protected]>
Signed-off-by: Florent Poinsard <[email protected]>
Co-authored-by: Andres Taylor <[email protected]>
Signed-off-by: Florent Poinsard <[email protected]>
@systay systay added Component: Query Serving Type: Enhancement Logical improvement (somewhere between a bug and feature) labels Jul 15, 2021
@systay systay marked this pull request as ready for review July 15, 2021 12:51
Copy link
Member

@frouioui frouioui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of comments, looks good to me

go/vt/sqlparser/ast_funcs.go Outdated Show resolved Hide resolved
go/vt/vtgate/planbuilder/route_planning.go Outdated Show resolved Hide resolved
Signed-off-by: Andres Taylor <[email protected]>
Signed-off-by: Andres Taylor <[email protected]>
Comment on lines +223 to +231
err = hp.truncateColumnsIfNeeded()
if err != nil {
return nil, err
}

if hp.qp.NeedsDistinct() {
hp.plan, err = pushDistinct(hp.plan, hp.semTable, hp.vschema, hp.qp)
if err != nil {
return nil, err
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can add TODO for supporting collation in distinct.

@systay systay merged commit 75bf629 into vitessio:main Jul 19, 2021
@systay systay deleted the gen4-distinct branch July 19, 2021 04:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Query Serving Type: Enhancement Logical improvement (somewhere between a bug and feature)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants