kkhatua commented on a change in pull request #1703: DRILL-7110: Skip writing 
profile when an ALTER SESSION is executed
URL: https://github.com/apache/drill/pull/1703#discussion_r267143781
 
 

 ##########
 File path: 
exec/java-exec/src/main/java/org/apache/drill/exec/ExecConstants.java
 ##########
 @@ -838,7 +838,10 @@ private ExecConstants() {
    * for any query.
    */
   public static final String ENABLE_QUERY_PROFILE_OPTION = 
"exec.query_profile.save";
-  public static final BooleanValidator ENABLE_QUERY_PROFILE_VALIDATOR = new 
BooleanValidator(ENABLE_QUERY_PROFILE_OPTION, null);
+  public static final BooleanValidator ENABLE_QUERY_PROFILE_VALIDATOR = new 
BooleanValidator(ENABLE_QUERY_PROFILE_OPTION, new OptionDescription("Save 
completed profiles to the persistent store"));
+  //Allow to skip writing Alter Session profiles
+  public static final String SKIP_ALTER_SESSION_QUERY_PROFILE = 
"exec.query_profile.alter_session.skip";
+  public static final BooleanValidator SKIP_SESSION_QUERY_PROFILE_VALIDATOR = 
new BooleanValidator(SKIP_ALTER_SESSION_QUERY_PROFILE, new 
OptionDescription("Skip saving ALTER SESSION profiles"));
 
 Review comment:
   No. Any `ALTER SESSION ...` query will not be logged as the option[s] is set 
in SESSION scope. With `RESET` , any subsequent query will log with no Session 
options showing up in the profile. The proof of the altered session options 
will always show up in queries' profiles, so logging any `ALTER SESSION ...` 
query is redundant.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to