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

Provide DataFrame API for map and move map to functions-array #11560

Merged
merged 5 commits into from
Jul 22, 2024

Conversation

goldmedal
Copy link
Contributor

@goldmedal goldmedal commented Jul 20, 2024

Which issue does this PR close?

Closes #11546 .

Rationale for this change

What changes are included in this PR?

Are these changes tested?

yes

Are there any user-facing changes?

Add a function

@github-actions github-actions bot added the core Core DataFusion crate label Jul 20, 2024

#[tokio::test]
async fn test_fn_map() -> Result<()> {
let expr = map(vec![lit("a"), lit("b"), lit("c")], vec![lit(1), lit(2), lit(3)]);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I expected the DataFrame user can use map like this.

@goldmedal goldmedal force-pushed the feature/11546-map-df-api branch from f43bd10 to 670e245 Compare July 21, 2024 16:00
@goldmedal goldmedal changed the title Draft: Provide DataFrame API for map Provide DataFrame API for map and move map to functions-array Jul 21, 2024
@goldmedal goldmedal marked this pull request as ready for review July 21, 2024 16:42
@jayzhan211
Copy link
Contributor

Can we also add map to roundtrip_expr_api?

Copy link
Contributor

@jayzhan211 jayzhan211 left a comment

Choose a reason for hiding this comment

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

👍

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.

I agree map makes sense to be in the functions-array crate. Thank you @goldmedal and @jayzhan211

@alamb alamb merged commit 51da92f into apache:main Jul 22, 2024
26 checks passed
@goldmedal
Copy link
Contributor Author

Thanks @jayzhan211 and @alamb for reviewing!

@goldmedal goldmedal deleted the feature/11546-map-df-api branch July 22, 2024 14:05
Lordworms pushed a commit to Lordworms/arrow-datafusion that referenced this pull request Jul 23, 2024
…pache#11560)

* move map to `functions-array` and implement dataframe api

* add benchmark for dataframe api

* fix format

* add roundtrip_expr_api test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core DataFusion crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Easier Dataframe API for map
3 participants