-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Static analysis: minor small changes #26946
Conversation
@@ -951,8 +949,7 @@ private Expression GetGroupingKey(Expression key, List<Expression> groupingExpre | |||
|
|||
innerQueryExpression._clientProjections.Clear(); | |||
|
|||
innerShaperExpression = | |||
new ProjectionIndexRemappingExpressionVisitor(innerQueryExpression, this, indexMap).Visit(innerShaperExpression); | |||
new ProjectionIndexRemappingExpressionVisitor(innerQueryExpression, this, indexMap).Visit(innerShaperExpression); |
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 strange that the results are not used.
@smitpatel
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 next line throws exception so this code path is not yet used.
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.
We should either undo the changes to remove this code
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.
I wondered if the visitor might throw a different exception in some cases, and hence the code "does something" even though the next line is never reached. Nevertheless, I have reverted the change here.
9c0ff2c
to
9ab4cad
Compare
Part of #26805 For example: - Assignment is not used - Redundant discard - Redundant explicit size in array creation - Convert field to local - Redundant verbatim prefix - Redundant lambda parens
9ab4cad
to
bbbd6f5
Compare
Part of #26805
For example: