Search in sources :

Example 1 with ASTUnknownFieldERNode

use of org.apache.commons.jexl2.parser.ASTUnknownFieldERNode in project datawave by NationalSecurityAgency.

the class RangeStream method visit.

@Override
public Object visit(ASTERNode node, Object data) {
    IdentifierOpLiteral op = JexlASTHelper.getIdentifierOpLiteral(node);
    if (op == null) {
        return ScannerStream.unindexed(node);
    }
    final String fieldName = op.deconstructIdentifier();
    // HACK to make EVENT_DATATYPE queries work
    if (QueryOptions.DEFAULT_DATATYPE_FIELDNAME.equals(fieldName)) {
        return ScannerStream.unindexed(node);
    }
    if (isUnOrNotFielded(node)) {
        return ScannerStream.noData(node);
    }
    if (isUnindexed(node)) {
        return ScannerStream.unindexed(node);
    }
    if (node instanceof ASTUnknownFieldERNode) {
        return ScannerStream.unknownField(node);
    }
    return ScannerStream.noData(node);
}
Also used : IdentifierOpLiteral(datawave.query.jexl.JexlASTHelper.IdentifierOpLiteral) ASTUnknownFieldERNode(org.apache.commons.jexl2.parser.ASTUnknownFieldERNode)

Aggregations

IdentifierOpLiteral (datawave.query.jexl.JexlASTHelper.IdentifierOpLiteral)1 ASTUnknownFieldERNode (org.apache.commons.jexl2.parser.ASTUnknownFieldERNode)1