Github user sudheeshkatkam commented on a diff in the pull request:
https://github.com/apache/drill/pull/829#discussion_r117880322
--- Diff:
exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/QueryWrapper.java
---
@@ -68,36 +53,49 @@ public String getQueryType() {
return queryType;
}
- public UserBitShared.QueryType getType() {
- UserBitShared.QueryType type = UserBitShared.QueryType.SQL;
+ public QueryType getType() {
+ QueryType type = QueryType.SQL;
switch (queryType) {
- case "SQL" : type = UserBitShared.QueryType.SQL; break;
- case "LOGICAL" : type = UserBitShared.QueryType.LOGICAL; break;
- case "PHYSICAL" : type = UserBitShared.QueryType.PHYSICAL; break;
+ case "SQL":
+ type = QueryType.SQL;
+ break;
+ case "LOGICAL":
+ type = QueryType.LOGICAL;
+ break;
+ case "PHYSICAL":
+ type = QueryType.PHYSICAL;
+ break;
}
return type;
}
- public QueryResult run(final DrillClient client, final BufferAllocator
allocator) throws Exception {
- Listener listener = new Listener(allocator);
- client.runQuery(getType(), query, listener);
- listener.waitForCompletion();
- if (listener.results.isEmpty()) {
- listener.results.add(Maps.<String, String>newHashMap());
- }
+ public QueryResult run(final WorkManager workManager, final
WebUserConnection webUserConnection) throws Exception {
+
+ final UserProtos.RunQuery runQuery =
UserProtos.RunQuery.getDefaultInstance().newBuilderForType()
--- End diff --
`RunQuery.newBuilder().setType(...)...`
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---