heavyai / heavyai-jdbc

A JDBC driver for connecting to an HeavyAI GPU database and running queries.
https://www.heavy.ai/
Other
9 stars 16 forks source link

JDBC gives inconsistent date values for their years 1600 or below #16

Open njmarshall opened 7 years ago

njmarshall commented 7 years ago

To reproduce the issue

  1. Create a table and populate two dates including years of 1500 and 1600 on MAPDQL CREATE TABLE t_date(id SMALLINT, val DATE); INSERT INTO t_date VALUES(1, '1500-01-01'); INSERT INTO t_date VALUES(2, '1600-01-01');

  2. Run the SQL stmt against MAPD SELECT * FROM t_date ORDER BY id;

  3. Run the SQL stmt against MAPD thru JDBC SELECT * FROM t_date ORDER BY id;

Data Results from No. 2

id|val 1|1500-01-01 2|1600-01-01

Data Results from No. 3

id|val 1|1499-12-23 2|1600-01-01

Explanation

Noticeably, JDBC displaying the date for the row 1 is not the same as MAPD. JDBC displays "1499-12-23" as supposedly matched with "1500-01-01" from MAPD DB. Does this difference tell JDBC doing date validation than MAPD?

According to NOSQL's document, the range for the Date datatype is from 1000-01-01 to 9999-12-31. Is that correct?

njmarshall commented 7 years ago

@dwayneberry Do you think the JDBC functionality for datatype displays should be identical to MAPD?

dwayneberry commented 7 years ago

@njmarshall we are in the weeds here. Are you familiar with the 'Council of Trent'. The calendar under went modifications in this time period to readjust.

dwayneberry commented 7 years ago

Sorry didn't mean to close it.

dwayneberry commented 7 years ago

I'm not sure where we would stand regarding UTC to pre "Council of Trent" definitely a conversation to be had over a beer :-)

njmarshall commented 7 years ago

Yes, my purpose is to find anything necessary to be fixed, improved or upgraded for rising a level of the software quality.