mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-29 01:44:36 -04:00
SQL: Implement TRIM function (#57518)
Add `TRIM` function which combines the functionality of both `LTRIM` and `RTRIM` by stripping both leading and trailing whitespaces. Refers to #41195
This commit is contained in:
parent
a9338672c5
commit
6c86c919e1
13 changed files with 200 additions and 12 deletions
|
@ -129,6 +129,7 @@
|
|||
** <<sql-functions-string-rtrim>>
|
||||
** <<sql-functions-string-space>>
|
||||
** <<sql-functions-string-substring>>
|
||||
** <<sql-functions-string-trim>>
|
||||
** <<sql-functions-string-ucase>>
|
||||
* <<sql-functions-type-conversion>>
|
||||
** <<sql-functions-type-conversion-cast>>
|
||||
|
|
|
@ -477,6 +477,26 @@ SUBSTRING(
|
|||
--------------------------------------------------
|
||||
include-tagged::{sql-specs}/docs/docs.csv-spec[stringSubString]
|
||||
--------------------------------------------------
|
||||
[[sql-functions-string-trim]]
|
||||
==== `TRIM`
|
||||
|
||||
.Synopsis:
|
||||
[source, sql]
|
||||
--------------------------------------------------
|
||||
TRIM(string_exp) <1>
|
||||
--------------------------------------------------
|
||||
*Input*:
|
||||
|
||||
<1> string expression
|
||||
|
||||
*Output*: string
|
||||
|
||||
*Description*: Returns the characters of `string_exp`, with leading and trailing blanks removed.
|
||||
|
||||
[source, sql]
|
||||
--------------------------------------------------
|
||||
include-tagged::{sql-specs}/docs/docs.csv-spec[stringTrim]
|
||||
--------------------------------------------------
|
||||
|
||||
[[sql-functions-string-ucase]]
|
||||
==== `UCASE`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue