use of org.apache.commons.jexl2.parser.ParseException in project datawave by NationalSecurityAgency.
the class ValidComparisonVisitorTest method testInvalidRE.
@Test(expected = DatawaveFatalQueryException.class)
public void testInvalidRE() throws ParseException {
String queryString = "'BAR' =~ 'foo'";
ASTJexlScript script = JexlASTHelper.parseJexlQuery(queryString);
ValidComparisonVisitor.check(script);
}
use of org.apache.commons.jexl2.parser.ParseException in project datawave by NationalSecurityAgency.
the class ValidPatternVisitorTest method testValidNR.
@Test
public void testValidNR() throws ParseException {
String queryString = "BAR == '1' && FOO !~ '1234.*\\d'";
ASTJexlScript script = JexlASTHelper.parseJexlQuery(queryString);
ValidPatternVisitor.check(script);
}
use of org.apache.commons.jexl2.parser.ParseException in project datawave by NationalSecurityAgency.
the class ValidPatternVisitorTest method testValidERWithCacheHit.
@Test
public void testValidERWithCacheHit() throws ParseException {
String queryString = "BAR == '1' && FOO =~ '1234.*\\d' && FOO2 =~ '1234.*\\d'";
ASTJexlScript script = JexlASTHelper.parseJexlQuery(queryString);
ValidPatternVisitor.check(script);
}
use of org.apache.commons.jexl2.parser.ParseException in project datawave by NationalSecurityAgency.
the class ValidPatternVisitorTest method testValidDoubleSidedEr.
@Test
public void testValidDoubleSidedEr() throws ParseException {
String queryString = "A =~ B";
ASTJexlScript script = JexlASTHelper.parseJexlQuery(queryString);
ValidPatternVisitor.check(script);
}
use of org.apache.commons.jexl2.parser.ParseException in project datawave by NationalSecurityAgency.
the class ValidPatternVisitorTest method testFilterFunctionIncludeRegex.
@Test(expected = PatternSyntaxException.class)
public void testFilterFunctionIncludeRegex() throws ParseException {
String queryString = "A == '1' && filter:includeRegex(B,'*2*')";
ASTJexlScript script = JexlASTHelper.parseJexlQuery(queryString);
ValidPatternVisitor.check(script);
}
Aggregations