Picosecond support#1365
Conversation
e2fb822 to
589051a
Compare
589051a to
1852d5f
Compare
|
|
||
| void InsertTimestampData(std::shared_ptr<ODBCHandles> const& conn, | ||
| std::vector<SQL_TIMESTAMP_STRUCT> rows, | ||
| std::vector<std::string> rows, |
There was a problem hiding this comment.
why is this modified?
There was a problem hiding this comment.
Timestamp struct only contains fractions upto 9 digits. We are utilising this func in picoseconds as well.Hence updated it.
1852d5f to
4a7a338
Compare
| << (row.minute < 10 ? "0" : "") << row.minute << ":" | ||
| << (row.second < 10 ? "0" : "") << row.second << "." | ||
| << row.fraction << "'"; | ||
| // if (row.year != 0) { |
There was a problem hiding this comment.
there are so many of these unnecessary code, remove it if not needed
| std::string insert_stmt_str = insert_stmt.str(); | ||
| SQLRETURN status; | ||
|
|
||
| std::cout << "Insert Timestamp Statement: " << insert_stmt_str << std::endl; |
There was a problem hiding this comment.
please remove these prints
64602a3 to
41805f5
Compare
| *res_len = kTimestampBinaryLength; | ||
| } | ||
| timestamp_src_struct.fraction = timestamp_src_struct.fraction * 1000; | ||
| timestamp_src_struct.fraction = timestamp_src_struct.fraction; |
There was a problem hiding this comment.
why we removed this 1000 factor here?
There was a problem hiding this comment.
Because it was always converting to nanoseconds. even when not needed.
| &ts.month, &ts.day, &ts.hour, &ts.minute, &ts.second, µ); | ||
| } | ||
|
|
||
| if (matched < 6) { |
There was a problem hiding this comment.
how is this working? we have duplicate blocks of if condition and if needed see if can be combined
|
@Khushikathuria008 also add full test cases output |
5b972cb to
17776b4
Compare
|
|
||
| DSRow CreateDSRowFromTypeInfo(TypeInfoRow const& type_info) { | ||
| bool IsTimeRelated(TypeInfoRow const& type_info) { | ||
| return type_info.sql_data_type == SQL_TYPE_TIMESTAMP || |
There was a problem hiding this comment.
have we verified Date also has picoseconds support?
There was a problem hiding this comment.
Yes. date doesnt support it.
17776b4 to
e0750c8
Compare
e0750c8 to
12494e8
Compare
9e4d292 to
12494e8
Compare
This is a test PR created to validate picosecond support in the driver.
The following changes were made as part of this validation:
Create callback:
Insert Callback:
Select Callback:
Drop callback:
Full test-suite run on local:
