cgivre commented on a change in pull request #1539: DRILL-6847: Add Query 
Metadata to RESTful Interface
URL: https://github.com/apache/drill/pull/1539#discussion_r234997076
 
 

 ##########
 File path: 
exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/QueryWrapper.java
 ##########
 @@ -126,14 +128,23 @@ private float getHeapUsage() {
   public static class QueryResult {
     private final String queryId;
     public final Collection<String> columns;
+    public final HashMap<String, ArrayList> metadata;
     public final List<Map<String, String>> rows;
 
     public QueryResult(QueryId queryId, Collection<String> columns, 
List<Map<String, String>> rows) {
       this.queryId = QueryIdHelper.getQueryId(queryId);
       this.columns = columns;
+      this.metadata = new HashMap<String,ArrayList>();
       this.rows = rows;
     }
 
+    public QueryResult(QueryId queryId, WebUserConnection webUserConnection, 
List<Map<String, String>> rows) {
 
 Review comment:
   I left the original constructor because I wasn't sure if it was used 
elsewhere and I didn't want to break anything.  The new one passes the 
`webUserConnection` directly to the `QueryResult` and enables you to access all 
the newly added properties.
   
   I can remove the old one if you'd prefer.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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