15 package com.cloudera.impala.planner;
17 import java.util.List;
19 import org.slf4j.Logger;
20 import org.slf4j.LoggerFactory;
25 import com.cloudera.impala.thrift.TExplainLevel;
26 import com.cloudera.impala.thrift.TPlanNode;
27 import com.cloudera.impala.thrift.TPlanNodeType;
28 import com.google.common.base.Preconditions;
34 private final static Logger
LOG = LoggerFactory.getLogger(SelectNode.class);
39 this.tblRefIds_ = child.tblRefIds_;
40 this.nullableTupleIds_ = child.nullableTupleIds_;
41 conjuncts_.addAll(conjuncts);
46 msg.node_type = TPlanNodeType.SELECT_NODE;
58 super.computeStats(analyzer);
59 if (getChild(0).cardinality_ == -1) {
66 LOG.debug(
"stats Select: cardinality=" + Long.toString(
cardinality_));
71 TExplainLevel detailLevel) {
72 StringBuilder output =
new StringBuilder();
73 output.append(String.format(
"%s%s:%s\n", prefix, id_.toString(),
displayName_));
74 if (detailLevel.ordinal() >= TExplainLevel.STANDARD.ordinal()) {
76 output.append(detailPrefix +
"predicates: " +
80 return output.toString();
String getNodeExplainString(String prefix, String detailPrefix, TExplainLevel detailLevel)
void toThrift(TPlanNode msg)
String getExplainString()
SelectNode(PlanNodeId id, PlanNode child, List< Expr > conjuncts)
ArrayList< TupleId > getTupleIds()
void createDefaultSmap(Analyzer analyzer)
void computeStats(Analyzer analyzer)
double computeSelectivity()
void init(Analyzer analyzer)