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

Implement exp/pow function #7725

Closed
4 tasks done
lmatz opened this issue Feb 6, 2023 · 6 comments
Closed
4 tasks done

Implement exp/pow function #7725

lmatz opened this issue Feb 6, 2023 · 6 comments
Labels
good first issue Good for newcomers help wanted Issues that need help from contributors user-facing-changes Contains changes that are visible to users
Milestone

Comments

@lmatz
Copy link
Contributor

lmatz commented Feb 6, 2023

https://www.postgresql.org/docs/7.4/functions-math.html:

Function                  | Return Type
exp(dp or numeric)        | (same as input)
pow(a dp, b dp)           | dp
pow(a numeric, b numeric) | numeric
@github-actions github-actions bot added this to the release-0.1.17 milestone Feb 6, 2023
@lmatz lmatz added good first issue Good for newcomers help wanted Issues that need help from contributors user-facing-changes Contains changes that are visible to users priority/high labels Feb 6, 2023
@lmatz
Copy link
Contributor Author

lmatz commented Feb 6, 2023

maybe exclude Decimal/Numeric first

@snipekill
Copy link
Contributor

Hey Imatz, I wanted to contribute to the project, can you help me point out right resources and code pointers for implementing this.

@lmatz lmatz self-assigned this Feb 8, 2023
@lmatz
Copy link
Contributor Author

lmatz commented Feb 8, 2023

Hey Imatz, I wanted to contribute to the project, can you help me point out right resources and code pointers for implementing this.

Hi @snipekill , thanks for your interest in this feature!
But since it is urgent, I am just going to implement it. Are you interested in some other issues? We are happy to help 😃

@lmatz lmatz removed good first issue Good for newcomers help wanted Issues that need help from contributors labels Feb 8, 2023
mergify bot pushed a commit that referenced this issue Feb 8, 2023
As per the title.

Right now, both x and y are casted into Float64 when pow(x, y).
By PG's standard, we also need to support Decimal but Decimal has no built-in pow and we may also change the underlying crate for Decimal. So we leave it aside for now.

Urgently requested by user.

#7725

Approved-By: st1page
Approved-By: TennyZhuang
@lmatz
Copy link
Contributor Author

lmatz commented Feb 8, 2023

          If we cast them in frontend, I guess we can only support a concrete implementation (f64,f64)->f64 instead of a general one.

Originally posted by @TennyZhuang in #7789 (comment)

@neverchanje
Copy link
Contributor

Any updates for exp()?

@lmatz
Copy link
Contributor Author

lmatz commented Feb 18, 2023

Decimal unsupported yet, only double precision.

After choosing a new Decimal crate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Issues that need help from contributors user-facing-changes Contains changes that are visible to users
Projects
None yet
Development

No branches or pull requests

3 participants