Code review comment: Decimal need to set precision and scale. BTW, we have DecimalV3 now. i.e. DECIMAL32, DECIMAL64 and DECIMAL128

Code under review:
public static DataType convertFromCatalogDataType(Type catalogType) {
        if (catalogType instanceof ScalarType) {
            ScalarType scalarType = (ScalarType) catalogType;
            switch (scalarType.getPrimitiveType()) {
                case BOOLEAN:
                    return BooleanType.INSTANCE;
                case INT:
                    return IntegerType.INSTANCE;
                case BIGINT:
                    return BigIntType.INSTANCE;
                case DOUBLE:
                    return DoubleType.INSTANCE;
                case VARCHAR:
                    return VarcharType.createVarcharType(scalarType.getLength());
                case STRING:
                    return StringType.INSTANCE;
                case DATE:
                    return DateType.INSTANCE;
                case DATETIME:
                    return DateTimeType.INSTANCE;
                case DECIMALV2:
                    return DecimalType.INSTANCE;
                case NULL_TYPE:
                    return NullType.INSTANCE;
                default:
                    throw new AnalysisException("Nereids do not support type: " + scalarType.getPrimitiveType());
            }
        } else if (catalogType instanceof MapType) {
            throw new AnalysisException("Nereids do not support map type.");
        } else if (catalogType instanceof StructType) {
            throw new AnalysisException("Nereids do not support struct type.");
        } else if (catalogType instanceof ArrayType) {
            throw new AnalysisException("Nereids do not support array type.");
        } else if (catalogType instanceof MultiRowType) {
            throw new AnalysisException("Nereids do not support multi row type.");
        } else {
            throw new AnalysisException("Nereids do not support type: " + catalogType);
        }
    }

Line commented on: return DecimalType.INSTANCE;

Revised code:
public static DataType convertFromCatalogDataType(Type catalogType) {
        if (catalogType instanceof ScalarType) {
            ScalarType scalarType = (ScalarType) catalogType;
            switch (scalarType.getPrimitiveType()) {
                case BOOLEAN:
                    return BooleanType.INSTANCE;
                case INT:
                    return IntegerType.INSTANCE;
                case BIGINT:
                    return BigIntType.INSTANCE;
                case DOUBLE:
                    return DoubleType.INSTANCE;
                case VARCHAR:
                    return VarcharType.createVarcharType(scalarType.getLength());
                case STRING:
                    return StringType.INSTANCE;
                case DATE:
                    return DateType.INSTANCE;
                case DATETIME:
                    return DateTimeType.INSTANCE;
                case DECIMALV2:
                    return DecimalType.createDecimalType(scalarType.decimalPrecision(), scalarType.decimalScale());
                case NULL_TYPE:
                    return NullType.INSTANCE;
                default:
                    throw new AnalysisException("Nereids do not support type: " + scalarType.getPrimitiveType());
            }
        } else if (catalogType instanceof MapType) {
            throw new AnalysisException("Nereids do not support map type.");
        } else if (catalogType instanceof StructType) {
            throw new AnalysisException("Nereids do not support struct type.");
        } else if (catalogType instanceof ArrayType) {
            throw new AnalysisException("Nereids do not support array type.");
        } else if (catalogType instanceof MultiRowType) {
            throw new AnalysisException("Nereids do not support multi row type.");
        } else {
            throw new AnalysisException("Nereids do not support type: " + catalogType);
        }
    }