drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adeneche <...@git.apache.org>
Subject [GitHub] drill pull request: DRILL-1065: Support for ALTER ... RESET statem...
Date Mon, 21 Sep 2015 17:13:07 GMT
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message