Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
3.0.0-beta1
-
None
Description
Trim useful timestamp part:
CREATE TABLE timestamps(id INTEGER PRIMARY KEY, i TIMESTAMP(9)); INSERT INTO timestamps VALUES (101, TIMESTAMP '2023-03-29 08:22:33.005007'); SELECT i from timestamps; <--- expect inserted, obtain trimmed : 2023-03-29 08:22:33.005
The root cause :
RelJson#toJson() -> getValue3 -> getValue2 ->
RexLiteral#getValueAs ->
case TIMESTAMP:
if (clazz == Long.class)
Also CURRENT_TIMESTAMP return only 3 digits after last dot, don`t take into account TIMESTAMP(precision)
The same for default value :
testInsertDefaultValue ->
DdlSqlToCommandConverter#fromLiteral
case TIMESTAMP:
Attachments
Issue Links
- Blocked
-
CALCITE-5266 Increase precision of TIMESTAMP, INTERVAL types to microseconds, nanoseconds
- Open
-
CALCITE-5308 Add support to Avatica for microsecond-precision timestamps
- Open
- fixes
-
IGNITE-19000 testCurrentDateTimeTimeStamp fails on Windows
- Open
- incorporates
-
IGNITE-15418 Calcite engine. TIMESTAMPDIFF function returns INTEGER type for MICROSECOND time unit
- Open
- is related to
-
IGNITE-15622 Calcite. TIME and TIMESTAMP types are trim milliseconds.
- Resolved
- links to