nzw921rx commented on PR #11738:
URL: https://github.com/apache/seatunnel/pull/11738#issuecomment-5278931327

   One follow-up suggestion:
   
    I think we can also complete the default-value handling here.
   
   Currently:
   
   ```java
   if (pluginConfig.getOptional(PrometheusSinkOptions.BATCH_SIZE).isPresent()) {
       
sinkConfig.setBatchSize(pluginConfig.get(PrometheusSinkOptions.BATCH_SIZE));
   }
   ```
   
   still means the declared default value is not applied when `batch_size` is 
omitted, because the assignment is skipped entirely.
   
   I suggest simplifying it to:
   
   ```java
   sinkConfig.setBatchSize(pluginConfig.get(PrometheusSinkOptions.BATCH_SIZE));
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to