[
https://issues.apache.org/jira/browse/HIVE-11609?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15984649#comment-15984649
]
Barna Zsombor Klara commented on HIVE-11609:
--------------------------------------------
I had a discussion with [~balazs.meszaros] about the failing unit test
hbase_custom_key3. It seems that our implementation for the
{{SampleHBaseKeyFactory3}} was incorrect to begin with, because the equality
operator cannot be used to filter *parts* of a custom key in HBase. The test
was passing before this change because the filter wasn't taken into account
anyway, and now it is failing because we are trying to filter for keys equal to
'238' and '1238' at the same time. Based on this I would say that [~swarnim]
was correct to remove that line from {{SampleHBaseKeyFactory3}}.
I have however two other concerns (may be irrelevant, I'm not familiar with the
hbase-handler in Hive):
- in {{SampleHBaseKeyFactory3}} I think the filterlist operator should be
'MUST_PASS_ALL'
{code}
if (!filters.isEmpty()) {
range.addFilter(new FilterList(FilterList.Operator.MUST_PASS_ALL,
filters));
}
{code}
- in HBaseScanRange#setup we are setting the filter on the scan object without
checking if there are preexistent filters already present, should't we check
for existing filters and add them together with the newly deserialised ones or
are we sure (for reasons unclear to me) that the scan will not contain any?
> Capability to add a filter to hbase scan via composite key doesn't work
> -----------------------------------------------------------------------
>
> Key: HIVE-11609
> URL: https://issues.apache.org/jira/browse/HIVE-11609
> Project: Hive
> Issue Type: Bug
> Components: HBase Handler
> Reporter: Swarnim Kulkarni
> Assignee: Swarnim Kulkarni
> Attachments: HIVE-11609.1.patch.txt, HIVE-11609.2.patch.txt,
> HIVE-11609.3.patch.txt, HIVE-11609.4.patch.txt, HIVE-11609.5.patch,
> HIVE-11609.6.patch.txt, HIVE-11609.7.patch.txt
>
>
> It seems like the capability to add filter to an hbase scan which was added
> as part of HIVE-6411 doesn't work. This is primarily because in the
> HiveHBaseInputFormat, the filter is added in the getsplits instead of
> getrecordreader. This works fine for start and stop keys but not for filter
> because a filter is respected only when an actual scan is performed. This is
> also related to the initial refactoring that was done as part of HIVE-3420.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)