[#7518] CURRENT_DATE and CURRENT_DATE() are both possible (and similar functions, too)

This commit is contained in:
Lukas Eder 2018-08-22 10:33:47 +02:00
parent eaccc7897b
commit 0e7aa2e4b0
2 changed files with 7 additions and 7 deletions

View File

@ -637,11 +637,11 @@ term =
| 'COUNT' '(' ( '*' | [ 'DISTINCT' | 'ALL' ] field ) ')' [ keep | filter ] [ over ]
| 'CUME_DIST' ( '(' ')' over | '(' fields ')' withinGroup )
| 'CURRVAL' '(' ( name | stringLiteral ) ')'
| 'CURRENT_DATE'
| 'CURRENT_SCHEMA'
| 'CURRENT_TIME'
| 'CURRENT_TIMESTAMP'
| 'CURRENT_USER'
| 'CURRENT_DATE' [ '(' ')' ]
| 'CURRENT_SCHEMA' [ '(' ')' ]
| 'CURRENT_TIME' [ '(' ')' ]
| 'CURRENT_TIMESTAMP' [ '(' ')' ]
| 'CURRENT_USER' [ '(' ')' ]
| 'CURDATE' '(' ')'
| 'CURTIME' '(' ')'
| dateLiteral

View File

@ -4470,9 +4470,9 @@ final class ParserImpl implements Parser {
if (S.is(type))
if ((field = parseFieldConcatIf(ctx)) != null)
return field;
else if (parseKeywordIf(ctx, "CURRENT_SCHEMA"))
else if (parseKeywordIf(ctx, "CURRENT_SCHEMA") && (parseIf(ctx, '(') && parse(ctx, ')') || true))
return currentSchema();
else if (parseKeywordIf(ctx, "CURRENT_USER"))
else if (parseKeywordIf(ctx, "CURRENT_USER") && (parseIf(ctx, '(') && parse(ctx, ')') || true))
return currentUser();
if (N.is(type))