Github user paul-rogers commented on a diff in the pull request:

    https://github.com/apache/drill/pull/923#discussion_r136659980
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/server/options/SystemOptionManager.java
 ---
    @@ -70,11 +69,13 @@
      *  </p>
      */
     
    -public class SystemOptionManager extends BaseOptionManager implements 
OptionManager, AutoCloseable {
    +public class SystemOptionManager extends BaseOptionManager implements 
AutoCloseable {
       private static final org.slf4j.Logger logger = 
org.slf4j.LoggerFactory.getLogger(SystemOptionManager.class);
     
    -  private CaseInsensitiveMap<OptionValidator> VALIDATORS;
    -  public void populateValidators() {
    +  public static final CaseInsensitiveMap<OptionValidator> 
DEFAULT_VALIDATORS =
    --- End diff --
    
    A compromise is to introduce a two-level table.
    
    * Global table of option metadata. Perhaps evolve the validator to be that 
metadata. Or, better, define a new `OptionDefinition` class, an attribute of 
which is the validator.
    * Per-Drillbit table of defaults resolved from the config system using the 
information from the definitions.
    
    If we do this, we should clean up all the messy enums in this system. The 
current ones confuse everyone. We want:
    
    * Definition: The allowed scope: session-only or both session and system.
    * Visibility: public or hidden (this change)
    * Data type: (long, double, string, etc.)
    
    For a value:
    
    * Scope: default, session or system.
    
    Sometimes it is easier to fix the original problems than to keep working 
around an outdated design...


---
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