[JDBC] Change default Precison and DisplaySize for all datetime types.#185
[JDBC] Change default Precison and DisplaySize for all datetime types.#185Yury-Fridlyand merged 2 commits intointeg-fix-#923from
JDBC] Change default Precison and DisplaySize for all datetime types.#185Conversation
Signed-off-by: Yury-Fridlyand <yuryf@bitquilltech.com>
Codecov Report
@@ Coverage Diff @@
## integ-fix-#923 opensearch-project/sql#185 +/- ##
====================================================
- Coverage 98.30% 95.80% -2.51%
Complexity 3518 3518
====================================================
Files 342 352 +10
Lines 8694 9352 +658
Branches 554 673 +119
====================================================
+ Hits 8547 8960 +413
- Misses 142 334 +192
- Partials 5 58 +53
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Precison and DisplaySize for TIME and DATE types.JDBC] Change default Precison and DisplaySize for TIME and DATE types.
|
I just had a general question. What unit of measurement are |
According to docs:
|
| DATE(JDBCType.DATE, Date.class, 10, 10, false), | ||
| TIME(JDBCType.TIME, Time.class, 8, 8, false), | ||
| DATETIME(JDBCType.TIMESTAMP, Timestamp.class, 24, 24, false), | ||
| TIMESTAMP(JDBCType.TIMESTAMP, Timestamp.class, 24, 24, false), |
There was a problem hiding this comment.
Should we update DATETIME and TIMESTAMP to a precision of 9?
Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
JDBC] Change default Precison and DisplaySize for TIME and DATE types.JDBC] Change default Precison and DisplaySize for all datetime types.
Signed-off-by: Heemin Kim <heemin@amazon.com> Signed-off-by: Heemin Kim <heemin@amazon.com>
Signed-off-by: Yury-Fridlyand yuryf@bitquilltech.com
Description
The proposed fix changes default
PrecisionandDisplaySizeconfigured forTIMEandDATEtypes.opensearch-project-sql/sql-jdbc/src/main/java/org/opensearch/jdbc/types/OpenSearchType.java
Lines 146 to 147 in 522901d
Precisionis the third arg andDisplaySizeis the fourth arg.opensearch-project-sql/sql-jdbc/src/main/java/org/opensearch/jdbc/types/OpenSearchType.java
Lines 65 to 66 in 522901d
Please, note, classes referenced here
^arejava.sql.*classes, notjava.time.*ones.Timehas no fraction seconds part.Test
Before

After

Issues Resolved
opensearch-project/sql-jdbc#21
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.