Return-Path: X-Original-To: apmail-drill-issues-archive@minotaur.apache.org Delivered-To: apmail-drill-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 837EF188A6 for ; Tue, 18 Aug 2015 02:01:58 +0000 (UTC) Received: (qmail 94789 invoked by uid 500); 18 Aug 2015 02:01:45 -0000 Delivered-To: apmail-drill-issues-archive@drill.apache.org Received: (qmail 94759 invoked by uid 500); 18 Aug 2015 02:01:45 -0000 Mailing-List: contact issues-help@drill.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@drill.apache.org Delivered-To: mailing list issues@drill.apache.org Received: (qmail 94749 invoked by uid 99); 18 Aug 2015 02:01:45 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Aug 2015 02:01:45 +0000 Date: Tue, 18 Aug 2015 02:01:45 +0000 (UTC) From: "Daniel Barclay (Drill) (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DRILL-2469) JDBC : Accessing interval type through JDBC is not supported MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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)