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

Additional support for docs for ES|QL operators and version-specific differentiation #125251

Merged
merged 19 commits into from
Mar 24, 2025

Conversation

craigtaverner
Copy link
Contributor

@craigtaverner craigtaverner commented Mar 19, 2025

This PR was originally focused on improving support for Kibana docs, in particular the missing operator docs, but it has expanded to cover a bunch of related things:

  • Primarily the main work was to improve operators support. ESQL generated docs cover all functions and most operators for which their is a clear operator class and test class. However, some are built-in behaviour and need additional support. This PR adds more generated content for those operators.
  • Various specific operators requested by Kibana: Cast & null-predicates, and in particular the addition of examples
  • Two functions without examples: mv_append and to_date_nanos
  • Many small visual document cleanups (spelling, grammar, capitalization, etc.)
  • Initial support for applies_to for multi-version differentiation.

This last point requires more work, as it is not yet agreed on just how we want this to look. We'll probably need to do refinements in followup PR. Consider the version in this PR as a first step into how this could look.

@craigtaverner craigtaverner added >docs General docs changes Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) :Analytics/ES|QL AKA ESQL labels Mar 19, 2025
@elasticsearchmachine elasticsearchmachine added the Team:Docs Meta label for docs team label Mar 19, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-docs (Team:Docs)

@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-analytical-engine (Team:Analytics)

@craigtaverner craigtaverner changed the title Additional support for docs for ES|QL operators Additional support for docs for ES|QL operators and version-specific differentiation Mar 21, 2025
Copy link
Contributor

@drewdaemon drewdaemon left a comment

Choose a reason for hiding this comment

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

The Kibana stuff looks great. I like the links and it's great to have these MD files for the inline docs.

There are some incorrect return types in the new operator JSON definitions. It would be nice to see those be accurate, but if it looks too hard, we can explore a plan B.

@@ -5,7 +5,7 @@ This is generated by ESQL’s AbstractFunctionTestCase. Do no edit it. See ../RE
### ABS
Returns the absolute value.

```
```esql

Choose a reason for hiding this comment

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

I have a script that already adds it on the kibana side. If you are going to add it always I can remove it from the kibana implementation but if this is something that wil get missed is better to remove it from here and let kibana handle it. Is it added manually or by a script?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added by script. It turned out that the two places I added the back-ticks were not identical. We need it for the normal docs, but missed it for the Kibana docs. Considering how I'd like to try move the two places closer together (reuse more code), it is better if I keep adding it.

Choose a reason for hiding this comment

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

ok makes sense, I will remove it from our script then

@craigtaverner craigtaverner merged commit 8ffecb4 into elastic:main Mar 24, 2025
16 checks passed
craigtaverner added a commit to craigtaverner/elasticsearch that referenced this pull request Mar 24, 2025
stratoula added a commit to elastic/kibana that referenced this pull request Mar 24, 2025
…S docs already (#215631)

## Summary

This PR elastic/elasticsearch#125251 adds
highlighting for the code blocks so it is not needed to be added on the
kibana side. This PR removes it.

I didnt run the script because it will remove the highlighting. It will
run next Monday with @craigtaverner 's PR being merged
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Mar 24, 2025
…S docs already (elastic#215631)

## Summary

This PR elastic/elasticsearch#125251 adds
highlighting for the code blocks so it is not needed to be added on the
kibana side. This PR removes it.

I didnt run the script because it will remove the highlighting. It will
run next Monday with @craigtaverner 's PR being merged

(cherry picked from commit 935fc0f)
JoseLuisGJ pushed a commit to JoseLuisGJ/kibana that referenced this pull request Mar 24, 2025
…S docs already (elastic#215631)

## Summary

This PR elastic/elasticsearch#125251 adds
highlighting for the code blocks so it is not needed to be added on the
kibana side. This PR removes it.

I didnt run the script because it will remove the highlighting. It will
run next Monday with @craigtaverner 's PR being merged
kibanamachine added a commit to elastic/kibana that referenced this pull request Mar 24, 2025
…d by ES docs already (#215631) (#215720)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[ES|QL] Removes highlighting from script as it is being provided by
ES docs already
(#215631)](#215631)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Stratoula
Kalafateli","email":"efstratia.kalafateli@elastic.co"},"sourceCommit":{"committedDate":"2025-03-24T14:17:12Z","message":"[ES|QL]
Removes highlighting from script as it is being provided by ES docs
already (#215631)\n\n## Summary\n\nThis PR
elastic/elasticsearch#125251 adds\nhighlighting
for the code blocks so it is not needed to be added on the\nkibana side.
This PR removes it.\n\nI didnt run the script because it will remove the
highlighting. It will\nrun next Monday with @craigtaverner 's PR being
merged","sha":"935fc0f7588f0efd06a40a98b929a28933869743","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Feature:ES|QL","Team:ESQL","backport:version","v9.1.0","v8.19.0"],"title":"[ES|QL]
Removes highlighting from script as it is being provided by ES docs
already","number":215631,"url":"https://github.com/elastic/kibana/pull/215631","mergeCommit":{"message":"[ES|QL]
Removes highlighting from script as it is being provided by ES docs
already (#215631)\n\n## Summary\n\nThis PR
elastic/elasticsearch#125251 adds\nhighlighting
for the code blocks so it is not needed to be added on the\nkibana side.
This PR removes it.\n\nI didnt run the script because it will remove the
highlighting. It will\nrun next Monday with @craigtaverner 's PR being
merged","sha":"935fc0f7588f0efd06a40a98b929a28933869743"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/215631","number":215631,"mergeCommit":{"message":"[ES|QL]
Removes highlighting from script as it is being provided by ES docs
already (#215631)\n\n## Summary\n\nThis PR
elastic/elasticsearch#125251 adds\nhighlighting
for the code blocks so it is not needed to be added on the\nkibana side.
This PR removes it.\n\nI didnt run the script because it will remove the
highlighting. It will\nrun next Monday with @craigtaverner 's PR being
merged","sha":"935fc0f7588f0efd06a40a98b929a28933869743"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/ES|QL AKA ESQL >docs General docs changes Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) Team:Docs Meta label for docs team v9.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants