-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat(mango): keys-only covering indexes #4512
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
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
1efeb75
Remove explicit import
pgj 21b7927
mango: introduce support for covering indexes
pgj 4ed65d5
mango: add type information for better self-documentation
pgj 7278574
mango: increase coverage of the `choose_best_index/1` test
pgj 0394b9e
mango: add eunit tests
pgj 96d0480
_find: mention the `covered` attribute in the `_explain` response
pgj 7cbcce4
mango: add integration tests for keys-only covering indexes
pgj cfd4c73
mango: mark fields with the `$exists` operator indexable
pgj 138fdfe
mango: enhance compositionality of `consider_index_coverage/3`
pgj 842663d
mango: fix definition of index coverage
pgj cb9a3bf
mango: refactor
pgj 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 hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
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.
This one is a bit as A can be undefined also. I'd would expect Dialyzer should emit some kind of warning here but perhaps our Dialyzer options are not configured properly.
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 did not see warnings from Dialyzer with regard to this definition. Though I have run it only with the standard options.
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.
How do you run Dialyzer? Every time I run it either shows no output or crashes in a warning in config or a different application.
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 initialized the
~/.dialyzer_pltfile by running the standard command:Then I was able to run Dialyzer only on the Mango portion of the code base:
Of course, it complains about the unknown functions. And it could even crash if I tried to add further
ebins where there is something wrong.However, this version works reasonably well (from the root of the CouchDB git clone):
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.
Perfect. Thanks for taking the time to describe it. It would be great if one day could run these as part of CI and use type specs more.
Uh oh!
There was an error while loading. Please reload this page.
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 admit that it is not how
make dialyzewould do that. Ideally,make dialyzeshould be fixed to work like this. It usesrebarto create the PLT files and something in the sources makes it fail. I think that might be Elixir. Anyhow, I am a strong endorser of types and one day I will fix this somehow :-)