Dates are shifted by 1 day using JDBC Driver

For some reason the JDBC driver results are shifting Dates by a day. I’m querying a parquet file.

Dremio CSV download - Matches Dremio UI

2017-09-18T00:00:00.000 397.6321
2017-09-19T00:00:00.000 398.07657
2017-09-20T00:00:00.000 398.32816
2017-09-21T00:00:00.000 397.12952
2017-09-22T00:00:00.000 397.39453

Exact same Dremio SQL Query using JDBC Driver

9/18/2017 398.07657
9/19/2017 398.32816
9/20/2017 397.12952
9/21/2017 397.39453
9/22/2017 397.39453

Running the query with a specific day in JDBC returns back:

where as_of = ‘2017-09-19’

as_of tri_price
9/18/2017 398.07657

I checked the data with both Apache Drill and Apache Spark and both returned the back the correct date and price. Looks like a Dremio JDBC specific problem,

Spark SQL using SparkR
Drill SQL using Drill UI
Drill SQL using Drill JDBC

and as_of = ‘2017-09-19’

as_of tri_price
9/19/2017 398.07657

Hey @david.lee,

can you share which version of the server and the driver you are using, along with the query profile?

Community Edition
Build Time
10/09/2017 18:56:36
Change Hash
Change Time
10/09/2017 18:49:44

JDBC Driver:

Profile Attached: (3.4 KB)

I tried downgrading to 1.2.1, but it has the same problem… 1.1.0 has the bug that doesn’t read dates properly: -11355-04-22

The example above returns back in Dremio UI

SELECT * FROM “temp”.“0_0_0.parquet” where as_of = ‘2009-07-06’ limit 10


But the same query using a JDBC BI tool or R (using RJDBC) gives:

msr as_of tri_price
F000002N19 7/5/2009 25.04
F000002OWJ 7/5/2009 22.646044
F000002VFB 7/5/2009 19.32
F000002XFA 7/5/2009 50.10911
F00000J3JR 7/5/2009 80.568016
F00000LVTA 7/5/2009 35.206165
FEUSA00001 7/5/2009 121.10718
FEUSA00002 7/5/2009 104.68655
FEUSA00003 7/5/2009 36.369663
FEUSA00004 7/5/2009 128.56389

Thanks @david.lee, we have been able to reproduce the issue and we will be working on a fix.

Hey @david.lee,

just to let you know we released Dremio 1.3.0 which contains the fix for this issue.