DotExpression base = (DotExpression) expr;
List<ExprChainedSpec> chain = mapChains(base.getChain(), mapContext);
if (chain.size() == 1) {
String name = chain.get(0).getName();
if (mapContext.getExpressionDeclarations() != null && mapContext.getExpressionDeclarations().containsKey(name)) {
return new ExprDeclaredNodeImpl(mapContext.getExpressionDeclarations().get(name), chain.get(0).getParameters());
}
}
return new ExprDotNode(chain,
mapContext.getConfiguration().getEngineDefaults().getExpression().isDuckTyping(),
mapContext.getConfiguration().getEngineDefaults().getExpression().isUdfCache());