Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import org.apache.hyracks.algebricks.core.algebra.operators.logical.visitors.VariableUtilities;
import org.apache.hyracks.algebricks.core.algebra.util.OperatorPropertiesUtil;
import org.apache.hyracks.algebricks.core.rewriter.base.IAlgebraicRewriteRule;
import org.apache.hyracks.algebricks.rewriter.util.JoinUtils;

public class SimpleUnnestToProductRule implements IAlgebraicRewriteRule {

Expand Down Expand Up @@ -142,6 +143,8 @@ && descOrSelfIsSourceScan(currentOpRef.getValue())) {
context.computeAndSetTypeEnvironmentForOperator(boundaryOperator);
context.computeAndSetTypeEnvironmentForOperator(innerBranchOperator);
context.computeAndSetTypeEnvironmentForOperator(join);
JoinUtils.warnIfCrossProduct(join.getCondition().getValue(),
innerBranchOperator.getSourceLocation(), context);
return true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ private static BuildSide getHashJoinBuildSide(ILogicalExpression e, List<Logical
return null;
}

private static void warnIfCrossProduct(ILogicalExpression conditionExpr, SourceLocation sourceLoc,
public static void warnIfCrossProduct(ILogicalExpression conditionExpr, SourceLocation sourceLoc,
IOptimizationContext context) {
if (OperatorPropertiesUtil.isAlwaysTrueCond(conditionExpr) && sourceLoc != null) {
IWarningCollector warningCollector = context.getWarningCollector();
Expand Down