Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Lambda examples in the SQL function docs fail with the default dialect

Open Beginner friendly
#25,960 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
85/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Active
Tech stack
rust, sql
Domain
documentation

Research direction

Start with the #[user_doc] attributes for any_match, array_filter, array_first, and array_transform, then inspect dev/update_function_docs.sh and the generated scalar_functions.md entries. Run the examples in datafusion-cli with the default and a supported lambda dialect; done means the documentation explains the dialect requirement and the generated examples are accurate.

Written by the indexing model from the issue text.

Description

Describe the bug

The SQL reference examples for any_match, array_filter, array_first and array_transform use lambda syntax (x -> x > 2), but none of them run in datafusion-cli with the default dialect. The -> is not parsed as a lambda, so the error points at the parameter instead:

> select array_filter([1, 2, 3, 4, 5], x -> x > 2);
Error: Schema error: No field named x.

The same happens for the other three examples. They work after switching to a dialect whose supports_lambda_functions() is true (databricks, duckdb, snowflake, spark, clickhouse):

> set datafusion.sql_parser.dialect = 'duckdb';
> select array_filter([1, 2, 3, 4, 5], x -> x > 2);
[3, 4, 5]

The sqllogictest files for these functions already do this (array_transform.slt and array_any_match.slt start with set datafusion.sql_parser.dialect = databricks;), so the requirement is known; the user guide just doesn't mention it.

To Reproduce

datafusion-cli built from main at 4d167a1, then any of the four documented examples.

Expected behavior

Either the docs say that lambdas need one of those dialects (a note on each function, or once at the top of the higher-order functions section), or lambdas parse under the default dialect. The note is the small fix. Happy to send a PR for it, generated through dev/update_function_docs.sh from the #[user_doc] attributes.

Additional context

Found by running every SQL example in scalar_functions.md against a main build. Written with Claude Code (Claude Opus 5.5).

Dominant language
Rust
Stars
9.4k
Forks
2.5k
Avg merge
3d 17h
Merged PRs (30d)
383

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/datafusion

All issues in apache/datafusion

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.