PradeepSrinivasan62350531

Unable to query cassandra CQL queries with where condition

Discussion created by PradeepSrinivasan62350531 on Nov 2, 2015

Unable to query Cassandra CQL queries with where condition. Able to retrieves data for a count query successfully, but throwing following error when a where condition CQL queried in LISA.

 

Failing Query: SELECT * FROM keyspace.table where key=8678648301;

Error: java.sql.SQLDataException: Could not find key comparator for: us_wm_item_inventory_price.us_wm_item_inventory_price

  at org.apache.cassandra.cql.jdbc.CassandraPreparedStatement.makeSelect(CassandraPreparedStatement.java:213)

  at org.apache.cassandra.cql.jdbc.CassandraPreparedStatement.makeCql(CassandraPreparedStatement.java:177)

  at org.apache.cassandra.cql.jdbc.CassandraPreparedStatement.executeQuery(CassandraPreparedStatement.java:267)

  at com.itko.lisa.jdbc.JDBCNode.makeGenericCall(JDBCNode.java:457)

  at com.itko.lisa.jdbc.JDBCNode.executeSQL(JDBCNode.java:383)

  at com.itko.lisa.jdbc.JDBCNodeEditor.doExec(JDBCNodeEditor.java:483)

  at com.itko.lisa.jdbc.JDBCNodeEditor.access$500(JDBCNodeEditor.java:57)

  at com.itko.lisa.jdbc.JDBCNodeEditor$6.doCallback(JDBCNodeEditor.java:417)

  at com.itko.util.swing.panels.ProcessingDialog$2.run(ProcessingDialog.java:194)

  at java.lang.Thread.run(Unknown Source)

 

Working Query: SELECT count(*) FROM keyspace.table;

Result: Working fine

 

Test script - Connect to Cassandra using LISA

Step Used - SQL Database Execution (JDBC)

JDBC Driver - org.apache.cassandra.cql.jdbc.CassandraDriver

Connection String - jdbc:cassandra://<Cassandra_node>:<port>/<keyspace>

Outcomes