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

Expression Implementation #5098

Closed
4 tasks done
dkhenry opened this issue Aug 14, 2019 · 5 comments
Closed
4 tasks done

Expression Implementation #5098

dkhenry opened this issue Aug 14, 2019 · 5 comments
Labels
Type: Enhancement Logical improvement (somewhere between a bug and feature)

Comments

@dkhenry
Copy link
Contributor

dkhenry commented Aug 14, 2019

Feature Description

Implement the expression logic needed to match the MySQL Expression Engine. The following are expressions that need to be supported

  • Addition 1 + 1
  • Subtraction 1 - 1
  • Multiplication 1 * 1
  • Division 1 / 1

Long term the full list of expressions to handle can be found here https://dev.mysql.com/doc/refman/5.6/en/non-typed-operators.html

Use Case(s)

Queries that must evaluate these expressions

@systay
Copy link
Collaborator

systay commented Aug 16, 2019

Do you have an example query that could benefit from implementing this? When do we try to execute this instead of passing it down to the actual MySQL engine?

@sougou
Copy link
Contributor

sougou commented Aug 16, 2019

There are a few in https://github.com/vitessio/vitess/blob/master/go/vt/vtgate/planbuilder/testdata/unsupported_cases.txt. For example:

# expression on a cross-shard subquery
"select id+1 from (select user.id, user.col from user join user_extra) as t"
"unsupported: expression on results of a cross-shard subquery"

@deepthi
Copy link
Member

deepthi commented Sep 12, 2019

Re-opening since multiplication and division are not yet complete.

@deepthi deepthi reopened this Sep 12, 2019
@morgo morgo added the Type: Enhancement Logical improvement (somewhere between a bug and feature) label Oct 28, 2019
@harshit-gangal
Copy link
Member

@deepthi I see the support is added now.

@deepthi
Copy link
Member

deepthi commented Oct 30, 2020

@deepthi I see the support is added now.

🎉

@deepthi deepthi closed this as completed Oct 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Logical improvement (somewhere between a bug and feature)
Projects
None yet
Development

No branches or pull requests

6 participants