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

feat: add i64 variant for exp, ln, log10, log2 and logb functions #628

Merged
merged 1 commit into from
Apr 17, 2024

Conversation

JazabC
Copy link
Contributor

@JazabC JazabC commented Apr 16, 2024

This PR adds i64 as an argument to exp, ln, log10, log2 and logb functions

@CLAassistant
Copy link

CLAassistant commented Apr 16, 2024

CLA assistant check
All committers have signed the CLA.

Copy link

ACTION NEEDED

Substrait follows the Conventional Commits
specification
for
release automation.

The PR title and description are used as the merge commit message. Please update your PR title and description to match the specification.

@JazabC JazabC changed the title feat:add i64 as arg for arithmetic and log functions feat: add i64 as arg for arithmetic and log functions Apr 16, 2024
@JazabC JazabC marked this pull request as ready for review April 16, 2024 19:19
Copy link
Member

@vbarua vbarua left a comment

Choose a reason for hiding this comment

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

Thanks for adding these!

The definitions follow a similar pattern as sqrt, which only defines an i64 variant (alongside fp32 and fp64).

It might make sense to add variants for i8, i16 and i32, but it's an open-question (IMO) about whether these should return fp32 or fp64. I think the i64 to fp64 make sense generally.

@vbarua vbarua changed the title feat: add i64 as arg for arithmetic and log functions feat: add i64 variant for exp, ln, log10, log2 and logb functions Apr 16, 2024
Copy link
Member

@westonpace westonpace left a comment

Choose a reason for hiding this comment

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

One question but I think the answer is just "yes".

Comment on lines +14 to +15
on_domain_error:
values: [ NAN, "NULL", ERROR ]
Copy link
Member

Choose a reason for hiding this comment

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

Domain error here is negative integers?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, the domain error will be negative integers/floats

@vbarua vbarua merged commit fef2253 into substrait-io:main Apr 17, 2024
16 of 17 checks passed
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.

5 participants