[ 
https://issues.apache.org/jira/browse/DRILL-4200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15059838#comment-15059838
 ] 

Karol Potocki commented on DRILL-4200:
--------------------------------------

This [thread|http://stackoverflow.com/a/2306051] might be helpful.

The issue seems related with 
[DRILL-3882|https://issues.apache.org/jira/browse/DRILL-3882].

> 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)

Reply via email to