jcamachor commented on a change in pull request #831: HIVE-22238 pkfk
URL: https://github.com/apache/hive/pull/831#discussion_r341452795
##########
File path:
ql/src/java/org/apache/hadoop/hive/ql/optimizer/stats/annotation/StatsRulesProcFactory.java
##########
@@ -2255,8 +2259,14 @@ private long getCardinality(List<Operator<? extends
OperatorDesc>> ops, Integer
Statistics parentStats = parent.getStatistics();
if (fkInd == pos) {
// 2.1 This is the new number of rows after PK is joining with FK
- newrows = (long) Math.ceil(parentStats.getNumRows() *
pkfkSelectivity);
+ if (isFkFiltered) {
+ // if the foregin key is filtered by some condition we may not
rescale it
Review comment:
typo: `foregin`
----------------------------------------------------------------
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
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]