@Override
  public RelDataType deriveSumType(RelDataTypeFactory typeFactory, RelDataType argRelDataType) {
    LogicalType argType = FlinkTypeFactory.toLogicalType(argRelDataType);
    LogicalType resultType = LogicalTypeMerging.findSumAggType(argType);
    return unwrapTypeFactory(typeFactory).createFieldTypeFromLogicalType(resultType);
  }
Custom type system for Flink.

<p>Copied from flink-1.18.
amoro-format-mixed/amoro-mixed-flink/amoro-mixed-flink-common/src/main/java/org/apache/amoro/flink/planner/calcite/FlinkTypeSystem.java