apache / apache/datafusion

Unifying Projections with File Reader Execs

Open
#8,075 2 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Rust
Stars
9.3k
Forks
2.4k
Avg merge
3d 7h
Merged PRs (30d)
344

Description

### Is your feature request related to a problem or challenge?

While implementing [that projection pushdown rule](https://github.com/apache/arrow-datafusion/pull/8073), a case caught my attention. In some cases, projection and file readers (such as CsvExec) can be positioned sequentially, and the sole function of the Projection is to assign aliases. In these cases, couldn't this task be handled by the readers? They can perform projections internally, and if they could also define aliases, it would simplify such plans.

### Describe the solution you'd like

While trying to eliminate projections after readers, if the projection makes aliasing, that new name can be used in the reader schema and other related outputs. The only exception is an evaluation in the projection, which cannot be operated during the read operation.

### Describe alternatives you've considered

_No response_

### Additional context

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the projection pushdown rule in PR 8073 and the file-reader execution plans such as CsvExec. Determine how eligible projections and aliases could be represented in reader schemas and related outputs while leaving computed expressions in a Projection. Done means sequential reader-plus-aliasing-Projection plans are eliminated without moving unsupported evaluations into the read operation.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
data-engineering
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.