drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sohami <...@git.apache.org>
Subject [GitHub] drill pull request #829: DRILL-5485: Remove WebServer dependency on DrillCli...
Date Wed, 24 May 2017 07:03:35 GMT
Github user sohami commented on a diff in the pull request:

    https://github.com/apache/drill/pull/829#discussion_r118159204
  
    --- 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 --
    
    Fixed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message