public void testNegativeMatchesExpr() throws Exception {
// matches operator is not a supported op type
String q = query + "b = filter a by name matches 'foo*';" + "store b into 'out';";
Expression expr = getExpressionForTest(q, Arrays.asList("name"));
Assert.assertNull(expr);
SearchArgument sarg = orcStorage.getSearchArgument(expr);
Assert.assertNull(sarg);
// AND in LHS/RHS
q = query + "b = filter a by name matches 'foo*' and srcid == 10;" + "store b into 'out';";
expr = getExpressionForTest(q, Arrays.asList("srcid", "name"));
sarg = orcStorage.getSearchArgument(expr);
assertEquals("leaf-0 = (EQUALS srcid 10)\n" +
"expr = leaf-0", sarg.toString());
q = query + "b = filter a by srcid == 10 and name matches 'foo*';" + "store b into 'out';";
expr = getExpressionForTest(q, Arrays.asList("srcid", "name"));
sarg = orcStorage.getSearchArgument(expr);
assertEquals("leaf-0 = (EQUALS srcid 10)\n" +
"expr = leaf-0", sarg.toString());
// OR - Nothing should be pushed
q = query + "b = filter a by name matches 'foo*' or srcid == 10;" + "store b into 'out';";
expr = getExpressionForTest(q, Arrays.asList("srcid", "name"));
Assert.assertNull(expr);