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

Implement mode function #12385

Closed
wants to merge 1 commit into from
Closed

Conversation

demetribu
Copy link
Contributor

Which issue does this PR close?

Closes #12248

Rationale for this change

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

@github-actions github-actions bot added physical-expr Physical Expressions sqllogictest SQL Logic Tests (.slt) functions labels Sep 8, 2024
@alamb
Copy link
Contributor

alamb commented Sep 16, 2024

RElated comment: #12254 (comment)

@demetribu
Copy link
Contributor Author

Hi @alamb,

Could you help me choose the right approach?

I’ve started working on this issue. We chose "mode" as the first function for datafusion-functions-extra, but I’ve run into a challenge. My implementation involves patching ArrowBytesMap with new methods.

Should I first patch ArrowBytesMap and then wait for the new release of the DataFusion core, or is there a more efficient way to proceed?

@alamb
Copy link
Contributor

alamb commented Sep 20, 2024

Should I first patch ArrowBytesMap and then wait for the new release of the DataFusion core, or is there a more efficient way to proceed?

I would recommend:

  1. Make a PR to update the new method
  2. In the code of datafusion-functions-extra make a copy of ArrowBytesMap with the new methods you need with a link back to the PR that adds the APIs

That way you'll be unblocked but still have a path to avoid a second copy of the bytes map

@demetribu
Copy link
Contributor Author

@alamb thank you!

@demetribu
Copy link
Contributor Author

Implemented: mode.rs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
functions physical-expr Physical Expressions sqllogictest SQL Logic Tests (.slt)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support mode in Aggregation function
2 participants