15 package com.cloudera.impala.planner;
17 import org.slf4j.Logger;
18 import org.slf4j.LoggerFactory;
23 import com.cloudera.impala.thrift.TExplainLevel;
24 import com.cloudera.impala.thrift.TPlanNode;
25 import com.cloudera.impala.thrift.TPlanNodeType;
26 import com.cloudera.impala.thrift.TQueryOptions;
27 import com.google.common.base.Objects;
33 private final static Logger
LOG = LoggerFactory.getLogger(CrossJoinNode.class);
41 tupleIds_.addAll(outer.getTupleIds());
42 tupleIds_.addAll(inner.getTupleIds());
43 tblRefIds_.addAll(outer.getTblRefIds());
44 tblRefIds_.addAll(inner.getTblRefIds());
50 nullableTupleIds_.addAll(outer.getNullableTupleIds());
51 nullableTupleIds_.addAll(inner.getNullableTupleIds());
62 super.computeStats(analyzer);
63 if (getChild(0).cardinality_ == -1 || getChild(1).cardinality_ == -1) {
72 LOG.debug(
"stats CrossJoin: cardinality=" + Long.toString(
cardinality_));
77 return Objects.toStringHelper(
this)
78 .addValue(super.debugString())
84 msg.node_type = TPlanNodeType.CROSS_JOIN_NODE;
89 TExplainLevel detailLevel) {
90 StringBuilder output =
new StringBuilder();
92 output.append(String.format(
"%s%s:%s [%s]\n", prefix, id_.toString(),
94 if (detailLevel.ordinal() >= TExplainLevel.STANDARD.ordinal()) {
96 output.append(detailPrefix +
"predicates: ")
100 return output.toString();
String getExplainString()
static final long DEFAULT_PER_HOST_MEM
CrossJoinNode(PlanNode outer, PlanNode inner)
void init(Analyzer analyzer)
static long multiplyCardinalities(long a, long b)
void toThrift(TPlanNode msg)
String getNodeExplainString(String prefix, String detailPrefix, TExplainLevel detailLevel)
double computeSelectivity()
void computeCosts(TQueryOptions queryOptions)
Set< ExprId > assignedConjuncts_
void computeStats(Analyzer analyzer)