OpenSearch/x-pack/plugin/sql
Marios Trivyzas 3fd081528d
SQL: Allow current_date/time/timestamp to be also used as a function escape pattern ()
CURRENT_DATE/CURRENT_TIME/CURRENT_TIMESTAMP can be used as SQL keywords
(without parentheses) and therefore there is a special rule in the
grammar to accommodate this.

Previously, this rule was also catching the parenthesised version of those functions too,
not allowing the {fn <functionName>()} to be used. E.g.:
{fn current_time(2)} or {fn current_timestamp()}

Now, the grammar rule catches only the keyword versions and all the parenthesised
versions go through the normal function resolution. As a consequence the validation
of the precision is moved from the parser lever (ExpressionBuilder) to the function
implementations.

Fixes: 
(cherry picked from commit bfbc9f140144b5a35aa29008b58bf58074419853)
2019-04-17 10:13:16 +03:00
..
jdbc SQL: Change schema calls to empty set () 2019-04-10 13:14:12 +03:00
qa SQL: Fix LIMIT bug in agg sorting () 2019-04-16 22:40:41 +03:00
sql-action SQL: Add multi_value_field_leniency inside FieldHitExtractor () 2019-03-18 14:56:03 +02:00
sql-cli [Backport] Replace usages RandomizedTestingTask with built-in Gradle Test () () 2019-04-09 11:52:50 -07:00
sql-client SQL: Prefer resultSets over exceptions in metadata () 2019-04-08 16:45:34 +03:00
sql-proto SQL: Introduce SQL TIME data type () 2019-04-01 23:57:27 +02:00
src SQL: Allow current_date/time/timestamp to be also used as a function escape pattern () 2019-04-17 10:13:16 +03:00
build.gradle [Backport] Replace usages RandomizedTestingTask with built-in Gradle Test () () 2019-04-09 11:52:50 -07:00