vvysotskyi commented on a change in pull request #1549: DRILL-6834: Introduce
option to disable result set on CTAS, create vi…
URL: https://github.com/apache/drill/pull/1549#discussion_r236006870
##########
File path:
exec/java-exec/src/main/java/org/apache/drill/exec/server/options/OptionValue.java
##########
@@ -84,7 +84,31 @@ public boolean inScopeOf(OptionScope scope) {
* This defines where an option was actually configured.
*/
public enum OptionScope {
- BOOT, SYSTEM, SESSION, QUERY;
+
+ BOOT(3),
+ SYSTEM(2),
+ SESSION(1),
+ QUERY(0);
+
+ /**
+ * Defines precedence for a scope.
+ * Scope with least value overrides one with bigger value.
+ */
+ private final int precedence;
Review comment:
Is it required to define it? Enums are already comparable, so we can use the
order of the element as its precedence.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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