Github user zellerh commented on a diff in the pull request:

    
https://github.com/apache/incubator-trafodion/pull/1051#discussion_r110733741
  
    --- Diff: core/sql/optimizer/RelExpr.cpp ---
    @@ -9062,42 +9055,19 @@ void Scan::setTableAttributes(CANodeId nodeId)
       setBaseCardinality(MIN_ONE (tableDesc->getNATable()->getEstRowCount())) ;
     }
     
    -NABoolean Scan::equalityPredOnCol(ItemExpr *col)
    -{
    -  //
    -  // Returns TRUE if the column (col) has an equality predicate
    -  // associated with it the scan's predicate list.
    -  //
    -  ValueIdSet pred = getSelectionPredicates();
    -
    -  for (ValueId vid=pred.init(); pred.next(vid); pred.advance(vid))
    -  {
    -    if ( vid.getItemExpr()->getOperatorType() != ITM_VEG_PREDICATE )
    -      continue;
    -
    -    ItemExpr *expr = vid.getItemExpr();
    -    ValueId id;
    -    VEG *veg = ((VEGPredicate*)expr)->getVEG();
    -
    -    if (veg->getAllValues().referencesTheGivenValue(col->getValueId(), id))
    -      return TRUE;
    -  }
    -
    -  return FALSE;
    -
    -} // Scan::equalityPredOnCol
    -
     NABoolean Scan::updateableIndex(IndexDesc *idx)
     {
       //
    -  // Returns TRUE if the index (idx) can be used for a scan during an 
UPDATE.
    -  // Otherwise, returns FALSE to prevent the "Halloween Update Problem".
    +  // Returns TRUE if the index (idx) can be used for a scan during 
    +  // an UPDATE. Halloween problem is protected with a sort using
    +  // Scan::requiresHalloweenForUpdateUsingIndexScan(). 
    +  // Returns FALSE only for certain embedded updates now.
    --- End diff --
    
    See also comments below. I wonder why you changed this method, which seemed 
good to me, to something that no longer corresponds to its name?


---
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.
---

Reply via email to