I want to run the following query using Java driver. In CQL, to find count of a partition, I can do select count(*) from table where field1 = “x” ;. What is the equivalent of count() in QueryBuilder? So far, to find the no. of rows returned, I have used
val resultSet = session.execute(partitionSizeQuery)
/*is this the most efficient way to find the size of ResultSet??*/
val resultSetSize = resultSet.all.size
where Query is QueryBuilder.select().from(tableName).where(QueryBuilder.eq("field1", somevalue)). But I am not sure if this is the right way