Ferenc Csaky created FLINK-35939:
------------------------------------

             Summary: Do not set empty config values via 
ConfigUtils#encodeCollectionToConfig
                 Key: FLINK-35939
                 URL: https://issues.apache.org/jira/browse/FLINK-35939
             Project: Flink
          Issue Type: Improvement
    Affects Versions: 1.19.1
            Reporter: Ferenc Csaky
             Fix For: 2.0.0


The {{ConfigUtils#encodeCollectionToConfig}} function only skips to set a given 
{{ConfigOption}} value, if that value is null. If the passed collection is 
empty, it will set that empty collection.

I think this behavior is less logical and can cause more undesired situations, 
when we only set a value if it is not empty AND not null.

Furthermore, the method's 
[javadoc|https://github.com/apache/flink/blob/82b628d4730eef32b2f7a022e3b73cb18f950e6e/flink-core/src/main/java/org/apache/flink/configuration/ConfigUtils.java#L73]
 describes the logic I just mentioned above, which is in conflict with the 
actual implementation and tests, which sets an empty collection.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to