apache / apache/datafusion

Placeholder types not inferred for `date_bin` (and possibly other functions depending on the signature)

Open
#19,471 3 comments 1 reaction 0 assignees View on GitHub
Dominant language
Rust
Stars
9.3k
Forks
2.4k
Avg merge
3d 7h
Merged PRs (30d)
344

Description

```sql
explain select date_bin($resolution::interval, now());
```

Fails with:

```
Error during planning: Failed to coerce arguments to satisfy a call to 'date_bin' function: coercion from Null, Timestamp(ns) to the signature ...
```

I'm not sure if something could be done here, but I wanted to note it.

cc @phillipleblanc

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the SQL example with the interval placeholder and inspect DataFusion's date_bin signature resolution and argument coercion during planning. Determine whether placeholder types should be inferred for date_bin and related signature-dependent functions; the issue is resolved when the example plans successfully with the expected interval type.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, sql
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.