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

    https://github.com/apache/drill/pull/868#discussion_r131702178
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/server/options/FallbackOptionManager.java
 ---
    @@ -144,4 +144,27 @@ public OptionList getOptionList() {
         }
         return list;
       }
    +
    +  public OptionManager getFallback() {
    +    return fallback;
    +  }
    +
    +  /**
    +   * {@link FragmentOptionManager} and {@link SessionOptionManager} use 
{@link SystemOptionManager} as the fall back
    +   * manager so for both FragmentOptionManager and SessionOptionManager 
fallback is the SystemOptionManager so it is
    +   * returned. But in case of {@link QueryOptionManager}, it uses {@link 
SessionOptionManager} as the fallback manager
    +   * and since SessionOptionManager uses SystemOptionManager as fallback, 
SystemOptionManager can be fetched from the
    +   * SessionOptionManager.
    +   */
    +  public SystemOptionManager getSystemOptionManager() {
    +    final SystemOptionManager systemOptionManager;
    +    if(fallback instanceof SessionOptionManager) {
    --- End diff --
    
    Yes, Correct a System Option Manager is not a fallback for session option 
manager. FragmentOptionManager and SessionOptionManager use SystemOptionManager 
as the fall back manager so for both FragmentOptionManager and 
SessionOptionManager fallback is the System Option Manager so it is returned. 
But in the case of  QueryOptionManager, it uses Session Option Manager as the 
fallback manager
     and since Session Option Manager uses System Option Manager as the 
fallback, we need to go one level deep and fetch System Option Manager from the 
Session Option Manager.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to