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

lexsort_to_indices may output larger size than input #4087

Closed
jychen7 opened this issue Apr 14, 2023 · 3 comments
Closed

lexsort_to_indices may output larger size than input #4087

jychen7 opened this issue Apr 14, 2023 · 3 comments
Labels
arrow Changes to the arrow crate bug development-process Related to development process of arrow-rs

Comments

@jychen7
Copy link
Contributor

jychen7 commented Apr 14, 2023

Describe the bug
Not sure if it is arrow-rs bug. This issue is created to track
We find a problem in apache/datafusion#3747 (comment)

To Reproduce
TBD

Expected behavior
sort output size should be <= input size (smaller is expected when it is partial sort, i.e. top K)

Additional context

@tustvold
Copy link
Contributor

tustvold commented Apr 14, 2023

I don't think the size of the underlying buffers is something we guarantee, whilst one could argue that we should correctly estimate the output buffers to not be larger than the inputs, this is not guaranteed.

Perhaps you might explain why this is a problem?

Edit: I'm also a little confused as the DataFusion issue does not appear to relate to lexsort_to_indices but seems to be about MutableArrayData?

@tustvold
Copy link
Contributor

Closing this as I've not heard back, feel free to reopen if still an issue

@tustvold tustvold closed this as not planned Won't fix, can't repro, duplicate, stale May 22, 2023
@jychen7
Copy link
Contributor Author

jychen7 commented May 22, 2023

one could argue that we should correctly estimate the output buffers to not be larger than the inputs, this is not guaranteed.

Thanks, that makes sense

@tustvold tustvold added arrow Changes to the arrow crate development-process Related to development process of arrow-rs labels Jun 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrow Changes to the arrow crate bug development-process Related to development process of arrow-rs
Projects
None yet
Development

No branches or pull requests

2 participants