PredExp: Compare two bin values

I am comparing two bin values using PredExp for example bin1.value ==bin2.value for a given record How can I achieve this? Are both bins required to be indexed? ps: I am using a java client. Thanks.

Found something that works, stm.setPredExp(PredExp.intengerBin(bin1), PredExp.integerBin(bin2), integerEqual())

Great you figured out the solution. To clarify, a predicate expression involving a bin does not require an index on the bin because the predicate expression is evaluated as part of a single record processing to determine if the operation(s) should be performed on the record. Thus a predicate expression is different from a query predicate; you must have an index on the bin for the latter to work.

On the topic of predicate expressions, watch out for the new functionality that will replace and extend it in 5.3: Expressions. New client versions will not support older PredExp; but the server will continue to support the deprecated functionality for some time to allow applications to transition.

1 Like

This topic was automatically closed 84 days after the last reply. New replies are no longer allowed.