Skip to content

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#700
spanchamiamapr wants to merge 1 commit intoapache:masterfrom
spanchamiamapr:drill-5137

Conversation

@spanchamiamapr
Copy link
Copy Markdown
Contributor

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.

…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.
} else {
rowKeyOnly = false;
transformed.add(ROW_KEY_PATH);
/* DRILL-5137 - optimize count(*) queries on MapR-DB Binary tables */
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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()) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Further optimization can be name by returning only a count vector in the next() call, similar to this.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants