[
https://issues.apache.org/jira/browse/CALCITE-7618?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18090763#comment-18090763
]
Julian Hyde commented on CALCITE-7618:
--------------------------------------
[~diveyam02], That's a pretty good first issue! Frankly I prefer issues that
focus on 'what's wrong' rather than 'how to fix it', which is what you did.
If there's an example every user would understand - say a query on a CSV source
and the desired plan - then I would include that.
Remember to use jira-style formatting: brace-brace rather than backtick.
Of your proposed solutions, I would prefer the one that adds a planner rule (or
rules). It allows more intelligence at planning time (e.g. dealing with filters
that cannot be pushed down).
> 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
> Priority: Minor
>
> 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)