DRILL-5137 - Optimize count(*) queries on MapR-DB Binary Tables#700
Open
spanchamiamapr wants to merge 1 commit intoapache:masterfrom
spanchamiamapr:drill-5137
Open
DRILL-5137 - Optimize count(*) queries on MapR-DB Binary Tables#700spanchamiamapr wants to merge 1 commit intoapache:masterfrom spanchamiamapr:drill-5137
spanchamiamapr wants to merge 1 commit intoapache:masterfrom
spanchamiamapr:drill-5137
Conversation
…KeyOnly queries. We use the FirstKeyOnlyFilter for count(*) queries. This fix will optimize these queries for HBase tables, as well as MapR-DB Binary tables.
adityakishore
suggested changes
Dec 21, 2016
| } else { | ||
| rowKeyOnly = false; | ||
| transformed.add(ROW_KEY_PATH); | ||
| /* DRILL-5137 - optimize count(*) queries on MapR-DB Binary tables */ |
Member
There was a problem hiding this comment.
This branches into the else part of
if (!isStarQuery()) {
Can you verify if a query can be both Star and Skip query at the same time when count(*) has been requested?
Contributor
Author
There was a problem hiding this comment.
Yes, I verified this in my testing.
| rowKeyOnly = false; | ||
| transformed.add(ROW_KEY_PATH); | ||
| /* DRILL-5137 - optimize count(*) queries on MapR-DB Binary tables */ | ||
| if (isSkipQuery()) { |
Member
There was a problem hiding this comment.
Further optimization can be name by returning only a count vector in the next() call, similar to this.
Contributor
Author
There was a problem hiding this comment.
I thought of this, however I got stuck because there is no vectorContainerWriter in HBaseRecordReader class. If you can send a diff of how to do this, I can include that too. Thanks!
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This diff uses the same optimization as that for the rowKeyOnly queries.
We use the FirstKeyOnlyFilter for count(*) queries.
This fix will optimize these queries for HBase tables, as well as MapR-DB Binary tables.