Skip to content

Add datafusion.extract #958

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

Closed
wants to merge 3 commits into from
Closed

Add datafusion.extract #958

wants to merge 3 commits into from

Conversation

kosiew
Copy link
Contributor

@kosiew kosiew commented Nov 26, 2024

Which issue does this PR close?

Completes a task in #463

Rationale for this change

This PR introduces the implementation of the EXTRACT function, which allows extracting specific temporal units (e.g., YEAR, MONTH, DAY) from date or timestamp fields. It is an alias of date_part.

What changes are included in this PR?

Functionality:
Adds the implementation of the EXTRACT subscalar function, it supports extracting temporal units like YEAR, MONTH, DAY, etc., from supported date, timestamp, and time data types.

Tests:
Adds tests for EXTRACT.

Are there any user-facing changes?

Yes, this PR adds the EXTRACT function to the API, enabling users to perform temporal extraction operations directly.

* Add list_cat, list_concat

* Add list_repeat

* docs: add examples for list_cat, list_concat, and list_repeat functions

* Amend list_repeat code example - literal

* Amend list_ to array_ in documentation
@kosiew kosiew closed this Nov 26, 2024
@kosiew kosiew deleted the add-extract branch November 26, 2024 07:57
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.

1 participant