Unexpected behavior with Cassandra connector
- Dominant language
- Java
- Stars
- 2k
- Forks
- 990
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 5
Description
**Describe the bug**
We are using Apache Drill to add ANSI SQL capabilities to cassandra, but when using the '>', '<' or 'IN' operators when filtering data, the query plan switch from a CassandraFilter to a regular Filter, meaning all the cassandra table data is scanned, fetched, then filtered, which is not the expected behavior, as the Apache Calcite plugin supports those operators.
This results in very slow queries, and high resources consumptions.
**Screenshots**
*(boitier_id, libelle, unite and periode are keys)*
*Expected behavior (using a CassandraFilter)*


*Unexpected behavior (When using lt, gt operator)*


*Possible solution to get a correct behavior, but not completely, as the whole dataset for (76, '3dProd_C1','W') is loaded insted of just the portion which we would like to use*


**Expected behavior**
The Query should use a CassandraFilter in order to fetch data efficiently, even when using '>', '<' operators, and not use a normal filter, which requires to fetch all the data from the queried table.
Should our question not belong here, feel free to remove it, but please point us to where we could ask it.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the Apache Drill Cassandra connector query plans described in the issue, comparing CassandraFilter with regular Filter for >, <, and IN predicates. Trace how these operators are translated through the Cassandra connector and Apache Calcite integration. Done means the plan retains CassandraFilter and fetches only the requested portion instead of scanning the whole table.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cassandra, java, sql
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100