[ https://issues.apache.org/jira/browse/DRILL-1065?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14804505#comment-14804505 ]
ASF GitHub Bot commented on DRILL-1065: --------------------------------------- Github user adeneche commented on a diff in the pull request: https://github.com/apache/drill/pull/159#discussion_r39798736 --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/server/options/SessionOptionManager.java --- @@ -46,6 +47,33 @@ public SessionOptionManager(final OptionManager systemOptions, final UserSession } @Override + public void deleteOption(final String name, final OptionValue.OptionType type) { + if (type == OptionValue.OptionType.SESSION) { + try { // ensure option exists + SystemOptionManager.getValidator(name); + } catch (final IllegalArgumentException e) { + throw UserException.validationError() + .message(e.getMessage()) + .build(logger); + } + options.remove(name); + shortLivedOptions.remove(name); + } else { + fallback.deleteOption(name, type); --- End diff -- so if I change an option both at the _session_ and _system_ levels, then I _reset_ the same option at the _system_ level it will leave it changed at the _session_ level. Is this expected ? > Provide a reset command to reset an option to its default value > --------------------------------------------------------------- > > Key: DRILL-1065 > URL: https://issues.apache.org/jira/browse/DRILL-1065 > Project: Apache Drill > Issue Type: Improvement > Components: Execution - Flow > Reporter: Aman Sinha > Assignee: Sudheesh Katkam > Priority: Minor > Fix For: 1.2.0 > > > Within a session, currently we set configuration options and it would be very > useful to have a 'reset' command to reset the value of an option to its > default system value: > ALTER SESSION RESET <option name> > If we don't want to add a new keyword for RESET, we could potentially > overload the SET command and allow the user to set to the 'default' value. -- This message was sent by Atlassian JIRA (v6.3.4#6332)