-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Support default precision and scale toCAST <EXPR> AS DECIMAL
#2680
Support default precision and scale toCAST <EXPR> AS DECIMAL
#2680
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2680 +/- ##
==========================================
+ Coverage 84.63% 84.66% +0.03%
==========================================
Files 267 270 +3
Lines 46867 46921 +54
==========================================
+ Hits 39665 39726 +61
+ Misses 7202 7195 -7
Continue to review full report at Codecov.
|
@gandronchik can you please provide a description of this PR (namely what problem it is solving)? It is likely obvious to you but it isn't immediately obvious to me and it is much faster to review a PR (and get it merged) if we don't have to spend time researching the "why this change" and instead can focus on "is the change in behavior desired" and "does the code implemented the desired change in behavior" 🙏 thank you |
Sure, I will do it next time. I'm sorry for the inconvenience 🙏 |
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.
Thanks @gandronchik -- the description makes it much easier to understand what this PR was attempting to do.
CAST <EXPR> AS DECIMAL
7552bd9
to
2fc34f0
Compare
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.
Looks great -- thanks @gandronchik
CAST <EXPR> AS DECIMAL
CAST <EXPR> AS DECIMAL
* chore: default precision and scale for cast decimal improve ok * fix decimal type max precision size (#48) * minor * add tests
Hello! I am an employee of Cube.js. We use cast to0 decimal with default params. Thank you!
Which issue does this PR close?
Not exists
Rationale for this change
Postgres allow to cast to decimal in the following ways:
CAST(10 as Decimal(38, 10))
CAST(10 as Decimal(38))
CAST(10 as Decimal)
What changes are included in this PR?
Are there any user-facing changes?
Ability to cast to decimal with default params