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:
@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user