You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2020/04/10 03:42:52 UTC

[GitHub] [druid] suneet-s commented on issue #9607: Remove no-op assert statement in ClientQuerySegmentWalker

suneet-s commented on issue #9607: Remove no-op assert statement in ClientQuerySegmentWalker
URL: https://github.com/apache/druid/pull/9607#issuecomment-611863229
 
 
   > This is kind of a weird flag. The whole point of asserts is that they are supposed to always be true. They are like comments which automatically enforce themselves. I don't see why we should remove one just because LGTM can prove that it's always true.
   > 
   > I'd vote to either suppress the check for this particular instance, or at least replace the assert with a comment like:
   > 
   > ```
   > // At this point we know "current" is not a QueryDataSource.
   > ```
   
   I misread the warning - I thought lgtm was complaining that the assert expression was always true, but after reading your comment I paid closer attention to the error. It's actually warning us that `current instanceof QueryDataSource` is always false when what it should be checking is whether `current not instanceof QueryDataSrource` is always false.
   
   I filed a bug for it on lgtm https://github.com/Semmle/ql/issues/3249
   
   Going to hide this warning.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org