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_r384883516
##########
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:
Beyond the scope of this PR, but a better approach would be to implement a
`setOption(String name, Object value)` method in `BaseOptionManager`. Then,
build on that with a `setOptions<Map<String, Object>)` method. Then, we reuse
these methods in the several other places where we do such things. Filed
DRILL-7611 to track this request.
----------------------------------------------------------------
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