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

SQL: [docs] Add documentation for COALESCE #35740

Merged
merged 2 commits into from
Nov 21, 2018

Conversation

matriv
Copy link
Contributor

@matriv matriv commented Nov 20, 2018

Follows: #35253

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search-aggs

Copy link
Contributor

@astefan astefan left a comment

Choose a reason for hiding this comment

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

Left two comments.

----
COALESCE ( expression<1>, expression<2>, ... )
----

Copy link
Contributor

Choose a reason for hiding this comment

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

Enumerating the parameters should happen in a section called Input. Also, there has to be an Output section. Something like:

==== `COALESCE`

.Synopsis:
[source, sql]
--------------------------------------------------
COALESCE ( expression<1>, expression<2>, ... )
--------------------------------------------------

*Input*:

<1> 1st expression
<2> 2nd expression
....

*Output*: one expression or `null`

.Description:

Returns the first of its arguments that is not null.
If all arguments are null, then it returns `null`.

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, I would add in the description (to enforce the ... in the parameters list), that the function can take an arbitrary number of arguments.

Copy link
Contributor

Choose a reason for hiding this comment

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

The statement about arbitrary number of arguments is there. Please, ignore my comment.

@matriv
Copy link
Contributor Author

matriv commented Nov 20, 2018

@astefan Thank you! pushed fixup.

Copy link
Contributor

@astefan astefan left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@costin costin left a comment

Choose a reason for hiding this comment

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

LGTM

@costin costin added the >docs General docs changes label Nov 20, 2018
@matriv matriv merged commit b1818db into elastic:master Nov 21, 2018
@matriv matriv deleted the mt/docs-coalesce branch November 21, 2018 00:43
matriv pushed a commit that referenced this pull request Nov 21, 2018
@matriv
Copy link
Contributor Author

matriv commented Nov 21, 2018

Backported to 6.x with 2f19570

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/SQL SQL querying >docs General docs changes v6.6.0 v7.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants