-
Notifications
You must be signed in to change notification settings - Fork 164
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
feat: add arithmetic function "power" with decimal type #660
feat: add arithmetic function "power" with decimal type #660
Conversation
ACTION NEEDED Substrait follows the Conventional Commits The PR title and description are used as the merge commit message. Please update your PR title and description to match the specification. |
options: | ||
overflow: | ||
values: [ SILENT, SATURATE, ERROR ] | ||
return: "DECIMAL<P,S>" |
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.
Will the precision and scale stay the same as a result of this operation or do we need to extend it? I suppose overflow is quickly likely so it's not a big deal if we don't rescale.
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.
max it will be Decimal(37, S), which supports factorial of max 33 (verified in duckdb and Snowflake). In both these engines type of return datatype was max size and didn't depend on input size. So I made it Decimal(38, S)
16611b3
to
4eae92a
Compare
@EpsilonPrime I don't have write access to branch. Can you kindly merge ? |
As this PR is somewhere between a new feature and a change to an existing one I'd like to get another approval for this PR before we merge it. I'll check with the other folks at the Substrait community meeting on Wednesday and will likely merge it then. |
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.
I don't think the precision/scale handling is correct here.
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 lgtm. @EpsilonPrime ?
@anshuldata can you rebase? |
50e17dc
to
9af8451
Compare
rebased it |
9af8451
to
951647c
Compare
Thank you for submitting a PR!
Before you continue, please ensure that your PR title and description (this message!) follow conventional commit syntax. Substrait uses an automated release process that, among other things, uses PR titles & descriptions to build a changelog, so the syntax and format matter!
The title of the PR should be a valid commit header.
Some examples of proper commit message headers and PR titles:
feat: add feature X
fix: X in case of Y
docs: improve documentation for X
Note the case and grammar conventions.
Furthermore, the description of any PR that includes a breaking change should contain a paragraph that starts with
BREAKING CHANGE: ...
, where...
explains what changed. The automated release process uses this to determine how it should bump the version number. Anything that changes the behavior of a plan that was previously legal is considered a breaking change; note that this includes behavior specifications that only exist in Substrait in the form of behavior descriptions on the website or in comments.