opensearch-project / sql-jdbc

This is the driver for JDBC connectivity to a cluster running with OpenSearch SQL support.
Apache License 2.0
14 stars 25 forks source link

[BUG] ResultSet.getTime(index, calendar) returns null #20

Open kylepbit opened 2 years ago

kylepbit commented 2 years ago

What is the bug? Retrieving time with a calendar always returns null.

How can one reproduce the bug? Steps to reproduce the behavior:

  1. Have some time data
  2. Invoke ResultSet.getTime(index, calendar) to try and get the time
  3. See null as the result, always

Looking at the code, it's simply hardcoded to return null.

What is the expected behavior? A non-null value reflecting the retrieved time.

What is your host/environment?

Yury-Fridlyand commented 2 years ago

https://github.com/opensearch-project/sql/blob/4b50a014c6f5701f3061ad950073895b39f68a67/sql-jdbc/src/main/java/org/opensearch/jdbc/ResultSetImpl.java#L1072-L1082

acarbonetto commented 1 year ago

Note: getDate and getTimestamp is already implemented for this feature, and it seems like getTime is simple enough to add.