paul-rogers 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_r384260002
 
 

 ##########
 File path: 
exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/QueryWrapper.java
 ##########
 @@ -131,6 +146,52 @@ public QueryResult run(final WorkManager workManager, 
final WebUserConnection we
     return new QueryResult(queryId, webUserConnection, 
webUserConnection.results);
   }
 
+  private void applyOptions(WebUserConnection webUserConnection) throws 
BadRequestException {
 
 Review comment:
   This and the above can probably be simplified. Just keep the options as a 
string map until here. Then use `OptionManager.setLocalOption(String name, 
String value)`. (Why it is called "local" I don't know, nor do I know why we 
have one that takes an `Object` and another that takes a `String`, seems an 
unsafe overloading to me.) Anyway, that method does the very same string 
parsing this code does above, and avoids the need for the double type check.

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