okumin commented on a change in pull request #1531:
URL: https://github.com/apache/hive/pull/1531#discussion_r504422554
##########
File path:
ql/src/java/org/apache/hadoop/hive/ql/optimizer/stats/annotation/StatsRulesProcFactory.java
##########
@@ -2961,10 +2961,11 @@ public Object process(Node nd, Stack<Node> stack,
NodeProcessorCtx procCtx,
final Statistics selectStats =
parents.get(LateralViewJoinOperator.SELECT_TAG).getStatistics();
final Statistics udtfStats =
parents.get(LateralViewJoinOperator.UDTF_TAG).getStatistics();
- final double factor = (double) udtfStats.getNumRows() / (double)
selectStats.getNumRows();
+ final long udtfNumRows = Math.max(udtfStats.getNumRows(), 1);
+ final double factor = (double) udtfNumRows / (double)
Math.max(selectStats.getNumRows(), 1);
Review comment:
`factor` will be greater than 0.0 and must not 0 or infinity.
----------------------------------------------------------------
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]