Github user nonstop-qfchen commented on a diff in the pull request:
https://github.com/apache/incubator-trafodion/pull/195#discussion_r46172874
--- Diff: core/sql/optimizer/ScanOptimizer.cpp ---
@@ -331,9 +338,22 @@ static NABoolean checkMDAMadditionalRestriction(const
ColumnOrderList& keyPredsB
if ( mtd_mdam_uec_threshold < 0 )
checkLeadingDivColumns = FALSE;
+ CostScalar totalRC = hist.getRowCount().getCeiling();
+
+ float totalUEC_threshold = 1;
+
+ Lng32 minRC =
(ActiveSchemaDB()->getDefaults()).getAsLong(MDAM_TOTAL_UEC_CHECK_MIN_RC_THRESHOLD);
+
+ if ( totalRC > minRC )
+
(ActiveSchemaDB()->getDefaults()).getFloat(MDAM_TOTAL_UEC_CHECK_UEC_THRESHOLD,
totalUEC_threshold);
+
+ totalUEC_threshold *= totalRC.getValue();
+
NABoolean isLeadingDivisionColumn = FALSE;
NABoolean isLeadingSaltColumn = FALSE;
+ CostScalar totalUecsForKeylessKeyColumns = 1;
--- End diff --
Good catch. Will make a change.
On Mon, Nov 30, 2015 at 11:08 AM, DaveBirdsall <[email protected]>
wrote:
> In core/sql/optimizer/ScanOptimizer.cpp
>
<https://github.com/apache/incubator-trafodion/pull/195#discussion_r46171726>
> :
>
> > NABoolean isLeadingDivisionColumn = FALSE;
> > NABoolean isLeadingSaltColumn = FALSE;
> >
> > + CostScalar totalUecsForKeylessKeyColumns = 1;
>
> Not sure what a keyless key column is. I'm guessing you meant, "key column
> lacking predicates"?
>
> â
> Reply to this email directly or view it on GitHub
> <https://github.com/apache/incubator-trafodion/pull/195/files#r46171726>.
>
--
Regards, --Qifan
---
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.
---