Currently, There are memory ConfigOptions in ExecutionConfigOptions such as table.exec.resource.external-buffer-memory, table.exec.resource.hash-agg.memory. They are all String type now. While when we need to get the memory size value, the String value should be converted to MemorySize type and then getting bytes value. Code likes:
The above code can be simplified if we change the ConfigOption type from String to MemorySize type. Many runtime ConfigOption s also use MemorySize type to define memory config. So I suggest we use MemorySize type instead of String type for memory ConfigOption in ExecutionConfigOptions.
Note: this is an incompatible change.