You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Matt Burgess (JIRA)" <ji...@apache.org> on 2014/11/05 18:04:33 UTC

[jira] [Updated] (DRILL-1640) DrillColumnMetaDataList does not implement List methods

     [ https://issues.apache.org/jira/browse/DRILL-1640?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matt Burgess updated DRILL-1640:
--------------------------------
    Attachment: DRILL-1640.patch.1

Attached proposed patch

> DrillColumnMetaDataList does not implement List methods
> -------------------------------------------------------
>
>                 Key: DRILL-1640
>                 URL: https://issues.apache.org/jira/browse/DRILL-1640
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Client - JDBC
>            Reporter: Matt Burgess
>         Attachments: DRILL-1640.patch.1
>
>
> DrillColumnMetaDataList extends from org.apache.drill.jdbc.BasicList, which does not implement much of the List interface (it usually throws UnsupportedOperationExceptions).
> One of these methods, iterator(), is called when searching for columns by name in the result set. Using the JDBC API, if you call DrillResultSet.getString("myColumnName"), you get something like the following stack trace:
> Caused by: java.lang.UnsupportedOperationException
> 	at org.apache.drill.jdbc.BasicList.iterator(BasicList.java:44)
> 	at org.apache.drill.jdbc.DrillColumnMetaDataList.iterator(DrillColumnMetaDataList.java:34)
> 	at net.hydromatic.avatica.AvaticaResultSet.findColumn0(AvaticaResultSet.java:69)
> 	at net.hydromatic.avatica.AvaticaResultSet.getAccessor(AvaticaResultSet.java:102)
> 	at net.hydromatic.avatica.AvaticaResultSet.getString(AvaticaResultSet.java:270)
> DrillColumnMetaDataList should behave as a proper list.



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