Github user DaveBirdsall commented on a diff in the pull request:
https://github.com/apache/incubator-trafodion/pull/174#discussion_r45124335
--- Diff: core/sql/optimizer/OptPhysRelExpr.cpp ---
@@ -3910,6 +3910,20 @@ InputPhysicalProperty* NestedJoin::generateIpp(
InputPhysicalProperty* ipp = NULL;
// ----------------------------------------------------------------
+ // If there is a cardinality constraint on the outer child, we'll
+ // pass that information along to the inner child.
+ // ----------------------------------------------------------------
+ Cardinality minRows;
+ Cardinality maxRows;
+ CardConstraint * outerCardinalityConstraint = NULL;
+
+ if (getGroupAttr()->hasCardConstraint(minRows, maxRows))
--- End diff --
Yes, the intent of the change is to send any cardinality constraint on the
result of the left child down to the right child scan as a constraint on the
number of probes. Before this change, no such constraint was passed down; we
relied on estimates only. The difference is a matter of certainty. MDAM was
considered dangerous to do on the inner child of a nested join due to
unreliability of estimates in some plans.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---