drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Barclay (Drill) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DRILL-2469) JDBC : Accessing interval type through JDBC is not supported
Date Tue, 18 Aug 2015 02:01:45 GMT

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

Daniel Barclay (Drill) commented on DRILL-2469:
-----------------------------------------------

This is probably fixed.  (Incorrect reporting of INTERVAL types as being of type SMALLINT
was fixed.)

> JDBC : Accessing interval type through JDBC is not supported
> ------------------------------------------------------------
>
>                 Key: DRILL-2469
>                 URL: https://issues.apache.org/jira/browse/DRILL-2469
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Client - JDBC
>            Reporter: Rahul Challapalli
>            Assignee: Daniel Barclay (Drill)
>             Fix For: Future
>
>         Attachments: fewtypes.parquet
>
>
> git.commit.id.abbrev=7b4c887
> Query :
> {code}
> SELECT cast(f1.`interval_col` as interval day) AS `INTERVALDAYCOL`, cast(f1.`interval_col`
as interval month) AS `INTERVALMONTHCOL`, cast(f1.`interval_col` as interval year) AS `INTERVALYEARCOL`
FROM dfs.jdbctesting.`fewtypes.parquet` f1
> {code}
> While accessing interval types, JDBC currently returns 'SMALLINT' for the below call.
Postgres actually returns 'interval'
> {code}
> resultSetMetaData.getColumnTypeName(i);
> {code}
> However when we try to fetch the column, we get the below error
> {code}
> resultSet.getShort(1);
> org.apache.drill.exec.vector.accessor.AbstractSqlAccessor$InvalidAccessException: Requesting
class of type short for an object of type INTERVALDAY:REQUIRED is not allowed.
> 	at org.apache.drill.exec.vector.accessor.AbstractSqlAccessor.getShort(AbstractSqlAccessor.java:82)
> 	at org.apache.drill.exec.vector.accessor.IntervalDayAccessor.getShort(IntervalDayAccessor.java:87)
> 	at org.apache.drill.exec.vector.accessor.BoundCheckingAccessor.getShort(BoundCheckingAccessor.java:98)
> 	at org.apache.drill.jdbc.AvaticaDrillSqlAccessor.getShort(AvaticaDrillSqlAccessor.java:81)
> 	at net.hydromatic.avatica.AvaticaResultSet.getShort(AvaticaResultSet.java:217)
> {code}
> I attached the data file used. Let me know if you have nay questions



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

Mime
View raw message