Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,11 @@ protected Collection<SchemaPath> transformColumns(Collection<SchemaPath> columns
} 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.

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!

hbaseScan.setFilter(
HBaseUtils.andFilterAtIndex(hbaseScan.getFilter(), HBaseUtils.LAST_FILTER, new FirstKeyOnlyFilter()));
}
}


Expand Down