Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/changelog/116591.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 116591
summary: "[ES|QL] Add support for `byte_length` scalar function"
area: ES|QL
type: feature
issues: []
2 changes: 2 additions & 0 deletions docs/reference/esql/functions/description/bit_length.asciidoc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions docs/reference/esql/functions/description/length.asciidoc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions docs/reference/esql/functions/examples/byte_length.asciidoc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 38 additions & 0 deletions docs/reference/esql/functions/kibana/definition/bit_length.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 38 additions & 0 deletions docs/reference/esql/functions/kibana/definition/byte_length.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion docs/reference/esql/functions/kibana/definition/length.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions docs/reference/esql/functions/kibana/docs/bit_length.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions docs/reference/esql/functions/kibana/docs/byte_length.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions docs/reference/esql/functions/kibana/docs/length.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions docs/reference/esql/functions/layout/byte_length.asciidoc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions docs/reference/esql/functions/parameters/byte_length.asciidoc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions docs/reference/esql/functions/signature/byte_length.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions docs/reference/esql/functions/string-functions.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

// tag::string_list[]
* <<esql-bit_length>>
* <<esql-byte_length>>
* <<esql-concat>>
* <<esql-ends_with>>
* <<esql-from_base64>>
Expand All @@ -32,6 +33,7 @@
// end::string_list[]

include::layout/bit_length.asciidoc[]
include::layout/byte_length.asciidoc[]
include::layout/concat.asciidoc[]
include::layout/ends_with.asciidoc[]
include::layout/from_base64.asciidoc[]
Expand Down
10 changes: 10 additions & 0 deletions docs/reference/esql/functions/types/byte_length.asciidoc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -660,18 +660,19 @@ FROM sample_data
docsBitLength
required_capability: fn_bit_length
// tag::bitLength[]
FROM employees
| KEEP first_name, last_name
| EVAL fn_bit_length = BIT_LENGTH(first_name)
// end::bitLength[]
| SORT first_name
FROM airports
| WHERE country == "India"
| KEEP city
| EVAL fn_bit_length = BIT_LENGTH(city)
// end::length[]
| SORT city
| LIMIT 3
;

// tag::bitLength-result[]
first_name:keyword | last_name:keyword | fn_bit_length:integer
Alejandro |McAlpine |72
Amabile |Gomatam |56
Anneke |Preusig |48
city:keyword | fn_bit_length:integer
Agwār | 48
Ahmedabad | 72
Bangalore | 72
// end::bitLength-result[]
;
Original file line number Diff line number Diff line change
Expand Up @@ -356,22 +356,43 @@ FROM sample_data

docsLength
// tag::length[]
FROM employees
| KEEP first_name, last_name
| EVAL fn_length = LENGTH(first_name)
FROM airports
| WHERE country == "India"
| KEEP city
| EVAL fn_length = LENGTH(city)
// end::length[]
| SORT first_name
| SORT city
| LIMIT 3
;

// tag::length-result[]
first_name:keyword | last_name:keyword | fn_length:integer
Alejandro |McAlpine |9
Amabile |Gomatam |7
Anneke |Preusig |6
city:keyword | fn_length:integer
Agwār | 5
Ahmedabad | 9
Bangalore | 9
// end::length-result[]
;

docsByteLength
required_capability: fn_byte_length
// tag::byteLength[]
FROM airports
| WHERE country == "India"
| KEEP city
| EVAL fn_byte_length = BYTE_LENGTH(city)
// end::byteLength[]
| SORT city
| LIMIT 3
;

// tag::byteLength-result[]
city:keyword | fn_byte_length:integer
Agwār | 6
Ahmedabad | 9
Bangalore | 9
// end::byteLength-result[]
;

docsGettingStartedEvalNoColumnName
// tag::gs-eval-no-column-name[]
FROM sample_data
Expand Down
Loading