Github user skambha commented on a diff in the pull request:

    https://github.com/apache/spark/pull/19902#discussion_r155387973
  
    --- Diff: 
sql/core/src/main/java/org/apache/spark/sql/sources/v2/DataSourceV2Options.java 
---
    @@ -49,4 +49,22 @@ public DataSourceV2Options(Map<String, String> 
originalMap) {
       public Optional<String> get(String key) {
         return Optional.ofNullable(keyLowerCasedMap.get(toLowerCase(key)));
       }
    +
    +  public Optional<Boolean> getBoolean(String key) {
    --- End diff --
    
    good idea.   
    
    1. So I have implemented the getBoolean, getInt, and getLong using the 
defaultValue and added unit tests for it. 
     
    2. For now, I have left the other methods as well that return Optional<> 
keeping in line with the getString as it may still have some value.    
    
    Please take a look. 
    
    If we don't want (2), I can remove the version of the getBoolean, getLong, 
getInt that doesn't take the defaultValue.  
    
    Thanks for your comments.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to