Skip to content
This repository has been archived by the owner on Jul 20, 2023. It is now read-only.

Support write timestamp data type #62

Merged
merged 2 commits into from
Mar 14, 2021
Merged

Support write timestamp data type #62

merged 2 commits into from
Mar 14, 2021

Conversation

shawnzhu
Copy link
Contributor

Supports #54

@shawnzhu
Copy link
Contributor Author

With this PR, it can create table with columns with desired timestamp precision:

create table warehouse.kzhu_test.test_dt_2 AS select * from warehouse.kzhu_test.test_dt with no data;

However, when inserting data, I got error:

presto:kzhu_test> insert INTO warehouse.kzhu_test.test_dt (conf_start, conf_end) VALUES (localtimestamp(6), localtimestamp(3));

Query 20210313_041743_00010_nizs7, FAILED, 1 node
Splits: 35 total, 17 done (48.57%)
4.03 [0 rows, 0B] [0 rows/s, 0B/s]

Query 20210313_041743_00010_nizs7 failed: [jcc][1091][10824][4.25.13] Invalid data conversion: Parameter instance 2021-03-12T23:17:43.772400 is invalid for the requested conversion. ERRORCODE=-4461, SQLSTATE=42815

presto:kzhu_test> select * from warehouse.kzhu_test.test_dt;

Query 20210313_042206_00011_nizs7, FAILED, 1 node
Splits: 17 total, 0 done (0.00%)
1.68 [0 rows, 0B] [0 rows/s, 0B/s]

Query 20210313_042206_00011_nizs7 failed: [jcc][t4][1092][13956][4.25.13] Invalid data conversion: Wrong result column type for requested conversion. ERRORCODE=-4461, SQLSTATE=42815

@shawnzhu
Copy link
Contributor Author

The exception from #54 (comment) will be fixed by fb9b75a

@shawnzhu shawnzhu marked this pull request as ready for review March 14, 2021 18:54
@shawnzhu shawnzhu merged commit bacf6c6 into main Mar 14, 2021
@shawnzhu shawnzhu deleted the timestamp branch March 14, 2021 19:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant