dobesv commented on a change in pull request #1997: DRILL-7604: Allow session 
options to be set in HTTP queries
URL: https://github.com/apache/drill/pull/1997#discussion_r384920526
 
 

 ##########
 File path: 
exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/QueryWrapper.java
 ##########
 @@ -131,6 +144,54 @@ public QueryResult run(final WorkManager workManager, 
final WebUserConnection we
     return new QueryResult(queryId, webUserConnection, 
webUserConnection.results);
   }
 
+  private void applyOptions(WebUserConnection webUserConnection) throws 
BadRequestException {
+    if (options != null && !options.isEmpty()) {
+      SessionOptionManager sessionOptionManager = 
webUserConnection.getSession().getOptions();
+      for (Map.Entry<String, Object> entry : options.entrySet()) {
 
 Review comment:
   Hmm, maybe.  I'm not sure that would ever be used anywhere else but in here, 
though.  Could probably hold off on that refactoring until you have at least 
two places where it would be useful.

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

Reply via email to