[Bug]: Cassandra syntax error when user passes query with no where clause

What happened?

The current method for query input parsing on CassandraIO assumes such query necessarily comes with a 'where' clause, which leads to an invalid resulting statement when this is not the case.

Example of the current behavior:

Input query:

select partition_col, other_col from keyspace.table

Resulting invalid query:

select partition_col, other_col from keyspace.table AND token(partition_col) >= ? and token(partition_col) < ?

Resulting error:

SyntaxException: [...] mismatched input 'AND' expecting EOF (..., other_col from keyspace.table [AND]...)

Issue Priority

Priority: 2 (default / most bugs should be filed as P2)

Issue Components

  • Component: Python SDK
  • Component: Java SDK
  • Component: Go SDK
  • Component: Typescript SDK
  • Component: IO connector
  • Component: Beam examples
  • Component: Beam playground
  • Component: Beam katas
  • Component: Website
  • Component: Spark Runner
  • Component: Flink Runner
  • Component: Samza Runner
  • Component: Twister2 Runner
  • Component: Hazelcast Jet Runner
  • Component: Google Cloud Dataflow Runner