From 6e963e08c60f80c720d151ad8e9ddc64a024bd50 Mon Sep 17 00:00:00 2001 From: Yury-Fridlyand Date: Thu, 5 Jan 2023 12:51:04 -0800 Subject: [PATCH] Fix default `precision` and `maxSize` for all datetime types. (#39) Signed-off-by: Yury-Fridlyand Signed-off-by: Yury-Fridlyand --- .../java/org/opensearch/jdbc/types/OpenSearchType.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/opensearch/jdbc/types/OpenSearchType.java b/src/main/java/org/opensearch/jdbc/types/OpenSearchType.java index dd2c193..e7329a7 100644 --- a/src/main/java/org/opensearch/jdbc/types/OpenSearchType.java +++ b/src/main/java/org/opensearch/jdbc/types/OpenSearchType.java @@ -62,10 +62,10 @@ public enum OpenSearchType { IP(JDBCType.VARCHAR, String.class, 15, 0, false), NESTED(JDBCType.STRUCT, null, 0, 0, false), OBJECT(JDBCType.STRUCT, null, 0, 0, false), - DATE(JDBCType.DATE, Date.class, 24, 24, false), - TIME(JDBCType.TIME, Time.class, 24, 24, false), - DATETIME(JDBCType.TIMESTAMP, Timestamp.class, 24, 24, false), - TIMESTAMP(JDBCType.TIMESTAMP, Timestamp.class, 24, 24, false), + DATE(JDBCType.DATE, Date.class, 10, 10, false), + TIME(JDBCType.TIME, Time.class, 8, 8, false), + DATETIME(JDBCType.TIMESTAMP, Timestamp.class, 29, 29, false), + TIMESTAMP(JDBCType.TIMESTAMP, Timestamp.class, 29, 29, false), BINARY(JDBCType.VARBINARY, String.class, Integer.MAX_VALUE, 0, false), NULL(JDBCType.NULL, null, 0, 0, false), UNDEFINED(JDBCType.NULL, null, 0, 0, false),