}
byte[] lhsBytes = ptr.get();
int lhsOffset = ptr.getOffset();
int lhsLength = ptr.getLength();
PDataType lhsDataType = children.get(0).getDataType();
SortOrder lhsSortOrder = children.get(0).getSortOrder();
if (!children.get(1).evaluate(tuple, ptr)) {
return false;
}
if (ptr.getLength() == 0) { // null comparison evals to null
return true;
}
byte[] rhsBytes = ptr.get();
int rhsOffset = ptr.getOffset();
int rhsLength = ptr.getLength();
PDataType rhsDataType = children.get(1).getDataType();
SortOrder rhsSortOrder = children.get(1).getSortOrder();
if (rhsDataType == PDataType.CHAR) {
rhsLength = StringUtil.getUnpaddedCharLength(rhsBytes, rhsOffset, rhsLength, rhsSortOrder);
}
if (lhsDataType == PDataType.CHAR) {
lhsLength = StringUtil.getUnpaddedCharLength(lhsBytes, lhsOffset, lhsLength, lhsSortOrder);