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_r236068784
 
 

 ##########
 File path: 
exec/java-exec/src/main/java/org/apache/drill/exec/server/options/FragmentOptionManager.java
 ##########
 @@ -34,7 +34,15 @@ public FragmentOptionManager(OptionManager systemOptions, 
OptionList options) {
 
   private static Map<String, OptionValue> getMapFromOptionList(final 
OptionList options) {
     final Map<String, OptionValue> tmp = Maps.newHashMap();
-    for (final OptionValue value : options) {
+    for (final OptionValue option : options) {
+      OptionValue value = tmp.get(option.name);
+      if (value != null) {
+        // As there may be the same option defined for different scopes
 
 Review comment:
   Could you please explain cases, when the same option defined for different 
scopes will be present in `options` list. Should this logic be added to other 
option managers?
   
   Is it possible to construct options list considering options precedence to 
avoid adding the same logic for other option managers?

----------------------------------------------------------------
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

Reply via email to