Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-2664

JDBC driver for CQL works only with Strings

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Invalid
    • Fix Version/s: None
    • Component/s: CQL
    • Labels:
    • Environment:

      It happens to JDBC driver for both: 0.8.0 beta version and 0.8.0-rc1

      Description

      CassandraPreparedStatement.java

      Line 141:

      String stringParam = makeCqlString(type.toString(param));

      It crashes with ClassCastException for all parameters that are not Strings. It is because, when the method applyDualBindings is called from makeUpdate it ALWAYS get one and the same "type" as parameter. In fact it is a comparator of columnfamily itself.

      In my case it is UTF8Type. And UTF8Type.toString() method expects only Strings.

      I think it must be column-dependent.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              ro_man Roman Kuzmin
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 4h
                4h
                Remaining:
                Remaining Estimate - 4h
                4h
                Logged:
                Time Spent - Not Specified
                Not Specified