Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.30.0
Description
SqlDatePartFunction#rewriteCall does not check operands length for now, and it will be rewrite to EXTRACT unconditionally before validation.
E.g.
select week(); -- will throw ArrayIndexOutOfBoundsException select week(date '2022-04-27', 1); -- will just ignore second param
However, these cases should throw validation exceptions, because week actually only accept 1 operand.
Attachments
Issue Links
- is related to
-
CALCITE-5167 SqlOperator#rewriteCall does not give accurate validation error
- In Progress
-
CALCITE-1606 Add missing support for datetime JDBC functions
- Closed
- links to