Github user nonstop-qfchen commented on a diff in the pull request:
https://github.com/apache/incubator-trafodion/pull/66#discussion_r38108671
--- Diff: core/sql/generator/GenPreCode.cpp ---
@@ -170,12 +174,16 @@ static NABoolean processConstHBaseKeys(Generator *
generator,
skey->getIndexDesc()->getOrderOfKeyValues(),
relExpr->getGroupAttr()->getCharacteristicInputs(),
TRUE, /* forward scan */
- exePreds,
+ keyPreds,
nonKeyColumnSet,
idesc,
relExpr->getGroupAttr()->getCharacteristicOutputs(),
mySearchKeys);
+ // Include any remaining key predicates that have not been
+ // picked up (to be used as the HBase search keys).
+ exePreds += keyPreds;
--- End diff --
The key predicates are computed by the SearchKey already. So we take it out
from executor+selection predicates.
Later on, if makeHBaseSearchKey() decides any part of the key predicates
that can not be included in the Hbase search key, we add those back.
On Thu, Aug 27, 2015 at 10:03 AM, DaveBirdsall <[email protected]>
wrote:
> In core/sql/generator/GenPreCode.cpp
>
<https://github.com/apache/incubator-trafodion/pull/66#discussion_r38105680>
> :
>
> > nonKeyColumnSet,
> > idesc,
> > relExpr->getGroupAttr()->getCharacteristicOutputs(),
> > mySearchKeys);
> >
> > + // Include any remaining key predicates that have not been
> > + // picked up (to be used as the HBase search keys).
> > + exePreds += keyPreds;
>
> Not sure I understand the point of subtracting the keyPreds at line 169
> then just adding them back here. The exePreds set is not passed to
> HbaseSearchKey::makeHBaseSearchKeys.
>
> â
> Reply to this email directly or view it on GitHub
> <https://github.com/apache/incubator-trafodion/pull/66/files#r38105680>.
>
--
Regards, --Qifan
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---