[fix](nereids) Use precison and scale of decimal type column (#15025)

This commit is contained in:
Kikyou1997
2022-12-13 23:39:04 +08:00
committed by GitHub
parent bc3a35d962
commit 03e69d863e
2 changed files with 136 additions and 1 deletions

View File

@ -17,6 +17,7 @@
package org.apache.doris.nereids.types;
import org.apache.doris.catalog.ScalarType;
import org.apache.doris.catalog.Type;
import org.apache.doris.nereids.types.coercion.AbstractDataType;
import org.apache.doris.nereids.types.coercion.FractionalType;
@ -105,7 +106,7 @@ public class DecimalV2Type extends FractionalType {
@Override
public Type toCatalogDataType() {
return Type.MAX_DECIMALV2_TYPE;
return ScalarType.createDecimalType(precision, scale);
}
public int getPrecision() {