private boolean canDeriveDecimal(RelDataType type1, RelDataType type2) {
    return SqlTypeUtil.isExactNumeric(type1)
        && SqlTypeUtil.isExactNumeric(type2)
        && (SqlTypeUtil.isDecimal(type1) || SqlTypeUtil.isDecimal(type2));
  }
Java numeric will always have invalid precision/scale, use its default decimal precision/scale
instead.
amoro-format-mixed/amoro-mixed-flink/amoro-mixed-flink-common/src/main/java/org/apache/amoro/flink/planner/calcite/FlinkTypeSystem.java