protected boolean analyzeCondition(ILogicalExpression cond,List<AbstractLogicalOperator> assignsAndUnnests,Map<IAccessMethod,AccessMethodAnalysisContext> analyzedAMs,IOptimizationContext context,IVariableTypeEnvironment typeEnvironment) throws AlgebricksException {
  AbstractFunctionCallExpression funcExpr=(AbstractFunctionCallExpression)cond;
  FunctionIdentifier funcIdent=funcExpr.getFunctionIdentifier();
  if (funcIdent == AlgebricksBuiltinFunctions.OR) {
    return false;
  }
  boolean found=analyzeFunctionExpr(funcExpr,assignsAndUnnests,analyzedAMs,context,typeEnvironment);
  for (  Mutable<ILogicalExpression> arg : funcExpr.getArguments()) {
    ILogicalExpression argExpr=arg.getValue();
    if (argExpr.getExpressionTag() != LogicalExpressionTag.FUNCTION_CALL) {
      continue;
    }
    AbstractFunctionCallExpression argFuncExpr=(AbstractFunctionCallExpression)argExpr;
    boolean matchFound=analyzeFunctionExpr(argFuncExpr,assignsAndUnnests,analyzedAMs,context,typeEnvironment);
    found=found || matchFound;
  }
  return found;
}

protected boolean analyzeCondition ( ILogicalExpression cond , List < AbstractLogicalOperator > assignsAndUnnests , Map < IAccessMethod , AccessMethodAnalysisContext > analyzedAMs , IOptimizationContext context , IVariableTypeEnvironment typeEnvironment ) throws AlgebricksException { AbstractFunctionCallExpression funcExpr = ( AbstractFunctionCallExpression ) cond ; FunctionIdentifier funcIdent = funcExpr . getFunctionIdentifier ( ) ; if ( funcIdent == AlgebricksBuiltinFunctions . OR ) { return false ; } boolean found = analyzeFunctionExpr ( funcExpr , assignsAndUnnests , analyzedAMs , context , typeEnvironment ) ; for ( Mutable < ILogicalExpression > arg : funcExpr . getArguments ( ) ) { ILogicalExpression argExpr = arg . getValue ( ) ; if ( argExpr . getExpressionTag ( ) != LogicalExpressionTag . FUNCTION_CALL ) { continue ; } AbstractFunctionCallExpression argFuncExpr = ( AbstractFunctionCallExpression ) argExpr ; boolean matchFound = analyzeFunctionExpr ( argFuncExpr , assignsAndUnnests , analyzedAMs , context , typeEnvironment ) ; found = found || matchFound ; } return found ; }
analyzes the given selection condition , filling analyzedams with applicable access method types . at this point we are not yet consulting the metadata whether an actual index exists or not .
