Diveyam Mishra created CALCITE-7618:
---------------------------------------
Summary: Add filter pushdown support to the file adapter's CSV
table implementation
Key: CALCITE-7618
URL: https://issues.apache.org/jira/browse/CALCITE-7618
Project: Calcite
Issue Type: Improvement
Components: file-adapter
Reporter: Diveyam Mishra
Assignee: Diveyam Mishra
Currently, Apache Calcite has two distinct CSV adapter implementations:
1. `example/csv` (demo adapter under `org.apache.calcite.adapter.csv`)
2. `file` (production file adapter under `org.apache.calcite.adapter.file`)
*The Problem*
While `example/csv` supports three flavors of tables (`SCANNABLE`, `FILTERABLE`
with equality filter pushdown, and `TRANSLATABLE`), the `file` adapter only
implements `CsvTranslatableTable`.
Because of this, the `file` adapter only supports projection pushdown and lacks
any filter pushdown support, meaning queries using filters on file-adapter
tables cannot push down filter evaluation.
Interestingly, `org.apache.calcite.adapter.file.CsvEnumerator` already includes
`filterValues` logic to skip rows matching simple equality filters. However,
there is no corresponding `CsvFilterableTable` or planning rule in the `file`
adapter module to pass filters down to it.
*Proposed Sol.*
Add filter pushdown capability to the `file` adapter, either by introducing a
`CsvFilterableTable` implementation (analogous to the example adapter) or
adding a planner rule to push down filters into the scan.
+*PS : Thats my first time creating an Issue do let me know if i missed any imp
detail*+
--
This message was sent by Atlassian Jira
(v8.20.10#820010)