kgyrtkirk commented on a change in pull request #2943:
URL: https://github.com/apache/hive/pull/2943#discussion_r786971885



##########
File path: 
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveFilterProjectTransposeRule.java
##########
@@ -170,6 +171,7 @@ public void onMatch(RelOptRuleCall call) {
             if 
(HiveCalciteUtil.isDeterministicFuncWithSingleInputRef(newCondition,
                 commonPartitionKeys)) {
               newPartKeyFilConds.add(newCondition);
+              isConversionDone = true;

Review comment:
       * above line adds 1 element to `newPartKeyFilConds`
   * then the if at line180 will only fire in that case the collection is not 
empty
   * we will also have `isConversionDone` set to true (it will be set iff 
collection not empty|)
   * `getNewProject` has only one callsite => which will have 
`isConversionDone=true` all the time
   
   I think we could:
   * simply add `ce` to the `newPartKeyFilConds` and let the existing code push 
it...the non-over related codepath have been using external rex-es but now we 
add a pushed one...
   * I was thinking a different approach in with a rename of 
`filterCondToPushBelowProj` would happened to `filterCondPushedBelowProj`; but 
it seemed more complicated; 
   
   I think it would be better to add `ce` to that array in line#173.




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to