[fix](planner) Keep type of null literal expr when register conjuncts (#15878)
For now, type information of child expr which is NullLiteral would get lost in the CastExpr#getResultValue, this will produce a NullLiteral with Null type which cause BE core when doing cast
This commit is contained in:
@ -417,7 +417,7 @@ public class CastExpr extends Expr {
|
||||
|
||||
private Expr castTo(LiteralExpr value) throws AnalysisException {
|
||||
if (value instanceof NullLiteral) {
|
||||
return value;
|
||||
return NullLiteral.create(targetTypeDef.getType());
|
||||
} else if (type.isIntegerType()) {
|
||||
return new IntLiteral(value.getLongValue(), type);
|
||||
} else if (type.isLargeIntType()) {
|
||||
|
||||
@ -75,7 +75,7 @@ public class FunctionParams implements Writable {
|
||||
}
|
||||
|
||||
public TAggregateExpr createTAggregateExpr(boolean isMergeAggFn) {
|
||||
List<TTypeDesc> paramTypes = new ArrayList<TTypeDesc>();
|
||||
List<TTypeDesc> paramTypes = new ArrayList<>();
|
||||
if (exprs != null) {
|
||||
for (Expr expr : exprs) {
|
||||
TTypeDesc desc = expr.getType().toThrift();
|
||||
|
||||
Reference in New Issue
Block a user