private boolean processExpression(Mutable<ILogicalOperator> opRef, Mutable<ILogicalExpression> search) {
boolean modified = false;
functionList.clear();
ExpressionToolbox.findAllFunctionExpressions(search, functionList);
for (Mutable<ILogicalExpression> searchM : functionList) {
searchFunction = (AbstractFunctionCallExpression) searchM.getValue();
if (ALGEBRICKS_MAP.containsKey(searchFunction.getFunctionIdentifier())) {
FunctionIdentifier fid = searchFunction.getFunctionIdentifier();
if (ALGEBRICKS_MAP.get(fid).first == null) {
modified = convertAlgebricksExpression(searchM, ALGEBRICKS_MAP.get(fid).second, false);
} else if (ALGEBRICKS_MAP.get(fid).second == null) {
modified = convertAlgebricksExpression(searchM, ALGEBRICKS_MAP.get(fid).first, true);
} else {
IExpressionAnnotation annotate = searchFunction.getAnnotations().get(
ALGEBRICKS_CONVERSION_ANNOTATION);
if (((FunctionIdentifier) annotate.getObject()).equals(ALGEBRICKS_MAP.get(fid).first
.getFunctionIdentifier())) {
modified = convertAlgebricksExpression(searchM, ALGEBRICKS_MAP.get(fid).first, true);
} else if (((FunctionIdentifier) annotate.getObject()).equals(ALGEBRICKS_MAP.get(fid).second
.getFunctionIdentifier())) {
modified = convertAlgebricksExpression(searchM, ALGEBRICKS_MAP.get(fid).second, false);
}
}
}
}
return modified;
}