-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
REF: check monotonicity inside _can_use_libjoin #55342
Merged
Merged
Changes from 3 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
a28e2c6
REF: fix can_use_libjoin check
jbrockmendel d9cfa91
DOC: docstring for can_use_libjoin
jbrockmendel 851f725
Make can_use_libjoin checks more-correct
jbrockmendel 5ff3239
Merge branch 'main' into ref-can_use_libjoin
jbrockmendel a4b702b
avoid allocating mapping in monotonic cases
jbrockmendel 6fee89e
Merge remote-tracking branch 'upstream/main' into ref-can_use_libjoin
lukemanley 6bf14b5
fix categorical memory usage tests
lukemanley 4f89583
Merge remote-tracking branch 'upstream/main' into ref-can_use_libjoin
lukemanley 81e74a9
catch decimal.InvalidOperation
lukemanley 6f1b081
Merge remote-tracking branch 'upstream/main' into ref-can_use_libjoin
lukemanley 94ebbf6
Merge remote-tracking branch 'upstream/main' into ref-can_use_libjoin
lukemanley 73acca0
Merge remote-tracking branch 'upstream/main' into ref-can_use_libjoin
lukemanley File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the order here can have a difference.
is_monotonic_increasing
will provideis_unique
"for free" if the index is both monotonic and unique and it hasn't already been cached.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. i had expected the cache for all of these to get populated at the same time inside IndexEngine, will take a closer look
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, looks like engine.is_monotonic_increasing will populate the engine.is_unique cache but not vice-versa. All of the paths within the engine that check is_unique do that check after checking self.is_monotonic_increasing. im inclined to update the engine code so that the unique check always populates the is_monotonic_increasing cache in order to 1) make the perf not dependent on the order these are accessed and 2) avoid populating
engine.mapping
in these cases (which allocates memory)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that sounds good to me