Skip to content

Commit 8c5db83

Browse files
Yury-Fridlyandgithub-actions[bot]
authored andcommitted
Fix default precision and maxSize for all datetime types. (#39)
Signed-off-by: Yury-Fridlyand <[email protected]> Signed-off-by: Yury-Fridlyand <[email protected]> (cherry picked from commit 6e963e0)
1 parent 750949f commit 8c5db83

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main/java/org/opensearch/jdbc/types/OpenSearchType.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@ public enum OpenSearchType {
6262
IP(JDBCType.VARCHAR, String.class, 15, 0, false),
6363
NESTED(JDBCType.STRUCT, null, 0, 0, false),
6464
OBJECT(JDBCType.STRUCT, null, 0, 0, false),
65-
DATE(JDBCType.DATE, Date.class, 24, 24, false),
66-
TIME(JDBCType.TIME, Time.class, 24, 24, false),
67-
DATETIME(JDBCType.TIMESTAMP, Timestamp.class, 24, 24, false),
68-
TIMESTAMP(JDBCType.TIMESTAMP, Timestamp.class, 24, 24, false),
65+
DATE(JDBCType.DATE, Date.class, 10, 10, false),
66+
TIME(JDBCType.TIME, Time.class, 8, 8, false),
67+
DATETIME(JDBCType.TIMESTAMP, Timestamp.class, 29, 29, false),
68+
TIMESTAMP(JDBCType.TIMESTAMP, Timestamp.class, 29, 29, false),
6969
BINARY(JDBCType.VARBINARY, String.class, Integer.MAX_VALUE, 0, false),
7070
NULL(JDBCType.NULL, null, 0, 0, false),
7171
UNDEFINED(JDBCType.NULL, null, 0, 0, false),

0 commit comments

Comments
 (0)