[#7518] Parse CURRENT DATE as a synonym for CURRENT_DATE. Same for TIME[STAMP]
This commit is contained in:
parent
809286d325
commit
403a7351d4
@ -646,11 +646,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_DATE' ) [ '(' ')' ]
|
||||
| ( 'CURRENT' 'SCHEMA' | 'CURRENT_SCHEMA' ) [ '(' ')' ]
|
||||
| ( 'CURRENT' 'TIME' | 'CURRENT_TIME' ) [ '(' ')' ]
|
||||
| ( 'CURRENT' 'TIMESTAMP' | 'CURRENT_TIMESTAMP' ) [ '(' ')' ]
|
||||
| ( 'CURRENT' 'USER' | 'CURRENT_USER' ) [ '(' ')' ]
|
||||
| 'CURDATE' '(' ')'
|
||||
| 'CURTIME' '(' ')'
|
||||
| dateLiteral
|
||||
|
||||
@ -4471,9 +4471,9 @@ final class ParserImpl implements Parser {
|
||||
if (S.is(type))
|
||||
if ((field = parseFieldConcatIf(ctx)) != null)
|
||||
return field;
|
||||
else if (parseKeywordIf(ctx, "CURRENT_SCHEMA") && (parseIf(ctx, '(') && parse(ctx, ')') || true))
|
||||
else if ((parseKeywordIf(ctx, "CURRENT_SCHEMA") || parseKeywordIf(ctx, "CURRENT SCHEMA")) && (parseIf(ctx, '(') && parse(ctx, ')') || true))
|
||||
return currentSchema();
|
||||
else if (parseKeywordIf(ctx, "CURRENT_USER") && (parseIf(ctx, '(') && parse(ctx, ')') || true))
|
||||
else if ((parseKeywordIf(ctx, "CURRENT_USER") || parseKeywordIf(ctx, "CURRENT USER")) && (parseIf(ctx, '(') && parse(ctx, ')') || true))
|
||||
return currentUser();
|
||||
|
||||
if (N.is(type))
|
||||
@ -4495,11 +4495,11 @@ final class ParserImpl implements Parser {
|
||||
return field;
|
||||
|
||||
if (D.is(type))
|
||||
if (parseKeywordIf(ctx, "CURRENT_DATE") && (parseIf(ctx, '(') && parse(ctx, ')') || true))
|
||||
if ((parseKeywordIf(ctx, "CURRENT_DATE") || parseKeywordIf(ctx, "CURRENT DATE")) && (parseIf(ctx, '(') && parse(ctx, ')') || true))
|
||||
return currentDate();
|
||||
else if (parseKeywordIf(ctx, "CURRENT_TIMESTAMP") && (parseIf(ctx, '(') && parse(ctx, ')') || true))
|
||||
else if ((parseKeywordIf(ctx, "CURRENT_TIMESTAMP") || parseKeywordIf(ctx, "CURRENT TIMESTAMP")) && (parseIf(ctx, '(') && parse(ctx, ')') || true))
|
||||
return currentTimestamp();
|
||||
else if (parseKeywordIf(ctx, "CURRENT_TIME") && (parseIf(ctx, '(') && parse(ctx, ')') || true))
|
||||
else if ((parseKeywordIf(ctx, "CURRENT_TIME") || parseKeywordIf(ctx, "CURRENT TIME")) && (parseIf(ctx, '(') && parse(ctx, ')') || true))
|
||||
return currentTime();
|
||||
else if (parseFunctionNameIf(ctx, "CURDATE") && parse(ctx, '(') && parse(ctx, ')'))
|
||||
return currentDate();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user