Skip to content
Snippets Groups Projects
  • mathieu longtin's avatar
    902c15c5
    Support single argument version of sqlContext.getConf · 902c15c5
    mathieu longtin authored
    ## What changes were proposed in this pull request?
    
    In Python, sqlContext.getConf didn't allow getting the system default (getConf with one parameter).
    
    Now the following are supported:
    ```
    sqlContext.getConf(confName)  # System default if not locally set, this is new
    sqlContext.getConf(confName, myDefault)  # myDefault if not locally set, old behavior
    ```
    
    I also added doctests to this function. The original behavior does not change.
    
    ## How was this patch tested?
    
    Manually, but doctests were added.
    
    Author: mathieu longtin <mathieu.longtin@nuance.com>
    
    Closes #12488 from mathieulongtin/pyfixgetconf3.
    902c15c5
    History
    Support single argument version of sqlContext.getConf
    mathieu longtin authored
    ## What changes were proposed in this pull request?
    
    In Python, sqlContext.getConf didn't allow getting the system default (getConf with one parameter).
    
    Now the following are supported:
    ```
    sqlContext.getConf(confName)  # System default if not locally set, this is new
    sqlContext.getConf(confName, myDefault)  # myDefault if not locally set, old behavior
    ```
    
    I also added doctests to this function. The original behavior does not change.
    
    ## How was this patch tested?
    
    Manually, but doctests were added.
    
    Author: mathieu longtin <mathieu.longtin@nuance.com>
    
    Closes #12488 from mathieulongtin/pyfixgetconf3.