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


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to