zabetak commented on a change in pull request #1112: [CALCITE-2930] 
FilterCorrelateRule on a Correlate with SemiJoinType SEMI (or ANTI) throws 
IllegalStateException  (Ruben Quesada Lopez)
URL: https://github.com/apache/calcite/pull/1112#discussion_r270784670
 
 

 ##########
 File path: core/src/main/java/org/apache/calcite/plan/RelOptUtil.java
 ##########
 @@ -2380,6 +2381,8 @@ public static boolean classifyFilters(
         joinRel.getInputs().get(1).getRowType().getFieldList();
     final int nFieldsRight = rightFields.size();
     assert nTotalFields == (joinRel instanceof SemiJoin
 
 Review comment:
   Fine by me although I have a small remark. The way you modified the code 
right now the if statements are going to be executed even if assertions are 
disabled. I don't know if JIT is intelligent enough to remove entirely the 
redundant if but I don't think we should rely on that. Furthemore, to make it 
more readable you could possibly extra the check into a method, but feel free 
to modify as you see fit I don't feel strongly about it.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to