-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add cbrt function to the PPL #171
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -662,3 +662,27 @@ Example:: | |
| 2.0 | 2.1 | | ||
+-----------+--------------+ | ||
|
||
CBRT | ||
---- | ||
|
||
Description | ||
>>>>>>>>>>> | ||
|
||
Usage: Calculates the cube root of a number | ||
|
||
Argument type: INTEGER/LONG/FLOAT/DOUBLE | ||
|
||
Return type DOUBLE: | ||
|
||
INTEGER/LONG/FLOAT/DOUBLE -> DOUBLE | ||
|
||
Example:: | ||
|
||
opensearchsql> source=location | eval `CBRT(8)` = CBRT(8), `CBRT(9.261)` = CBRT(9.261), `CBRT(-27)` = CBRT(-27) | fields `CBRT(8)`, `CBRT(9.261)`, `CBRT(-27)`; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we use source=people, do we just get a single row of results? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, we get 12 rows, |
||
fetched rows / total rows = 2/2 | ||
+-----------+---------------+-------------+ | ||
| CBRT(8) | CBRT(9.261) | CBRT(-27) | | ||
|-----------+---------------+-------------| | ||
| 2.0 | 2.1 | -3.0 | | ||
| 2.0 | 2.1 | -3.0 | | ||
+-----------+---------------+-------------+ |
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 think the functions in here might be organized in Alphabetical order? It might be good to move this function documentation up.