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

    https://github.com/apache/trafodion/pull/1612#discussion_r198292447
  
    --- Diff: core/sql/cli/SessionDefaults.cpp ---
    @@ -108,6 +108,7 @@ static const SessionDefaults::SessionDefaultMap 
sessionDefaultMap[] =
       SDEntry(SessionDefaults::SCHEMA,                   SCHEMA,               
      SessionDefaults::SDT_ASCII,          TRUE,    TRUE,  FALSE, FALSE),
       SDEntry(SessionDefaults::STATISTICS_VIEW_TYPE,     STATISTICS_VIEW_TYPE, 
      SessionDefaults::SDT_ASCII,          FALSE,   FALSE, TRUE,  TRUE),
       SDEntry(SessionDefaults::SUSPEND_LOGGING,          SUSPEND_LOGGING,      
      SessionDefaults::SDT_BOOLEAN,        FALSE,   FALSE, TRUE,  FALSE),
    +  SDEntry(SessionDefaults::USE_LIBHDFS,              USE_LIBHDFS,          
      SessionDefaults::SDT_BOOLEAN,        TRUE,    TRUE,  FALSE, FALSE),
    --- End diff --
    
    Yes, fixing all those CQDs to allow entries in the system defaults table 
would be nice. But, that will run into some design issues: CQDs affect 
compilation, session attributes affect the runtime, so there is a mismatch in 
the scope. I would prefer a solution that respects those designs. Would having 
a flag word in the statement globals help?
    
    You say that the USE_LIBHDFS CQD is just a fallback, but that is exactly 
what won't work if we don't support the system defaults table. Let's say a user 
would have to re-enable libhdfs because of some problem. If they can't do that 
in the system defaults table, they would have to change all their affected 
programs, which is not going to make them very happy. If it's just for fallback 
in case of problems, I think an environment variable will be better for users. 
I know that the CQD is of course better for our own testing.


---

Reply via email to