Skip to content

Conversation

@jkosh44
Copy link
Contributor

@jkosh44 jkosh44 commented Feb 11, 2025

This commit adds nested expressions to the CLI by default so users can run functions like array_slice and other nested expressions.

Which issue does this PR close?

None

Rationale for this change

It can be confusing for users that nested expressions don't work in the CLI by default. The error message is not that helpful either, for example:

DataFusion CLI v45.0.0
> select array_slice([1,2,3], 1, 2);
Error during planning: Invalid function 'array_slice'.
Did you mean 'array_agg'?

This PR enables them by default to avoid this confusion.

Are these changes tested?

No

Are there any user-facing changes?

No

This commit adds nested expressions to the CLI by default so users can
run functions like `array_slice` and other nested expressions.
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @jkosh44 -- makes sense to me

@alamb
Copy link
Contributor

alamb commented Feb 11, 2025

I think this is a regression -- likely due to

Thanks for finding and fixing this @jkosh44

DataFusion CLI v45.0.0
> select array_slice([1,2,3], 1, 2);
+-----------------------------------------------------------+
| make_array(Int64(1),Int64(2),Int64(3))[Int64(1):Int64(2)] |
+-----------------------------------------------------------+
| [1, 2]                                                    |
+-----------------------------------------------------------+
1 row(s) fetched.
Elapsed 0.012 seconds.

@alamb alamb merged commit 2cccd58 into apache:main Feb 11, 2025
26 checks passed
@jkosh44 jkosh44 deleted the cli-nested-expressions branch February 11, 2025 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants