Skip to content

CDRIVER-4122 Add BSON corpus test for binary subtype 7 #859

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 10, 2021

Conversation

eramongodb
Copy link
Contributor

@eramongodb eramongodb commented Sep 3, 2021

Validating changes relating to DRIVERS-1875.

@eramongodb eramongodb self-assigned this Sep 3, 2021
@eramongodb eramongodb changed the title Add BSON corpus test for binary subtype 7 CDRIVER-4122 Add BSON corpus test for binary subtype 7 Sep 7, 2021
@eramongodb eramongodb requested a review from kevinAlbs September 7, 2021 18:15
@eramongodb eramongodb marked this pull request as ready for review September 7, 2021 18:15
@kevinAlbs kevinAlbs requested a review from jmikola September 7, 2021 18:39
Copy link
Member

@jmikola jmikola left a comment

Choose a reason for hiding this comment

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

Passes in PHPC.

Note: after merging, make sure you update the downstream change summary on DRIVERS-1875 to advise drivers to create a new constant for sub-type 0x07 (please suggest a name) and sync their BSON corpus tests to the merge commit.

@eramongodb
Copy link
Contributor Author

eramongodb commented Sep 7, 2021

Note: after merging, make sure you update the downstream change summary on DRIVERS-1875 to advise drivers to create a new constant for sub-type 0x07 (please suggest a name) and sync their BSON corpus tests to the merge commit.

@jmikola Per name in server, the name will likely be <subtype-prefix>Column where <subtype-prefix> depends on the given language. For the C driver, this would be:

  typedef enum {
     BSON_SUBTYPE_BINARY = 0x00,
     BSON_SUBTYPE_FUNCTION = 0x01,
     BSON_SUBTYPE_BINARY_DEPRECATED = 0x02,
     BSON_SUBTYPE_UUID_DEPRECATED = 0x03,
     BSON_SUBTYPE_UUID = 0x04,
     BSON_SUBTYPE_MD5 = 0x05,
     BSON_SUBTYPE_ENCRYPTED = 0x06,
+    BSON_SUBTYPE_COLUMN = 0x07,
     BSON_SUBTYPE_USER = 0x80,
  } bson_subtype_t;

Should the addition of this enumeration constant be included in this PR?

@jmikola
Copy link
Member

jmikola commented Sep 8, 2021

Should the addition of this enumeration constant be included in this PR?

I think so, as it's part of the changes that should be proposed by DRIVERS-1875.

I didn't realize this was a libmongoc PR when I left my previous comment. That was intended for mongodb/specifications#1065, so I'll copy it there. The DRIVERS ticket should definitely be revised to suggest drivers add a constant for the new subtype if they currently do so for other subtypes, and that would be a reasonable place to suggest "COLUMN" as a name.

@eramongodb eramongodb requested a review from jmikola September 8, 2021 14:43
@eramongodb eramongodb merged commit e430a9b into mongodb:master Sep 10, 2021
@eramongodb eramongodb deleted the drivers-1875 branch September 10, 2021 14:45
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.

3 participants