[chore](planner) remove some useless code (#34430)
remove vectorAnalyze and computeOutputColumn function on Expr remove vectorOpcode and outputColumn attribute on Expr remove useless static LOG object on some Expr class
This commit is contained in:
@ -282,7 +282,6 @@ public class ArithmeticExpr extends Expr {
|
||||
msg.node_type = TExprNodeType.ARITHMETIC_EXPR;
|
||||
if (!(type.isDecimalV2() || type.isDecimalV3())) {
|
||||
msg.setOpcode(op.getOpcode());
|
||||
msg.setOutputColumn(outputColumn);
|
||||
}
|
||||
}
|
||||
|
||||
@ -294,20 +293,6 @@ public class ArithmeticExpr extends Expr {
|
||||
return ((ArithmeticExpr) obj).opcode == opcode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void computeOutputColumn(Analyzer analyzer) {
|
||||
super.computeOutputColumn(analyzer);
|
||||
|
||||
List<TupleId> tupleIds = Lists.newArrayList();
|
||||
getIds(tupleIds, null);
|
||||
Preconditions.checkArgument(tupleIds.size() == 1);
|
||||
|
||||
// for (Expr child : children) {
|
||||
// if (child.getOutputColumn() > analyzer.getTupleDesc(tupleIds.get(0)).getSlots().size()) {
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
private Type findCommonType(Type t1, Type t2) {
|
||||
PrimitiveType pt1 = t1.getPrimitiveType();
|
||||
PrimitiveType pt2 = t2.getPrimitiveType();
|
||||
|
||||
@ -41,8 +41,6 @@ import org.apache.doris.thrift.TExprOpcode;
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Range;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import java.io.DataInput;
|
||||
import java.io.DataOutput;
|
||||
@ -54,7 +52,6 @@ import java.util.Objects;
|
||||
* Most predicates with two operands..
|
||||
*/
|
||||
public class BinaryPredicate extends Predicate implements Writable {
|
||||
private static final Logger LOG = LogManager.getLogger(BinaryPredicate.class);
|
||||
|
||||
// true if this BinaryPredicate is inferred from slot equivalences, false otherwise.
|
||||
private boolean isInferred = false;
|
||||
@ -294,32 +291,9 @@ public class BinaryPredicate extends Predicate implements Writable {
|
||||
protected void toThrift(TExprNode msg) {
|
||||
msg.node_type = TExprNodeType.BINARY_PRED;
|
||||
msg.setOpcode(opcode);
|
||||
msg.setVectorOpcode(vectorOpcode);
|
||||
msg.setChildType(getChild(0).getType().getPrimitiveType().toThrift());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void vectorizedAnalyze(Analyzer analyzer) {
|
||||
super.vectorizedAnalyze(analyzer);
|
||||
Function match = null;
|
||||
|
||||
//OpcodeRegistry.BuiltinFunction match = OpcodeRegistry.instance().getFunctionInfo(
|
||||
// op.toFilterFunctionOp(), true, true, cmpType, cmpType);
|
||||
try {
|
||||
match = getBuiltinFunction(op.name, collectChildReturnTypes(),
|
||||
Function.CompareMode.IS_NONSTRICT_SUPERTYPE_OF);
|
||||
} catch (AnalysisException e) {
|
||||
Preconditions.checkState(false);
|
||||
}
|
||||
Preconditions.checkState(match != null);
|
||||
Preconditions.checkState(match.getReturnType().getPrimitiveType() == PrimitiveType.BOOLEAN);
|
||||
//todo(dhc): should add oppCode
|
||||
//this.vectorOpcode = match.opcode;
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug(debugString() + " opcode: " + vectorOpcode);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean canCompareDate(PrimitiveType t1, PrimitiveType t2) {
|
||||
if (t1.isDateType()) {
|
||||
if (t2.isDateType() || t2.isStringType() || t2.isIntegerType()) {
|
||||
|
||||
@ -24,8 +24,6 @@ import org.apache.doris.thrift.TExprNode;
|
||||
import org.apache.doris.thrift.TRuntimeFilterType;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
/**
|
||||
* Only used to plan the in bitmap syntax into join + bitmap filter.
|
||||
@ -33,8 +31,6 @@ import org.apache.logging.log4j.Logger;
|
||||
*/
|
||||
public class BitmapFilterPredicate extends Predicate {
|
||||
|
||||
private static final Logger LOG = LogManager.getLogger(BitmapFilterPredicate.class);
|
||||
|
||||
private boolean notIn = false;
|
||||
|
||||
BitmapFilterPredicate(Expr targetExpr, Expr srcExpr, boolean notIn) {
|
||||
|
||||
@ -250,7 +250,6 @@ public class CastExpr extends Expr {
|
||||
protected void toThrift(TExprNode msg) {
|
||||
msg.node_type = TExprNodeType.CAST_EXPR;
|
||||
msg.setOpcode(opcode);
|
||||
msg.setOutputColumn(outputColumn);
|
||||
if (type.isNativeType() && getChild(0).getType().isNativeType()) {
|
||||
msg.setChildType(getChild(0).getType().getPrimitiveType().toThrift());
|
||||
}
|
||||
|
||||
@ -23,13 +23,9 @@ import org.apache.doris.thrift.TColumnRef;
|
||||
import org.apache.doris.thrift.TExprNode;
|
||||
import org.apache.doris.thrift.TExprNodeType;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
public class ColumnRefExpr extends Expr {
|
||||
private static final Logger LOG = LogManager.getLogger(ColumnRefExpr.class);
|
||||
private String columnName;
|
||||
private int columnId;
|
||||
private boolean isNullable;
|
||||
|
||||
@ -30,8 +30,6 @@ import org.apache.doris.thrift.TExprNode;
|
||||
import org.apache.doris.thrift.TExprNodeType;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import java.io.DataInput;
|
||||
import java.io.DataOutput;
|
||||
@ -43,7 +41,6 @@ import java.nio.ByteOrder;
|
||||
import java.util.Objects;
|
||||
|
||||
public class DecimalLiteral extends NumericLiteralExpr {
|
||||
private static final Logger LOG = LogManager.getLogger(DecimalLiteral.class);
|
||||
private BigDecimal value;
|
||||
|
||||
public DecimalLiteral() {
|
||||
|
||||
@ -26,11 +26,8 @@ import org.apache.doris.common.ErrorReport;
|
||||
import org.apache.doris.thrift.TExprNode;
|
||||
|
||||
import com.google.common.base.Strings;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
public class EncryptKeyRef extends Expr {
|
||||
private static final Logger LOG = LogManager.getLogger(EncryptKeyRef.class);
|
||||
private EncryptKeyName encryptKeyName;
|
||||
private EncryptKey encryptKey;
|
||||
|
||||
|
||||
@ -20,14 +20,11 @@ package org.apache.doris.analysis;
|
||||
import org.apache.doris.thrift.TExprNode;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* Class representing a [NOT] EXISTS predicate.
|
||||
*/
|
||||
public class ExistsPredicate extends Predicate {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(ExistsPredicate.class);
|
||||
private boolean notExists = false;
|
||||
|
||||
public boolean isNotExists() {
|
||||
|
||||
@ -57,8 +57,6 @@ import com.google.common.base.Strings;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import java.io.DataInput;
|
||||
import java.io.DataOutput;
|
||||
@ -79,8 +77,6 @@ import java.util.stream.Collectors;
|
||||
*/
|
||||
public abstract class Expr extends TreeNode<Expr> implements ParseNode, Cloneable, Writable, ExprStats {
|
||||
|
||||
private static final Logger LOG = LogManager.getLogger(Expr.class);
|
||||
|
||||
// Name of the function that needs to be implemented by every Expr that
|
||||
// supports negation.
|
||||
private static final String NEGATE_FN = "negate";
|
||||
@ -237,27 +233,6 @@ public abstract class Expr extends TreeNode<Expr> implements ParseNode, Cloneabl
|
||||
selectivity = -1;
|
||||
}
|
||||
|
||||
/* TODO(zc)
|
||||
public final static com.google.common.base.Predicate<Expr>
|
||||
IS_NONDETERMINISTIC_BUILTIN_FN_PREDICATE =
|
||||
new com.google.common.base.Predicate<Expr>() {
|
||||
@Override
|
||||
public boolean apply(Expr arg) {
|
||||
return arg instanceof FunctionCallExpr
|
||||
&& ((FunctionCallExpr) arg).isNondeterministicBuiltinFn();
|
||||
}
|
||||
};
|
||||
|
||||
public final static com.google.common.base.Predicate<Expr> IS_UDF_PREDICATE =
|
||||
new com.google.common.base.Predicate<Expr>() {
|
||||
@Override
|
||||
public boolean apply(Expr arg) {
|
||||
return arg instanceof FunctionCallExpr
|
||||
&& !((FunctionCallExpr) arg).getFnName().isBuiltin();
|
||||
}
|
||||
};
|
||||
*/
|
||||
|
||||
// id that's unique across the entire query statement and is assigned by
|
||||
// Analyzer.registerConjuncts(); only assigned for the top-level terms of a
|
||||
// conjunction, and therefore null for most Exprs
|
||||
@ -275,7 +250,6 @@ public abstract class Expr extends TreeNode<Expr> implements ParseNode, Cloneabl
|
||||
protected boolean isAnalyzed = false; // true after analyze() has been called
|
||||
|
||||
protected TExprOpcode opcode; // opcode for this expr
|
||||
protected TExprOpcode vectorOpcode; // vector opcode for this expr
|
||||
|
||||
// estimated probability of a predicate evaluating to true;
|
||||
// set during analysis;
|
||||
@ -288,8 +262,6 @@ public abstract class Expr extends TreeNode<Expr> implements ParseNode, Cloneabl
|
||||
|
||||
protected int outputScale = -1;
|
||||
|
||||
protected int outputColumn = -1;
|
||||
|
||||
protected boolean isFilter = false;
|
||||
|
||||
// The function to call. This can either be a scalar or aggregate function.
|
||||
@ -310,7 +282,6 @@ public abstract class Expr extends TreeNode<Expr> implements ParseNode, Cloneabl
|
||||
super();
|
||||
type = Type.INVALID;
|
||||
opcode = TExprOpcode.INVALID_OPCODE;
|
||||
vectorOpcode = TExprOpcode.INVALID_OPCODE;
|
||||
selectivity = -1.0;
|
||||
numDistinctValues = -1;
|
||||
}
|
||||
@ -390,10 +361,6 @@ public abstract class Expr extends TreeNode<Expr> implements ParseNode, Cloneabl
|
||||
}
|
||||
}
|
||||
|
||||
public int getOutputColumn() {
|
||||
return outputColumn;
|
||||
}
|
||||
|
||||
public boolean isFilter() {
|
||||
return isFilter;
|
||||
}
|
||||
@ -943,31 +910,6 @@ public abstract class Expr extends TreeNode<Expr> implements ParseNode, Cloneabl
|
||||
return numDistinctValues;
|
||||
}
|
||||
|
||||
public void vectorizedAnalyze(Analyzer analyzer) {
|
||||
for (Expr child : children) {
|
||||
child.vectorizedAnalyze(analyzer);
|
||||
}
|
||||
}
|
||||
|
||||
public void computeOutputColumn(Analyzer analyzer) {
|
||||
for (Expr child : children) {
|
||||
child.computeOutputColumn(analyzer);
|
||||
LOG.info("child " + child.debugString() + " outputColumn: " + child.getOutputColumn());
|
||||
}
|
||||
|
||||
if (!isConstant() && !isFilter) {
|
||||
List<TupleId> tupleIds = Lists.newArrayList();
|
||||
getIds(tupleIds, null);
|
||||
Preconditions.checkArgument(tupleIds.size() == 1);
|
||||
|
||||
int currentOutputColumn = analyzer.getCurrentOutputColumn(tupleIds.get(0));
|
||||
this.outputColumn = currentOutputColumn;
|
||||
LOG.info(debugString() + " outputColumn: " + this.outputColumn);
|
||||
++currentOutputColumn;
|
||||
analyzer.setCurrentOutputColumn(tupleIds.get(0), currentOutputColumn);
|
||||
}
|
||||
}
|
||||
|
||||
public String toSql() {
|
||||
return (printSqlInParens) ? "(" + toSqlImpl() + ")" : toSqlImpl();
|
||||
}
|
||||
|
||||
@ -21,9 +21,6 @@ import org.apache.doris.catalog.Function;
|
||||
import org.apache.doris.catalog.Type;
|
||||
import org.apache.doris.common.AnalysisException;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@ -32,7 +29,6 @@ import java.util.List;
|
||||
* real slots, and then set real slot to realChildren
|
||||
*/
|
||||
public class GroupingFunctionCallExpr extends FunctionCallExpr {
|
||||
private static final Logger LOG = LogManager.getLogger(FunctionCallExpr.class);
|
||||
private boolean childrenReseted = false;
|
||||
private List<Expr> realChildren;
|
||||
|
||||
|
||||
@ -23,13 +23,9 @@ import org.apache.doris.thrift.TExprNode;
|
||||
import org.apache.doris.thrift.TExprNodeType;
|
||||
import org.apache.doris.thrift.TIPv4Literal;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public class IPv4Literal extends LiteralExpr {
|
||||
private static final Logger LOG = LogManager.getLogger(IPv4Literal.class);
|
||||
|
||||
public static final long IPV4_MIN = 0L; // 0.0.0.0
|
||||
public static final long IPV4_MAX = (2L << 31) - 1; // 255.255.255.255
|
||||
|
||||
@ -23,13 +23,9 @@ import org.apache.doris.thrift.TExprNode;
|
||||
import org.apache.doris.thrift.TExprNodeType;
|
||||
import org.apache.doris.thrift.TIPv6Literal;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public class IPv6Literal extends LiteralExpr {
|
||||
private static final Logger LOG = LogManager.getLogger(IPv6Literal.class);
|
||||
|
||||
public static final String IPV6_MIN = "0:0:0:0:0:0:0:0";
|
||||
public static final String IPV6_MAX = "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff";
|
||||
|
||||
@ -35,8 +35,6 @@ import org.apache.doris.thrift.TInPredicate;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.google.common.collect.Lists;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@ -47,7 +45,6 @@ import java.util.List;
|
||||
* of values (remaining children).
|
||||
*/
|
||||
public class InPredicate extends Predicate {
|
||||
private static final Logger LOG = LogManager.getLogger(InPredicate.class);
|
||||
|
||||
private static final String IN_SET_LOOKUP = "in_set_lookup";
|
||||
private static final String NOT_IN_SET_LOOKUP = "not_in_set_lookup";
|
||||
@ -162,11 +159,6 @@ public class InPredicate extends Predicate {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void vectorizedAnalyze(Analyzer analyzer) {
|
||||
super.vectorizedAnalyze(analyzer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void analyzeImpl(Analyzer analyzer) throws AnalysisException {
|
||||
super.analyzeImpl(analyzer);
|
||||
@ -206,7 +198,6 @@ public class InPredicate extends Predicate {
|
||||
}
|
||||
} else {
|
||||
analyzer.castAllToCompatibleType(children);
|
||||
vectorizedAnalyze(analyzer);
|
||||
}
|
||||
|
||||
boolean allConstant = true;
|
||||
@ -273,7 +264,6 @@ public class InPredicate extends Predicate {
|
||||
msg.in_predicate = new TInPredicate(isNotIn);
|
||||
msg.node_type = TExprNodeType.IN_PRED;
|
||||
msg.setOpcode(opcode);
|
||||
msg.setVectorOpcode(vectorOpcode);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -27,8 +27,6 @@ import org.apache.doris.thrift.TExprNodeType;
|
||||
import org.apache.doris.thrift.TIntLiteral;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import java.io.DataInput;
|
||||
import java.io.DataOutput;
|
||||
@ -38,7 +36,6 @@ import java.nio.ByteBuffer;
|
||||
import java.nio.ByteOrder;
|
||||
|
||||
public class IntLiteral extends NumericLiteralExpr {
|
||||
private static final Logger LOG = LogManager.getLogger(IntLiteral.class);
|
||||
|
||||
public static final long TINY_INT_MIN = Byte.MIN_VALUE; // -2^7 ~ 2^7 - 1
|
||||
public static final long TINY_INT_MAX = Byte.MAX_VALUE;
|
||||
|
||||
@ -26,8 +26,6 @@ import org.apache.doris.thrift.TJsonLiteral;
|
||||
|
||||
import com.google.gson.JsonParser;
|
||||
import com.google.gson.JsonSyntaxException;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import java.io.DataInput;
|
||||
import java.io.DataOutput;
|
||||
@ -35,7 +33,6 @@ import java.io.IOException;
|
||||
import java.util.Objects;
|
||||
|
||||
public class JsonLiteral extends LiteralExpr {
|
||||
private static final Logger LOG = LogManager.getLogger(JsonLiteral.class);
|
||||
private JsonParser parser = new JsonParser();
|
||||
private String value;
|
||||
// Means the converted session variable need to be cast to int, such as "cast 'STRICT_TRANS_TABLES' to Integer".
|
||||
|
||||
@ -23,15 +23,11 @@ import org.apache.doris.common.AnalysisException;
|
||||
import org.apache.doris.thrift.TExprNode;
|
||||
import org.apache.doris.thrift.TExprNodeType;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
|
||||
public class LambdaFunctionExpr extends Expr {
|
||||
private static final Logger LOG = LogManager.getLogger(LambdaFunctionExpr.class);
|
||||
private ArrayList<String> names = new ArrayList<>();
|
||||
private ArrayList<Expr> slotExpr = new ArrayList<>();
|
||||
private ArrayList<Expr> params = new ArrayList<>();
|
||||
|
||||
@ -25,9 +25,6 @@ import org.apache.doris.thrift.TExprNode;
|
||||
import org.apache.doris.thrift.TExprNodeType;
|
||||
import org.apache.doris.thrift.TLargeIntLiteral;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import java.io.DataInput;
|
||||
import java.io.DataOutput;
|
||||
import java.io.IOException;
|
||||
@ -39,8 +36,6 @@ import java.util.Objects;
|
||||
|
||||
// large int for the num that native types can not
|
||||
public class LargeIntLiteral extends NumericLiteralExpr {
|
||||
private static final Logger LOG = LogManager.getLogger(LargeIntLiteral.class);
|
||||
|
||||
// -2^127
|
||||
public static final BigInteger LARGE_INT_MIN = new BigInteger("-170141183460469231731687303715884105728");
|
||||
// 2^127 - 1
|
||||
|
||||
@ -33,8 +33,6 @@ import org.apache.doris.thrift.TMatchPredicate;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.google.common.collect.Lists;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@ -44,7 +42,6 @@ import java.util.Objects;
|
||||
* filed MATCH query_str
|
||||
*/
|
||||
public class MatchPredicate extends Predicate {
|
||||
private static final Logger LOG = LogManager.getLogger(MatchPredicate.class);
|
||||
|
||||
public enum Operator {
|
||||
MATCH_ANY("MATCH_ANY", "match_any", TExprOpcode.MATCH_ANY),
|
||||
|
||||
@ -24,8 +24,6 @@ import org.apache.doris.common.NotImplementedException;
|
||||
import org.apache.doris.thrift.TExprNode;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import java.io.DataInput;
|
||||
import java.io.DataOutput;
|
||||
@ -34,7 +32,6 @@ import java.nio.ByteBuffer;
|
||||
|
||||
// PlaceHolderExpr is a reference class point to real LiteralExpr
|
||||
public class PlaceHolderExpr extends LiteralExpr {
|
||||
private static final Logger LOG = LogManager.getLogger(LiteralExpr.class);
|
||||
private LiteralExpr lExpr;
|
||||
int mysqlTypeCode = -1;
|
||||
|
||||
|
||||
@ -40,8 +40,6 @@ import com.google.common.base.Objects;
|
||||
import com.google.common.base.Preconditions;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import java.io.DataInput;
|
||||
import java.io.DataOutput;
|
||||
@ -53,7 +51,6 @@ import java.util.Set;
|
||||
import java.util.TreeSet;
|
||||
|
||||
public class SlotRef extends Expr {
|
||||
private static final Logger LOG = LogManager.getLogger(SlotRef.class);
|
||||
private TableName tblName;
|
||||
private TableIf table = null;
|
||||
private TupleId tupleId = null;
|
||||
@ -201,25 +198,12 @@ public class SlotRef extends Expr {
|
||||
if ((thisColumnName == null) != (srcColumnName == null)) {
|
||||
return false;
|
||||
}
|
||||
if (thisColumnName != null && !thisColumnName.toLowerCase().equals(srcColumnName.toLowerCase())) {
|
||||
if (thisColumnName != null && !thisColumnName.equalsIgnoreCase(srcColumnName)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void vectorizedAnalyze(Analyzer analyzer) {
|
||||
computeOutputColumn(analyzer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void computeOutputColumn(Analyzer analyzer) {
|
||||
outputColumn = desc.getSlotOffset();
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("SlotRef: " + debugString() + " outputColumn: " + outputColumn);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void analyzeImpl(Analyzer analyzer) throws AnalysisException {
|
||||
desc = analyzer.registerColumnRef(tblName, col, subColPath);
|
||||
@ -364,7 +348,6 @@ public class SlotRef extends Expr {
|
||||
msg.node_type = TExprNodeType.SLOT_REF;
|
||||
msg.slot_ref = new TSlotRef(desc.getId().asInt(), desc.getParent().getId().asInt());
|
||||
msg.slot_ref.setColUniqueId(desc.getUniqueId());
|
||||
msg.setOutputColumn(outputColumn);
|
||||
msg.setLabel(label);
|
||||
}
|
||||
|
||||
|
||||
@ -21,8 +21,6 @@ import org.apache.doris.catalog.Type;
|
||||
import org.apache.doris.common.AnalysisException;
|
||||
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import java.io.DataInput;
|
||||
import java.io.DataOutput;
|
||||
@ -36,9 +34,7 @@ import java.util.Set;
|
||||
* It like a SlotRef except that it is not a real column exist in table.
|
||||
*/
|
||||
public class VirtualSlotRef extends SlotRef {
|
||||
private static final Logger LOG = LogManager.getLogger(VirtualSlotRef.class);
|
||||
// results of analysis slot
|
||||
|
||||
private TupleDescriptor tupleDescriptor;
|
||||
private List<Expr> realSlots;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user