ESQL: Clarify docs and add csv test for WHERE in STATS#133629
ESQL: Clarify docs and add csv test for WHERE in STATS#133629alex-spies merged 10 commits intoelastic:mainfrom
Conversation
docs/reference/query-languages/esql/_snippets/commands/layout/stats-by.md
Outdated
Show resolved
Hide resolved
docs/reference/query-languages/esql/_snippets/commands/layout/stats-by.md
Outdated
Show resolved
Hide resolved
x-pack/plugin/esql/qa/testFixtures/src/main/resources/stats.csv-spec
Outdated
Show resolved
Hide resolved
x-pack/plugin/esql/qa/testFixtures/src/main/resources/stats.csv-spec
Outdated
Show resolved
Hide resolved
Co-authored-by: Bogdan Pintea <sig11@mailbox.org>
|
@alex-spies this seems to have fallen through the cracks, should this get merged? :) |
|
Hey @leemthompo , this is nearly done, but we still need to use the added examples in stats.csv-spec in the appropriate places in the docs. I meant to do this in forever, but got interrupted by higher-prio stuff. It'd be lovely if you wanted to go and finish this; otherwise, I'll get to it eventually :) |
ℹ️ Important: Docs version tagging👋 Thanks for updating the docs! Just a friendly reminder that our docs are now cumulative. This means all 9.x versions are documented on the same page and published off of the main branch, instead of creating separate pages for each minor version. We use applies_to tags to mark version-specific features and changes. Expand for a quick overviewWhen to use applies_to tags:✅ At the page level to indicate which products/deployments the content applies to (mandatory) What NOT to do:❌ Don't remove or replace information that applies to an older version 🤔 Need help?
|
|
Pinging @elastic/es-analytical-engine (Team:Analytics) |
|
Pinging @elastic/core-docs (Team:Docs) |
|
Hey @leemthompo , I hooked in the new examples into |
- `**syntax**`, `**parameters**`, `**description**` → `## h2` headings - `### examples` → `## examples` - `####` subsections promoted to `###` - `#### naming` renamed to `### omitting column names` - each example gets a concise `###` heading with a rewritten lead-in that adds context beyond the heading - `boolean_expressionx` description: tightened prose, equivalence contrast moved to two fenced `esql` blocks
|
@alex-spies I pushed a commit to refactor the page a bit because I wanna do this for all our commands to make them more readable so this is a good POC :) URL preview (will be live soon): https://docs-v3-preview.elastic.dev/elastic/elasticsearch/pull/133629/reference/query-languages/esql/commands/stats-by Old page: https://www.elastic.co/docs/reference/query-languages/esql/commands/stats-by LMKWYT |
alex-spies
left a comment
There was a problem hiding this comment.
Thanks @leemthompo , I think the new format is much better than before.
I have one nit, but we can also merge this as-is.
Let me know what you think and let's get this in :)
|
|
||
| Compare this to filtering with `WHERE` before `STATS`, which excludes | ||
| non-matching groups entirely: | ||
| ### WHERE before STATS excludes non-matching groups |
There was a problem hiding this comment.
nit: I think the following example is still part of Filter on the grouping key (by contrasting the example above). But this is fine, too.
|
Thanks @leemthompo , I'm quite pleased with the result. Thanks for your help! |
…on-sliced-reindex * upstream/main: (110 commits) Add search task watchdog to log hot threads on slow search (elastic#142746) Fix return_intermediate_results query param on get async search results (elastic#142875) Mute org.elasticsearch.compute.operator.exchange.BatchDriverTests testSinglePageSingleBatch elastic#142895 Cancel reindex body always has status (elastic#142766) Fix built-in roles sync losing updates (elastic#142433) ESQL: Clarify docs and add csv test for WHERE in STATS (elastic#133629) Fix and unmute ReindexResumeIT (elastic#142788) Fix broken release notes Mute org.elasticsearch.benchmark.vector.scorer.VectorScorerOSQBenchmarkTests testSingleScalarVsVectorized {p0=384 p1=4 p2=NIO p3=COSINE} elastic#142883 ES|QL: fix Generative tests for commands that don't change the output schema (elastic#142864) Mute org.elasticsearch.benchmark.vector.scorer.VectorScorerOSQBenchmarkTests testSingleScalarVsVectorized {p0=1024 p1=1 p2=NIO p3=DOT_PRODUCT} elastic#142881 SQL: Fix QlIllegalArgumentException with non-foldable date range queries (elastic#142386) Add more errors to the allowed_errors with github issue links (elastic#142862) ESQL: reapply "NDJSON datasource" (elastic#142855) Add implementation to update service settings method for Alibaba Cloud Search service (elastic#142738) Mute org.elasticsearch.snapshots.SnapshotShutdownIT testStartRemoveNodeButDoNotComplete elastic#142871 Mute org.elasticsearch.snapshots.SnapshotShutdownIT testDeleteSnapshotWithPausedShardSnapshots elastic#142870 Mute org.elasticsearch.snapshots.SnapshotShutdownIT testAbortSnapshotWhileRemovingNode elastic#142869 Mute org.elasticsearch.snapshots.SnapshotShutdownIT testRemoveNodeDuringSnapshot elastic#142868 ES|QL: Guard exponential_histogram TO_STRING against too large inputs (elastic#140718) ...
Co-authored-by: Bogdan Pintea <sig11@mailbox.org> Co-authored-by: Liam Thompson <leemthompo@gmail.com>
Co-authored-by: Bogdan Pintea <sig11@mailbox.org> Co-authored-by: Liam Thompson <leemthompo@gmail.com>
No description provided.