Description
The root cause is that the TimestampString constructor validates a string argument with the following regular expression: ??"[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]"
+ " "
+ "[0-9][0-9]:[0-9][0-9]:[0-9][0-9](.[0-9]*[1-9])?"??
Unfortunately this rejects perfectly legal timestamp strings such as "2023-02-21 10:10:10.000".
The fix is trivial, if we agree that this is a bug. Is there a deeper reason for this validation?
There seem to be no unit tests for this TimestampString constructor.
Attachments
Issue Links
- is related to
-
CALCITE-5629 In TimestampString, allow negative years and years with more than 4 digits
- Open
-
CALCITE-1690 Calcite timestamp literals cannot express precision above millisecond, TIMESTAMP(3)
- Closed
-
CALCITE-5946 TimeString should allow fractional seconds ending in zero
- Closed