if ((left instanceof ExprFilterOptimizableNode) && (right instanceof ExprContextPropertyNode)) {
ExprFilterOptimizableNode filterOptimizableNode = (ExprFilterOptimizableNode) left;
ExprContextPropertyNode ctxNode = (ExprContextPropertyNode) right;
FilterSpecLookupable lookupable = filterOptimizableNode.getFilterLookupable();
if (filterOptimizableNode.getFilterLookupEligible()) {
SimpleNumberCoercer numberCoercer = getNumberCoercer(lookupable.getReturnType(), ctxNode.getType(), lookupable.getExpression());
return new FilterSpecParamContextProp(lookupable, op, ctxNode.getPropertyName(), ctxNode.getGetter(), numberCoercer);
}
}
if ((left instanceof ExprContextPropertyNode) && (right instanceof ExprFilterOptimizableNode)) {
ExprFilterOptimizableNode filterOptimizableNode = (ExprFilterOptimizableNode) right;
ExprContextPropertyNode ctxNode = (ExprContextPropertyNode) left;
FilterSpecLookupable lookupable = filterOptimizableNode.getFilterLookupable();
if (filterOptimizableNode.getFilterLookupEligible()) {
op = getReversedOperator(constituent, op); // reverse operators, as the expression is "stream1.prop xyz stream0.prop"
SimpleNumberCoercer numberCoercer = getNumberCoercer(lookupable.getReturnType(), ctxNode.getType(), lookupable.getExpression());
return new FilterSpecParamContextProp(lookupable, op, ctxNode.getPropertyName(), ctxNode.getGetter(), numberCoercer);
}
}
return null;
}