Skip to content

Default optional#147

Merged
huangminghuang merged 3 commits intoobjectcomputing:masterfrom
martinfantini:default_optional
Mar 7, 2025
Merged

Default optional#147
huangminghuang merged 3 commits intoobjectcomputing:masterfrom
martinfantini:default_optional

Conversation

@martinfantini
Copy link
Copy Markdown
Contributor

For the case of default optional, if the value storage is empty, it has not send anything in the steam.

This is correct done in the V! but not in the V2.

inst.prev_value().defined(false); // reset the previous value to undefined again

REQUIRE( encode_ext_cref("\xC0\x80",
REQUIRE( encode_ext_cref("\x80",
Copy link
Copy Markdown
Contributor Author

@martinfantini martinfantini Mar 7, 2025

Choose a reason for hiding this comment

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

Here the unit test is checking a optional field with the default value which is not present in the value storage. And the old value encoded in the stream was \x80 (\xC0**\x80** ), which makes no sense, send a empty value.

Now it is sending only the \x80, which is the pmap only.

@huangminghuang huangminghuang merged commit a74af23 into objectcomputing:master Mar 7, 2025
3 checks passed
@martinfantini martinfantini deleted the default_optional branch July 28, 2025 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants