Off by one on column index retrieval in 
org.apache.cassandra.cql.jdbc.CResultSet getColumn
------------------------------------------------------------------------------------------

                 Key: CASSANDRA-3413
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3413
             Project: Cassandra
          Issue Type: Bug
          Components: Drivers
    Affects Versions: 1.0.0
            Reporter: Max Penet


Hello,

Right now when using org.apache.cassandra.cql.jdbc.CResultSet getColumn to 
retrieve col data you will always be missing the first one. 

ex: SELECT name, pwd from user; 
returns only pwd.

The issue is at 
http://code.google.com/a/apache-extras.org/p/cassandra-jdbc/source/browse/src/org/apache/cassandra/cql/jdbc/CResultSet.java#348

The call to checkIndex passes, but the values.get(index) call causes the lookup 
to go over the ArrayList size. 

This needs to be changed to:

values.get(index - 1)

patch file: 
http://code.google.com/a/apache-extras.org/p/cassandra-jdbc/issues/attachmentText?id=4&aid=40000000&name=patchfile&token=b3a8df347e76a90ca4837a3771bf2406
 



--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to