sohami 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_r267421966
##########
File path:
exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/handlers/SetOptionHandler.java
##########
@@ -113,6 +113,12 @@ public PhysicalPlan getPlan(SqlNode sqlNode) throws
ValidationException, Foreman
}
}
+ // Skip writing profiles for "ALTER SESSION SET" queries
+ if (optionScope == OptionScope.SESSION &&
options.getBoolean(ExecConstants.SKIP_ALTER_SESSION_QUERY_PROFILE)) {
+ logger.debug("Will not write profile for ALTER SESSION SET ... ");
+ context.skipWritingProfile(true);
Review comment:
this logic can be moved to line 73. No need to again check for `optionScope`
here.
----------------------------------------------------------------
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