mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-30 02:13:33 -04:00
SQL: Implement ::
cast operator (#38774)
`<expression>::<dataType>` is a simplified altenative syntax to `CAST(<expression> AS <dataType> which exists in PostgreSQL and provides an improved user experience and possibly more compact SQL queries. Fixes: #38717
This commit is contained in:
parent
12eac6ad4b
commit
032bcf99d6
13 changed files with 1099 additions and 954 deletions
|
@ -126,9 +126,21 @@ include-tagged::{sql-specs}/arithmetic.sql-spec[multiply]
|
|||
include-tagged::{sql-specs}/arithmetic.sql-spec[divide]
|
||||
--------------------------------------------------
|
||||
|
||||
* https://en.wikipedia.org/wiki/Modulo_operation[Modulo] or Reminder(`%`)
|
||||
* https://en.wikipedia.org/wiki/Modulo_operation[Modulo] or Remainder(`%`)
|
||||
|
||||
["source","sql",subs="attributes,callouts,macros"]
|
||||
--------------------------------------------------
|
||||
include-tagged::{sql-specs}/arithmetic.sql-spec[mod]
|
||||
--------------------------------------------------
|
||||
|
||||
[[sql-operators-cast]]
|
||||
=== Cast Operators
|
||||
|
||||
* Cast (`::`)
|
||||
|
||||
`::` provides an alternative syntax to the <<sql-functions-type-conversion-cast>> function.
|
||||
|
||||
["source","sql",subs="attributes,callouts,macros"]
|
||||
--------------------------------------------------
|
||||
include-tagged::{sql-specs}/docs.csv-spec[conversionStringToLongCastOperator]
|
||||
--------------------------------------------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue