use of org.apache.asterix.om.base.ABoolean in project asterixdb by apache.
the class AbstractComparisonEvaluator method evaluate.
@Override
public void evaluate(IFrameTupleReference tuple, IPointable result) throws HyracksDataException {
resultStorage.reset();
// Evaluates input args.
evalLeft.evaluate(tuple, argLeft);
evalRight.evaluate(tuple, argRight);
argLeft.getValue(outLeft);
argRight.getValue(outRight);
// these operations cannot be defined for certain types.
if (isTotallyOrderable()) {
checkTotallyOrderable();
}
// Checks whether two types are comparable
if (comparabilityCheck()) {
// Two types can be compared
int r = compareResults();
ABoolean b = getComparisonResult(r) ? ABoolean.TRUE : ABoolean.FALSE;
serde.serialize(b, out);
} else {
// result:NULL - two types cannot be compared.
nullSerde.serialize(ANull.NULL, out);
}
result.set(resultStorage);
}
Aggregations