apache / apache/datafusion

All struct-aware optimizations are hardcoded to `GetFieldFunc`

Open
#21,306 3 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?

Every optimization for struct field querying (row level pushdown, leaf-level projection pruning, `PushdownChecker`, `resolve_struct_field_leaves`) is gated on the `GetFieldFunc` udf.

A custom UDF like `variant_get` gets none of these optimizations. There's no trait or capability API for a UDF to declare "I'm a struct field access."

This blocks Variant support entirely unless `variant_get` decomposes to `get_field` chains or the Parquet source learns a general mechanism for struct-access UDFs

Contributor guide

Open the contributing guide

Research direction

Start by tracing the GetFieldFunc gates in row-level pushdown, leaf-level projection pruning, PushdownChecker, and resolve_struct_field_leaves. Compare how the Parquet source handles struct access and define how a capability API could let custom UDFs such as variant_get receive the same optimizations; done means those paths no longer depend solely on GetFieldFunc.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend-api-design, databases, performance
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.