[fix](planner) decimalv2 castTo decimalv2 should change type directly (#18297)
This commit is contained in:
@ -1435,6 +1435,13 @@ public abstract class Expr extends TreeNode<Expr> implements ParseNode, Cloneabl
|
||||
&& (this.type.isStringType() || this.type.isHllType())) {
|
||||
return this;
|
||||
}
|
||||
|
||||
if (targetType.getPrimitiveType() == PrimitiveType.DECIMALV2
|
||||
&& this.type.getPrimitiveType() == PrimitiveType.DECIMALV2) {
|
||||
this.type = targetType;
|
||||
return this;
|
||||
}
|
||||
|
||||
// Preconditions.checkState(PrimitiveType.isImplicitCast(type, targetType),
|
||||
// "cast %s to %s", this.type, targetType);
|
||||
// TODO(zc): use implicit cast
|
||||
|
||||
Reference in New Issue
Block a user