Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
njmarshall opened this issue Jun 29, 2017 · 5 comments
Open

Comments

@njmarshall
Copy link

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
Copy link
Author

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

@dwayneberry
Copy link
Contributor

@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
Copy link
Contributor

Sorry didn't mean to close it.

@dwayneberry
Copy link
Contributor

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
Copy link
Author

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

@randyzwitch randyzwitch transferred this issue from heavyai/heavydb Jun 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants