Open ankurgupta4891 opened 3 years ago
I checked the code and the reason of mapping Date
to Date
after 1.13 is because our new query engine was enabled: https://github.com/opendistro-for-elasticsearch/sql/blob/opendistro-1.13.0.0-rc1/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/plugin/SqlSettings.java#L60.
From then on, original Elasticsearch date is returned as Timestamp
because internally Elasticsearch only has epoch. Only date function may return Date
type value. Could you please provide test data and query? Need more context to confirm if this is the root cause. Thanks!
Prior 1.13 driver release
Date
type was mappedjava.sql.TimeStamp
which carries time information but usingjava.sql.Date
drops time information and set values to00:00:00.000
. This makes the driver backward incompatible.https://github.com/opendistro-for-elasticsearch/sql/blob/7eeb805173196e81b23bd2234a1b626a7233ddae/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/types/ElasticsearchType.java#L75