Skip to content

A tiny test fix (about NANfinities in collections)#145

Merged
toptobes merged 1 commit intomainfrom
SL-tiny-fix-infinities-in-a-collection-test
Apr 17, 2026
Merged

A tiny test fix (about NANfinities in collections)#145
toptobes merged 1 commit intomainfrom
SL-tiny-fix-infinities-in-a-collection-test

Conversation

@sl-at-ibm
Copy link
Copy Markdown
Collaborator

I'm sure this is what was meant to be tested (no big deal)

Now a real question. Inspecting the payload shows that the original insertion is serialized as:

{
    "insertMany": {
        "documents": [
            {
                "DoubleValue": "\u002BInfinity",
                "FloatValue": "\u002BInfinity"
            },
            {
                "DoubleValue": "-Infinity",
                "FloatValue": "-NegativeInfinity"
            },
            {
                "DoubleValue": "NaN",
                "FloatValue": "NaN"
            }
        ],
        "options": {
            "ordered": false
        }
    }
}

This is identical, in effect, to writing a literal + rather than its escape, but I do wonder: how come the plus sign, and only the plus sign, is escaped? It's not a high-value obscure unicode sequence or something, no?
(this may hint at something potentially troublesome in the serdes machinery? Probably not...)
(also it sounds like a (tiny) waste of bytes. Oh, well).

@sl-at-ibm sl-at-ibm requested a review from toptobes April 16, 2026 10:25
@sl-at-ibm sl-at-ibm changed the title A tiny test fix (on infinities in collections) A tiny test fix (about NANfinities in collections) Apr 16, 2026
@toptobes toptobes added this pull request to the merge queue Apr 17, 2026
Merged via the queue into main with commit 3daf052 Apr 17, 2026
7 checks passed
@sl-at-ibm sl-at-ibm deleted the SL-tiny-fix-infinities-in-a-collection-test branch April 17, 2026 08:19
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