trafodion-codereview mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sureshsubbiah <>
Subject [GitHub] incubator-trafodion pull request: fix #JIRA 1449: missing end key.
Date Thu, 27 Aug 2015 15:32:38 GMT
Github user sureshsubbiah commented on a diff in the pull request:
    --- Diff: core/sql/generator/GenPreCode.cpp ---
    @@ -154,15 +154,19 @@ static NABoolean processConstHBaseKeys(Generator * generator,
       // convert built-in search key to entries with constants, if possible
       if (skey->areAllKeysConstants(TRUE))
    -      ValueIdSet exePreds;
           ValueIdSet nonKeyColumnSet;
    -      // seed exePreds with all predicates, key and non-key
    -      // they will be reduced by the method below
    -      skey->getKeyPredicates(exePreds);
    +      // seed keyPreds with only the full key predicate from skey
    +      ValueIdSet keyPreds = skey->getFullKeyPredicates();
    +      // include executorPreds and selection predicates 
    +      // but exclude the full key predicates.
    +      ValueIdSet exePreds;
           exePreds += executorPreds;
           exePreds += relExpr->getSelectionPred();
    +      exePreds.subtractSet(keyPreds);
    --- End diff --
    I am wondering if this is a good thing to do. There are instances where we want a predicate
to be both an executor predicate as well as a key predicate. In certain MDAM disjuncts the
key predicate guarantees that a minimal set of rows is scanned but an exe pred has to be evaluated
on the same pred again to guarantee correct results. I realize that the comment is vague without
an example or two. I can  try to find one if necessary. Also since this PreCodeGen a predicate
can be physically implemented differently based on what is available. That may also require
us to keep things in the exepred? 

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 or file a JIRA ticket
with INFRA.

View raw message