apache / apache/datafusion

Add support for function chaining and the dot syntax for function calls

Open
#12,206 5 comments 7 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?

Similar to https://github.com/duckdb/duckdb/discussions/6717. It would be awesome if datafusion could support function chaining as well.

Instead of
```sql
SELECT list_aggregate( list_filter( numbers, x -> x > 40 ) , 'count') as greater_than_40s
FROM relation
```

function chaining
```sql
SELECT numbers.filter( x -> x > 40).aggregate('count') as greater_than_40s
FROM relation
```

### Describe the solution you'd like

_No response_

### Describe alternatives you've considered

use current syntax

### Additional context

https://github.com/duckdb/duckdb/pull/6725

Contributor guide

Open the contributing guide

Research direction

Start by comparing the requested DataFusion syntax with the DuckDB discussion 6717 and pull request 6725, then trace how the existing list_filter and list_aggregate SQL forms are handled. Done means function chaining and dot-style calls work as equivalent expressions while preserving the current syntax.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, sql
Domain
databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.