-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Implement LINQ LeftJoin and RightJoin #110872
Conversation
Note regarding the
|
1 similar comment
Note regarding the
|
Copilot
AI
left a comment
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.
Copilot reviewed 7 out of 14 changed files in this pull request and generated 2 comments.
Files not reviewed (7)
- src/libraries/System.Linq.Queryable/tests/System.Linq.Queryable.Tests.csproj: Language not supported
- src/libraries/System.Linq/src/System.Linq.csproj: Language not supported
- src/libraries/System.Linq/tests/System.Linq.Tests.csproj: Language not supported
- src/libraries/System.Linq/ref/System.Linq.cs: Evaluated as low risk
- src/libraries/System.Linq.Queryable/ref/System.Linq.Queryable.cs: Evaluated as low risk
- src/libraries/System.Linq/tests/JoinTests.cs: Evaluated as low risk
- src/libraries/System.Linq.Queryable/tests/JoinTests.cs: Evaluated as low risk
Comments suppressed due to low confidence (3)
src/libraries/System.Linq/src/System/Linq/RightJoin.cs:43
- The IsEmptyArray method is not defined in the provided code. Ensure that this method is defined and works as expected.
if (IsEmptyArray(inner))
src/libraries/System.Linq.Queryable/src/System/Linq/Queryable.cs:245
- The DynamicDependency attribute should be corrected to use the format: DynamicDependency(DynamicallyAccessedMemberTypes.PublicMethods, typeof(Enumerable)).
[DynamicDependency("LeftJoin`4", typeof(Enumerable))]
src/libraries/System.Linq.Queryable/src/System/Linq/Queryable.cs:260
- The nullable type for q is not necessary. Use a simple cast instead: IQueryable q = source as IQueryable;
IQueryable<TSource>? q = source as IQueryable<TSource>;
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.
Looks great, thanks!
Hey @eiriktsarpalis, thanks for the quick reviewing. Re the styling nits, I basically tried to follow the existing code (Join implementation and tests) for maximum consistency, although there are indeed many opportunities for syntax modernization (namespace declaration, using declaration, the new collection initializers...). I'm happy to make the code more modern for Left/RightJoin in this PR only as you suggest (at which point things would be inconsistent), or I can submit a separate PR later to do some syntax cleanup for System.Linq as a whole - whatever you prefer. |
That's fine, they're all optional. Assuming we do add enforcement in the future I'm guessing they would be updated in bulk anyway. |
Closes #110292