[Bug](DECIMAL) Fix bug for arithmatic expr DECIMALV2 / DECIMALV3 (#18723)
This commit is contained in:
@ -566,7 +566,7 @@ public class ArithmeticExpr extends Expr {
|
||||
if (((ScalarType) type).getScalarScale() != ((ScalarType) children.get(1).type).getScalarScale()) {
|
||||
castChild(type, 1);
|
||||
}
|
||||
} else if (op == Operator.DIVIDE && (t2Scale != 0) && t1.isDecimalV3()) {
|
||||
} else if (op == Operator.DIVIDE && (t2Scale != 0) && t1TargetType.isDecimalV3()) {
|
||||
int targetScale = t1Scale + t2Scale;
|
||||
if (precision < targetScale) {
|
||||
type = castBinaryOp(Type.DOUBLE);
|
||||
|
||||
Reference in New Issue
Block a user