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_r235489724
##########
File path:
exec/java-exec/src/main/java/org/apache/drill/exec/server/options/QueryOptionManager.java
##########
@@ -64,4 +74,25 @@ public OptionManager
getOptionManager(OptionValue.OptionScope scope) {
protected OptionValue.OptionScope getScope() {
return OptionValue.OptionScope.QUERY;
}
+
+ /**
+ * Creates all the OptionDefinitions to be registered with the {@link
QueryOptionManager}.
+ *
+ * @return a {@code CaseInsensitiveMap} containing option definitions for
+ * {@link OptionValue.AccessibleScopes#QUERY} scope
+ */
+ private static Map<String, OptionDefinition> createQueryOptionDefinitions() {
+ final OptionDefinition[] definitions = new OptionDefinition[] {
+ new OptionDefinition(ExecConstants.SQL_NODE_KIND_VALIDATOR,
+ new OptionMetaData(OptionValue.AccessibleScopes.QUERY, false,
true)),
+ };
+
+ return Arrays.stream(definitions)
Review comment:
Is it makes sense to create a map initially and fill it instead of creating
the array and converting it to the map?
----------------------------------------------------------------
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