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

fix: formula division for mysql #4543

Merged
merged 2 commits into from
Nov 30, 2022
Merged

fix: formula division for mysql #4543

merged 2 commits into from
Nov 30, 2022

Conversation

wingkwong
Copy link
Member

Change Summary

ref: #4527

  • mark CallExpression on pt.right for division
  • cast char first before casting as double for FLOAT

For select option, the data type would be enum . The existing SQL would produce the wrong result.

-- existing
(CAST(`t1` as DOUBLE)) / `t2`

-- PR
CAST(CAST(`t1` as CHAR) AS DOUBLE) / CAST(CAST(`t2` as CHAR) AS DOUBLE)

Change type

  • feat: (new feature for the user, not a new feature for build script)
  • fix: (bug fix for the user, not a fix to a build script)
  • docs: (changes to the documentation)
  • style: (formatting, missing semi colons, etc; no production code change)
  • refactor: (refactoring production code, eg. renaming a variable)
  • test: (adding missing tests, refactoring tests; no production code change)
  • chore: (updating grunt tasks etc; no production code change)

Test/ Verification

image

@wingkwong wingkwong merged commit a5160cd into develop Nov 30, 2022
@wingkwong wingkwong deleted the fix/formula-division branch November 30, 2022 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants