Skip to content

Conversation

@izveigor
Copy link
Contributor

@izveigor izveigor commented Apr 5, 2023

Which issue does this PR close?

Part of #5838

Rationale for this change

What changes are included in this PR?

Hyperbolic functions and inverse hyperbolic functions:

  • Asinh
  • Acosh
  • Atanh
  • Sinh
  • Cosh
  • Tanh

Are these changes tested?

Partially

Are there any user-facing changes?

Yes

@github-actions github-actions bot added core Core DataFusion crate logical-expr Logical plan and expressions physical-expr Changes to the physical-expr crates labels Apr 5, 2023
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Thank you @izveigor -- this is looking great


### `cbrt`

Returns the cube root of a number.
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

Copy link
Contributor

Choose a reason for hiding this comment

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

Thank you for cleaning this up in "drive by" fashion 👍

test_expression!("asin(NULL)", "NULL");
test_expression!("acos(NULL)", "NULL");
test_expression!("atan(NULL)", "NULL");
test_expression!("sinh(NULL)", "NULL");
Copy link
Contributor

Choose a reason for hiding this comment

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

I am sorry if I missed it in my review, but are these new functions tested with non null inputs?

Specifically it would be great to see a sql level test that invoked them with values

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, I didn’t test them, because there are not certain tests(or I miss them) for scalar mathematical functions. I think we should merge the changes and “Pi” implementation(for trigonometric functions) and after that finish PR #5887 with all scalar functions. What do you think, @alamb?

@alamb
Copy link
Contributor

alamb commented Apr 10, 2023

#5887 looks good to me -- thank you @izveigor

@alamb alamb merged commit bbc7169 into apache:main Apr 10, 2023
@izveigor izveigor mentioned this pull request Apr 10, 2023
6 tasks
korowa pushed a commit to korowa/arrow-datafusion that referenced this pull request Apr 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Core DataFusion crate logical-expr Logical plan and expressions physical-expr Changes to the physical-expr crates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants