[
https://issues.apache.org/jira/browse/HBASE-4364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13447693#comment-13447693
]
Jie Huang commented on HBASE-4364:
----------------------------------
[~alexb], [~lucjb] I have checked those code related to the problem you
mentioned. According to the comments, it seems that this topic has been
discussed before. The conclusion is that
{code}
/**
* Filters should be checked before checking column trackers. If we do
* otherwise, as was previously being done, ColumnTracker may increment its
* counter for even that KV which may be discarded later on by Filter. This
* would lead to incorrect results in certain cases.
*/
if (filter != null) {
ReturnCode filterResponse = filter.filterKeyValue(kv);
if (filterResponse == ReturnCode.SKIP) {
return MatchCode.SKIP;
} else if (filterResponse == ReturnCode.NEXT_COL) {
return columns.getNextRowOrNextColumn(bytes, offset, qualLength);
} else if (filterResponse == ReturnCode.NEXT_ROW) {
stickyNextRow = true;
return MatchCode.SEEK_NEXT_ROW;
} else if (filterResponse == ReturnCode.SEEK_NEXT_USING_HINT) {
return MatchCode.SEEK_NEXT_USING_HINT;
}
}
MatchCode colChecker = columns.checkColumn(bytes, offset, qualLength,
timestamp, type, kv.getMemstoreTS() > maxReadPointToTrackVersions);
{code}
If both of you are still interested in this problem, we may try to figure out
some potential solution. 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
For more information on JIRA, see: http://www.atlassian.com/software/jira