commit | 26850350e51a12b763c7e13df89877276cb5de14 | [log] [tgz] |
---|---|---|
author | buyingyi <buyingyi@gmail.com> | Tue May 14 13:25:21 2013 -0700 |
committer | buyingyi <buyingyi@gmail.com> | Tue May 14 13:25:21 2013 -0700 |
tree | c061148808a2d0bac222ee1e88b776646e07a5d5 | |
parent | e32223e164a37b0ce6e216f04b09df2bf9f4319c [diff] | |
parent | 1713d1a09f6e9c72ee0dec5791010fd50631d599 [diff] |
Merge branch 'yingyi/fullstack_beta_fix'
diff --git a/algebricks/algebricks-rewriter/src/main/java/edu/uci/ics/hyracks/algebricks/rewriter/rules/IntroduceGroupByForSubplanRule.java b/algebricks/algebricks-rewriter/src/main/java/edu/uci/ics/hyracks/algebricks/rewriter/rules/IntroduceGroupByForSubplanRule.java index 18c483e..489167f 100644 --- a/algebricks/algebricks-rewriter/src/main/java/edu/uci/ics/hyracks/algebricks/rewriter/rules/IntroduceGroupByForSubplanRule.java +++ b/algebricks/algebricks-rewriter/src/main/java/edu/uci/ics/hyracks/algebricks/rewriter/rules/IntroduceGroupByForSubplanRule.java
@@ -143,8 +143,10 @@ Set<LogicalVariable> pkVars = computeGbyVars(outerNts, free, context); if (pkVars == null || pkVars.size() < 1) { - // could not group only by primary keys - return false; + // there is no non-trivial primary key, group-by keys are all live variables + ILogicalOperator subplanInput = subplan.getInputs().get(0).getValue(); + pkVars = new HashSet<LogicalVariable>(); + VariableUtilities.getLiveVariables(subplanInput, pkVars); } AlgebricksConfig.ALGEBRICKS_LOGGER.fine("Found FD for introducing group-by: " + pkVars);