fix bug: tpch-q12 invalid type (#12347)

In old planner, Predicate set its type in analyzeImpl(). However, function analyzeImpl() is in old planner path, but not in nereids path. And hence the type is invalid.

Because all predicate has type bool, we set its type in constructor.
This commit is contained in:
minghong
2022-09-05 19:09:27 +08:00
committed by GitHub
parent dadfd85c40
commit f466a072d8

View File

@ -32,11 +32,13 @@ public abstract class Predicate extends Expr {
public Predicate() {
super();
type = Type.BOOLEAN;
this.isEqJoinConjunct = false;
}
protected Predicate(Predicate other) {
super(other);
type = other.type;
isEqJoinConjunct = other.isEqJoinConjunct;
}
@ -50,7 +52,6 @@ public abstract class Predicate extends Expr {
@Override
protected void analyzeImpl(Analyzer analyzer) throws AnalysisException {
type = Type.BOOLEAN;
// values: true/false/null
numDistinctValues = 3;
}