Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
Calcite doesn't allow system functions to be specified with parenthesis who doesn't accept arguments.
For eg:-
CURRENT_DATE() is illegal whereas CURRENT_DATE is expected.
At validation level:- SqlValidatorImpl#validateCall
if ((call.operandCount() == 0) && (operator.getSyntax() == SqlSyntax.FUNCTION_ID) && !call.isExpanded()) { // For example, "LOCALTIME()" is illegal. (It should be // "LOCALTIME", which would have been handled as a // SqlIdentifier.) throw handleUnresolvedFunction(call, (SqlFunction) operator, ImmutableList.<RelDataType>of(), null); }
Attachments
Issue Links
- is blocked by
-
CALCITE-1766 Support system functions having no args with parenthesis too
- Closed