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

Pr 14038 suggestion #26

Conversation

akurmustafa
Copy link

@akurmustafa akurmustafa commented Jan 7, 2025

Which issue does this PR close?

Closes #.

Rationale for this change

What changes are included in this PR?

As discussed in the #13748, implementation of the collapse might be one of the reasons of the slow performance when column number is very large. This PR changes the collapse implementation to remove quadratic complexity.

I couldn't verify, however updated implementation might remedy some part of the problem.

Are these changes tested?

Are there any user-facing changes?

@alamb
Copy link
Owner

alamb commented Jan 7, 2025

Thanks @akurmustafa -- I kicked off the PR checks on this PR ❤️

@alamb alamb merged commit 88fbbf1 into alamb:alamb/encapsulate_equiv_properties Jan 7, 2025
13 of 14 checks passed
@alamb
Copy link
Owner

alamb commented Jan 7, 2025

WHoops -- I see this targeted a different branch #26 -- reopening

@alamb
Copy link
Owner

alamb commented Jan 7, 2025

apache#14038 (comment) -- pushed to 14038

Sorry about that

@akurmustafa akurmustafa mentioned this pull request Jan 7, 2025
@alamb
Copy link
Owner

alamb commented Jan 7, 2025

BTW making collapse_lex_req will definitely help

Screenshot 2025-01-07 at 4 14 46 PM

But I think there is more potential benefit to avoiding having to re-normalize as much.

alamb added a commit to apache/datafusion that referenced this pull request Jan 10, 2025
…id clone (#14038)

* Move collapse_lex_ordering to Lexordering::collapse

* reduce diff

* avoid clone, cleanup

* Introduce LexRequirement::collapse

* Improve performance of collapse, from @akurmustafa

alamb#26

fix formatting

* Revert "Improve performance of collapse, from @akurmustafa"

This reverts commit a44acfd.

* remove incorrect comment

---------

Co-authored-by: Mustafa Akur <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants