[
https://issues.apache.org/jira/browse/HBASE-4364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13435984#comment-13435984
]
Jie Huang commented on HBASE-4364:
----------------------------------
@Alex, totally understand your point. Yes. What you have stated in the
unit-test is a problem. Not only for the functionality, but also for the better
performance as Lucas mentioned. We'd better to feed all those *selected
columns* to the filter.
However, to make the filter only work on those selected columns doesn't help to
solve the original problem here. The problem is sth. like *select A from table
where B > 'b'*. If we only applies the filtering criteria on column A as what
we expected in the unit-test case, we will get empty result here. So basically,
the solution proposed here is
# To add filterred column into the selected columns, and then do the filter.
The sanityCheck() function gives the chance to combine "projected" and "where"
if necessary.
# To remove that newly added column before returning back to the end-user.
Since that newly added column is not expected by the end-user.
After making the filter only work on those required columns, using suck kind of
solution, we still can extend the "projected" by adding those "where" columns.
And the filter may apply on "required" + "criteria column" only, instead of
going through the whole column list.
How about to create a new issue about the "only feeds those selected columns to
the filter". The initial thought is to do some comparison work in the matcher.
Any comment?
> Filters applied to columns not in the selected column list are ignored
> ----------------------------------------------------------------------
>
> Key: HBASE-4364
> URL: https://issues.apache.org/jira/browse/HBASE-4364
> Project: HBase
> Issue Type: Bug
> Components: filters
> Affects Versions: 0.90.4, 0.92.0, 0.94.0
> Reporter: Todd Lipcon
> Priority: Critical
> Attachments:
> HBASE-4364-failing-test-with-simplest-custom-filter.patch,
> hbase-4364_trunk.patch, hbase-4364_trunk-v2.patch
>
>
> For a scan, if you select some set of columns using addColumns(), and then
> apply a SingleColumnValueFilter that restricts the results based on some
> other columns which aren't selected, then those filter conditions are ignored.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira