drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karol Potocki (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DRILL-4200) drill-jdbc-storage: applies timezone to java.sql.Date field and fails
Date Tue, 15 Dec 2015 13:36:46 GMT
Karol Potocki created DRILL-4200:
------------------------------------

             Summary: drill-jdbc-storage: applies timezone to java.sql.Date field and fails
                 Key: DRILL-4200
                 URL: https://issues.apache.org/jira/browse/DRILL-4200
             Project: Apache Drill
          Issue Type: Bug
          Components: Storage - Other
    Affects Versions: 1.3.0
         Environment: drill-jdbc-storage plugin configured (based on https://drill.apache.org/docs/rdbms-storage-plugin)
with org.relique.jdbc.csv.CsvDriver to access dbf (dbase) files.
            Reporter: Karol Potocki


When using org.relique.jdbc.csv.CsvDriver to query files with date fields (i.e. 2012-05-01)
causes:

{code}
UnsupportedOperationException: Method not supported: ResultSet.getDate(int, Calendar)
{code}

In JdbcRecordReader.java:406  there is getDate which tries to apply timezone to java.sql.Date
which probably is not timezone related and this brings the error.

Quick fix is to use ResultSet.getDate(int) instead.

Details:
{code}
Caused by: java.lang.UnsupportedOperationException: Method not supported: Result
Set.getDate(int, Calendar)
        at org.relique.jdbc.csv.CsvResultSet.getDate(Unknown Source) ~[csvjdbc-1
.0-28.jar:na]
        at org.apache.commons.dbcp.DelegatingResultSet.getDate(DelegatingResultS
et.java:574) ~[commons-dbcp-1.4.jar:1.4]
        at org.apache.commons.dbcp.DelegatingResultSet.getDate(DelegatingResultS
et.java:574) ~[commons-dbcp-1.4.jar:1.4]
        at org.apache.drill.exec.store.jdbc.JdbcRecordReader$DateCopier.copy(Jdb
cRecordReader.java:406) ~[drill-jdbc-storage-1.4.0-SNAPSHOT.jar:1.4.0-SNAPSHOT]
        at org.apache.drill.exec.store.jdbc.JdbcRecordReader.next(JdbcRecordRead
er.java:242) ~[drill-jdbc-storage-1.4.0-SNAPSHOT.jar:1.4.0-SNAPSHOT]
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message