Filtering: Is a like expression an unary expression?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Filtering: Is a like expression an unary expression?

Oliver B. Fischer
Dear all,

in a special use case I have to analyze a selector by my own. In doing
so I stumpled on the like expression. Here is a snippet from my tests:

     SelectorParser sp = new SelectorParser();
     Expression expression = sp.parse("a like 'abc?'");

     System.out.println(expression);

The output of this code is "(like a)" and expression is an instance of
org.apache.activemq.artemis.selector.filter.ComparisonExpression$LikeExpression
and extends UnaryExpression.

IMHO the output should be "(a like _pattern_)" and the like expression
should be an BinaryExpression.

Shouldn't it be changed?

Oliver


--
N Oliver B. Fischer
A Schönhauser Allee 64, 10437 Berlin, Deutschland/Germany
P +49 30 44793251
M +49 178 7903538
E [hidden email]
S oliver.b.fischer
J [hidden email]
X http://xing.to/obf