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

Updated functions documentation #4232

Conversation

matthewryanwells
Copy link
Contributor

@matthewryanwells matthewryanwells commented Jun 5, 2023

Description

There were a few mistakes in the function documentation that I have fixed.

  • Added missing arithmetic operators
  • Added missing data types
  • Added missing functions
  • Fixed incorrect function usage

I also made a few general improvements to the readability of the code.

Issues Resolved

This PR is not associated with any issues

Checklist

  • By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and subject to the Developers Certificate of Origin.
    For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Copy link
Contributor

@acarbonetto acarbonetto left a comment

Choose a reason for hiding this comment

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

thanks!

_search-plugins/sql/functions.md Outdated Show resolved Hide resolved
@kolchfa-aws
Copy link
Collaborator

Thank you, @matthewryanwells, @acarbonetto, and @Yury-Fridlyand! This needs to be backported to all versions 1.3 and up, correct?

Signed-off-by: Matthew Wells <[email protected]>
@matthewryanwells matthewryanwells changed the title Updated documentation of arithmetic functions Updated functions documentation Jun 8, 2023
Copy link
Contributor

@acarbonetto acarbonetto left a comment

Choose a reason for hiding this comment

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

Looks good, please test the boolean functions and make sure that they are supported in V2

_search-plugins/sql/functions.md Outdated Show resolved Hide resolved
_search-plugins/sql/functions.md Outdated Show resolved Hide resolved
_search-plugins/sql/functions.md Outdated Show resolved Hide resolved
_search-plugins/sql/functions.md Outdated Show resolved Hide resolved
_search-plugins/sql/functions.md Outdated Show resolved Hide resolved
_search-plugins/sql/functions.md Outdated Show resolved Hide resolved
_search-plugins/sql/functions.md Outdated Show resolved Hide resolved
_search-plugins/sql/functions.md Outdated Show resolved Hide resolved
_search-plugins/sql/functions.md Outdated Show resolved Hide resolved
_search-plugins/sql/functions.md Outdated Show resolved Hide resolved
@matthewryanwells
Copy link
Contributor Author

@kolchfa-aws the documentation changes made by me, @acarbonetto, and @Yury-Fridlyand are for version 2.8 and above.

@kolchfa-aws kolchfa-aws self-assigned this Jun 12, 2023
@kolchfa-aws kolchfa-aws added the backport 2.8 PR: Backport label for 2.8 label Jun 12, 2023
@kolchfa-aws
Copy link
Collaborator

Thank you, @matthewryanwells! Do you mind surrounding all the function names in the first column with tic marks to make the PR pass the linter?

@matthewryanwells
Copy link
Contributor Author

@kolchfa-aws I have added the tics to the function names, and also went through each and every query example works as written

Copy link
Collaborator

@kolchfa-aws kolchfa-aws left a comment

Choose a reason for hiding this comment

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

Thanks so much for your contribution, @matthewryanwells!

% | `number [op] number -> number` | `SELECT 1 % 100 FROM my-index LIMIT 1`
| Function | Specification | Example |
|:---------|:-----------------------------------------------------------------|:------------------------------------------------------------------------------------|
| abs | `abs(number T) -> T` | `SELECT abs(0.5)` |
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
| abs | `abs(number T) -> T` | `SELECT abs(0.5)` |
| `abs` | `abs(number T) -> T` | `SELECT abs(0.5)` |

@kolchfa-aws kolchfa-aws merged commit 2e6016c into opensearch-project:main Jun 13, 2023
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jun 13, 2023
* Updated documentation of arithmetic functions, correct some mistakes, added missing functions

Signed-off-by: Matthew Wells <[email protected]>

* Added a few missing variable definitions

Signed-off-by: Matthew Wells <[email protected]>

* Updated arithmetic operators documentation to include symbol

Signed-off-by: Matthew Wells <[email protected]>

* removed unneeded SELECT and LIMIT

Signed-off-by: Matthew Wells <[email protected]>

* reformated table

Signed-off-by: Matthew Wells <[email protected]>

* updated data types of functions and made some corrections

Signed-off-by: Matthew Wells <[email protected]>

* removed missing brackets, fixed incorrect ifnull documentation

Signed-off-by: Matthew Wells <[email protected]>

* fixed more minor mistakes and confirmed all function examples work

Signed-off-by: Matthew Wells <[email protected]>

* added ticks to all function names to get it to pass the linter

Signed-off-by: Matthew Wells <[email protected]>

---------

Signed-off-by: Matthew Wells <[email protected]>
(cherry picked from commit 2e6016c)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
kolchfa-aws pushed a commit that referenced this pull request Jun 13, 2023
* Updated documentation of arithmetic functions, correct some mistakes, added missing functions



* Added a few missing variable definitions



* Updated arithmetic operators documentation to include symbol



* removed unneeded SELECT and LIMIT



* reformated table



* updated data types of functions and made some corrections



* removed missing brackets, fixed incorrect ifnull documentation



* fixed more minor mistakes and confirmed all function examples work



* added ticks to all function names to get it to pass the linter



---------


(cherry picked from commit 2e6016c)

Signed-off-by: Matthew Wells <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
vagimeli pushed a commit that referenced this pull request Jun 14, 2023
* Updated documentation of arithmetic functions, correct some mistakes, added missing functions

Signed-off-by: Matthew Wells <[email protected]>

* Added a few missing variable definitions

Signed-off-by: Matthew Wells <[email protected]>

* Updated arithmetic operators documentation to include symbol

Signed-off-by: Matthew Wells <[email protected]>

* removed unneeded SELECT and LIMIT

Signed-off-by: Matthew Wells <[email protected]>

* reformated table

Signed-off-by: Matthew Wells <[email protected]>

* updated data types of functions and made some corrections

Signed-off-by: Matthew Wells <[email protected]>

* removed missing brackets, fixed incorrect ifnull documentation

Signed-off-by: Matthew Wells <[email protected]>

* fixed more minor mistakes and confirmed all function examples work

Signed-off-by: Matthew Wells <[email protected]>

* added ticks to all function names to get it to pass the linter

Signed-off-by: Matthew Wells <[email protected]>

---------

Signed-off-by: Matthew Wells <[email protected]>
vagimeli added a commit that referenced this pull request Jun 15, 2023
vagimeli pushed a commit that referenced this pull request Aug 24, 2023
* Updated documentation of arithmetic functions, correct some mistakes, added missing functions

Signed-off-by: Matthew Wells <[email protected]>

* Added a few missing variable definitions

Signed-off-by: Matthew Wells <[email protected]>

* Updated arithmetic operators documentation to include symbol

Signed-off-by: Matthew Wells <[email protected]>

* removed unneeded SELECT and LIMIT

Signed-off-by: Matthew Wells <[email protected]>

* reformated table

Signed-off-by: Matthew Wells <[email protected]>

* updated data types of functions and made some corrections

Signed-off-by: Matthew Wells <[email protected]>

* removed missing brackets, fixed incorrect ifnull documentation

Signed-off-by: Matthew Wells <[email protected]>

* fixed more minor mistakes and confirmed all function examples work

Signed-off-by: Matthew Wells <[email protected]>

* added ticks to all function names to get it to pass the linter

Signed-off-by: Matthew Wells <[email protected]>

---------

Signed-off-by: Matthew Wells <[email protected]>
Signed-off-by: Melissa Vagi <[email protected]>
vagimeli added a commit that referenced this pull request Aug 24, 2023
This reverts commit 4b2fd6c.

Signed-off-by: Melissa Vagi <[email protected]>
harshavamsi pushed a commit to harshavamsi/documentation-website that referenced this pull request Oct 31, 2023
* Updated documentation of arithmetic functions, correct some mistakes, added missing functions

Signed-off-by: Matthew Wells <[email protected]>

* Added a few missing variable definitions

Signed-off-by: Matthew Wells <[email protected]>

* Updated arithmetic operators documentation to include symbol

Signed-off-by: Matthew Wells <[email protected]>

* removed unneeded SELECT and LIMIT

Signed-off-by: Matthew Wells <[email protected]>

* reformated table

Signed-off-by: Matthew Wells <[email protected]>

* updated data types of functions and made some corrections

Signed-off-by: Matthew Wells <[email protected]>

* removed missing brackets, fixed incorrect ifnull documentation

Signed-off-by: Matthew Wells <[email protected]>

* fixed more minor mistakes and confirmed all function examples work

Signed-off-by: Matthew Wells <[email protected]>

* added ticks to all function names to get it to pass the linter

Signed-off-by: Matthew Wells <[email protected]>

---------

Signed-off-by: Matthew Wells <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.8 PR: Backport label for 2.8
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants