Repository navigation
docs: explain dialect requirement for lambda examples #26040
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -49,7 +49,7 @@ make_higher_order_function_expr_and_func!( | |
|
|
||
| #[user_doc( | ||
| doc_section(label = "Array Functions"), | ||
| description = "transforms the values of an array", | ||
| description = "transforms the values of an array. Lambda expressions require a dialect that supports them; set `datafusion.sql_parser.dialect` to `DuckDB` because the default dialect does not parse the `->` syntax.", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Optional follow-up: consider adding a DuckDB smoke test to the existing array-transform SLT, verifying that |
||
| syntax_example = "array_transform(array, lambda)", | ||
| sql_example = r#"```sql | ||
| > select array_transform([1, 2, 3, 4, 5], x -> x*2); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Optional: consider adding
SET datafusion.sql_parser.dialect = 'DuckDB';before the SQL example, and similarly for the other three functions, so each example is self-contained. The existing prose is already correct; if you adopt this, please update the source examples and regenerate the reference.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Prajwal-k-tech can you please address @kosiew 's comments?