use of datawave.query.jexl.JexlASTHelper in project datawave by NationalSecurityAgency.
the class NoExpansionFunctionVisitor method visit.
@Override
public Object visit(ASTFunctionNode node, Object data) {
FunctionJexlNodeVisitor visitor = new FunctionJexlNodeVisitor();
node.jjtAccept(visitor, null);
if (visitor.namespace().equals("filter") && visitor.name().equalsIgnoreCase(EvaluationPhaseFilterFunctionsDescriptor.NO_EXPANSION)) {
noExpansionFields.addAll(visitor.args().stream().map(JexlASTHelper::getIdentifier).collect(Collectors.toSet()));
// prune this query node by returning null
return null;
}
return copy(node);
}
Aggregations