kasakrisz commented on a change in pull request #2268:
URL: https://github.com/apache/hive/pull/2268#discussion_r635199267



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java
##########
@@ -5031,7 +5038,7 @@ private RelNode genLogicalPlan(QB qb, boolean outerMostQB,
 
       // Build Rel for Constraint checks
       Pair<RelNode, RowResolver> constraintPair =
-          genConstraintFilterLogicalPlan(qb, srcRel, outerNameToPosMap, 
outerRR);
+          genConstraintFilterLogicalPlan(qb, selPair, outerNameToPosMap, 
outerRR);

Review comment:
       Went through the code where `selectRel` gets its value and I found that 
it can not be null:
   If is coming from `internalGenSelectLogicalPlan` which can create it with 
the following way
   ```
   outputRel = genUDTFPlan(genericUDTF, genericUDTFName, udtfTableAlias, 
udtfColAliases, qb,
   ...
           RelNode udtf = HiveTableFunctionScan.create(cluster, traitSet, list, 
rexNode, null, retType,
             null);
   outputRel = genSelectRelNode(columnList, outputRR, srcRel);
   ...
         HiveRelNode selRel = HiveProject.create(
   
   outputRel = new HiveAggregate(cluster, 
cluster.traitSetOf(HiveRelNode.CONVENTION),
   ```




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



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

Reply via email to