Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1016,7 +1016,9 @@ else if (o instanceof SelectResult)
if (result.rows.length == 0)
return null;
ByteBuffer bb = result.rows[0][result.columns.indexOf(symbol)];
if (bb != null && symbol.type().isNull(bb))
// isEmptyValueMeaningless types store empty bytes as a distinct value from null;
// preserve it for CAS raw-byte comparison
if (bb != null && symbol.type().isNull(bb) && !symbol.type().isEmptyValueMeaningless())

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this patch doesn't really make sense to me.

CAS IF with equality operators are the only place we need to special case where byte[0] != null, as the rest of the code (which goes through this code path) require byte[0] == null (we are only talking about meaningless emptyness).

So to fix CAS IF we need to break the rest of the CQL surface?

bb = null;
return bb;
}
Expand Down