Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
DOCSP-34044: Add bitwise operators to aggregation pipeline #253
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
DOCSP-34044: Add bitwise operators to aggregation pipeline #253
Changes from 17 commits
c3613dd
a381698
5f5a21e
900f203
4e3fb04
0dfdd72
e823c7b
ab89fbf
7ba8930
5c793d5
cbb43ad
12e8cf1
bf95a33
b1018b3
beadd48
d6928f3
90f0477
45e9f9c
9072d3b
7df55cb
1a07984
4a2b1e2
b7855bb
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This final document can't have been created using the
Ingredient
POCO becauseCount
is anint
and can't benull
.Also, the element names in these sample documents don't match the field names in the POCO (the C# properties start with a capital letter).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The data types used in the example have been changed to be nullable.
As for the second point, for these examples we use a convention pack (see the bottom of the Overview section on this page) to convert snake case field names into Pascal case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's hard to tell from looking at just this PR that there is a convention somewhere else that is mapping the property names. That's confusing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is true server-side, but in C# this isn't true unless you are using "nullable" integers.
In these examples if either
Price
orCount
isnull
the query will fail client-side while deserializing the results.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clarified the note, please take a look!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you tried to execute this?
I think it will throw an exception because the
null
can't be deserialized to anint
client-side.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All examples in this PR have been executed - although, the issue is that I was using nullable integers but did not add that in the example. They have now been added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
null
is not a possible result. It should throw an exception when deserializing the results.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an odd example. There's no real reason to bit-and a
Price
and aCount
.A better example would involve flags or something.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed the example!