Matt Burgess created DRILL-1640:
-----------------------------------

             Summary: 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


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)

Reply via email to