[ 
https://issues.apache.org/jira/browse/DRILL-1065?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14901009#comment-14901009
 ] 

ASF GitHub Bot commented on DRILL-1065:
---------------------------------------

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

    https://github.com/apache/drill/pull/159#discussion_r39997204
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/server/options/InMemoryOptionManager.java
 ---
    @@ -54,12 +56,32 @@ boolean setLocalOption(final OptionValue value) {
         return options.values();
       }
     
    +  @Override
    +  boolean deleteLocalOptions(final OptionType type) {
    +    if (supportsOption(type)) {
    +      options.clear();
    +      return true;
    +    } else {
    +      return false;
    +    }
    +  }
    +
    +  @Override
    +  boolean deleteLocalOption(final String name, final OptionType type) {
    +    if (supportsOption(type)) {
    +      options.remove(name);
    +      return true;
    +    } else {
    +      return false;
    +    }
    +  }
    +
       /**
    -   * Check to see if implementations of this manager support the given 
option value (e.g. check for option type).
    +   * Check to see if implementations of this manager support the given 
option type.
        *
    -   * @param value the option value
    -   * @return true iff the option value is supported
    +   * @param type option type
    +   * @return true iff the type is supported
        */
    -  abstract boolean supportsOption(OptionValue value);
    +  abstract boolean supportsOption(OptionType type);
    --- End diff --
    
    you should probably rename this to `supportsOptionType` because we are 
effectively checking if the option type is supported. This will help the method 
be self explanatory


> Provide a reset command to reset an option to its default value
> ---------------------------------------------------------------
>
>                 Key: DRILL-1065
>                 URL: https://issues.apache.org/jira/browse/DRILL-1065
>             Project: Apache Drill
>          Issue Type: Improvement
>          Components: Execution - Flow
>            Reporter: Aman Sinha
>            Assignee: Sudheesh Katkam
>            Priority: Minor
>             Fix For: 1.2.0
>
>
> Within a session, currently we set configuration options and it would be very 
> useful to have a 'reset' command to reset the value of an option to its 
> default system value: 
>   ALTER SESSION RESET <option name> 
> If we don't want to add a new keyword for RESET, we could potentially 
> overload the SET command and allow the user to set to the 'default' value.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to