Skip to content
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

Add empty scalar function (alias of array_empty), fix a small typo #938

Merged
merged 2 commits into from
Nov 1, 2024

Conversation

kosiew
Copy link
Contributor

@kosiew kosiew commented Oct 30, 2024

Which issue does this PR close?

Completes a task in #463

Rationale for this change

This PR introduces a new function empty as alias of array_empty, to check if an array is empty, returning a boolean.

What changes are included in this PR?

Added the empty function.
Updated the Python bindings in functions.py and provided unit tests for empty in test_functions.py.
Updated the documentation (expressions.rst) to include examples on how to use the new empty function.

Are there any user-facing changes?

The array_empty function is now available for users working with arrays. It is exposed both in Rust and Python, allowing users to check whether arrays are empty within their DataFusion queries.

There are no breaking changes to public APIs.

Copy link
Contributor

@timsaucer timsaucer left a comment

Choose a reason for hiding this comment

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

Thank you!

@timsaucer timsaucer merged commit aedffe0 into apache:main Nov 1, 2024
15 checks passed
timsaucer pushed a commit to timsaucer/datafusion-python that referenced this pull request Nov 9, 2024
…pache#938)

* feat: add `empty` function as alias of array_empty

* fix: correct typo in null_treatment parameter documentation
@kosiew kosiew deleted the add-empty branch November 25, 2024 07:06
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