You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2020/01/05 22:34:44 UTC

[GitHub] [druid] gianm opened a new pull request #9130: Move result-to-array logic from SQL layer into QueryToolChests.

gianm opened a new pull request #9130: Move result-to-array logic from SQL layer into QueryToolChests.
URL: https://github.com/apache/druid/pull/9130
 
 
   The main changes are the removal of query-result-to-array code from `org.apache.druid.sql.calcite.rel.QueryMaker`, and the addition of these two methods to QueryToolChest:
   
   ```java
   List<String> resultArrayFields(QueryType query);
   Sequence<Object[]> resultsAsArrays(QueryType query, Sequence<ResultType> resultSequence);
   ```
   
   I think this improves the design of the code a little bit, but the main benefit is really to support joins on subqueries. The change is needed by this item from the proposal https://github.com/apache/druid/issues/8728:
   
   > Allow joining on to "query" datasources as well. To make this work, we’ll need to add a sense of a ‘standard translation’ of results from certain query types into flat schemas that we can offer column selectors on top of. There may be more than one way to do this, since certain query types (notably, topN and scan) return nested results in some cases. We could do this by adding a new QueryToolChest method.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] gianm merged pull request #9130: Move result-to-array logic from SQL layer into QueryToolChests.

Posted by GitBox <gi...@apache.org>.
gianm merged pull request #9130: Move result-to-array logic from SQL layer into QueryToolChests.
URL: https://github.com/apache/druid/pull/9130
 
 
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] clintropolis commented on a change in pull request #9130: Move result-to-array logic from SQL layer into QueryToolChests.

Posted by GitBox <gi...@apache.org>.
clintropolis commented on a change in pull request #9130: Move result-to-array logic from SQL layer into QueryToolChests.
URL: https://github.com/apache/druid/pull/9130#discussion_r367259286
 
 

 ##########
 File path: processing/src/main/java/org/apache/druid/query/QueryToolChest.java
 ##########
 @@ -269,4 +270,50 @@ public ObjectMapper decorateObjectMapper(final ObjectMapper objectMapper, final
   {
     return segments;
   }
+
+  /**
+   * Returns a list of field names in the order than {@link #resultsAsArrays} would return them. The returned list will
 
 Review comment:
   nit: should this be 'Returns a list of field names in the order _that_ ...'

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] gianm commented on a change in pull request #9130: Move result-to-array logic from SQL layer into QueryToolChests.

Posted by GitBox <gi...@apache.org>.
gianm commented on a change in pull request #9130: Move result-to-array logic from SQL layer into QueryToolChests.
URL: https://github.com/apache/druid/pull/9130#discussion_r367661337
 
 

 ##########
 File path: processing/src/main/java/org/apache/druid/query/QueryToolChest.java
 ##########
 @@ -269,4 +270,50 @@ public ObjectMapper decorateObjectMapper(final ObjectMapper objectMapper, final
   {
     return segments;
   }
+
+  /**
+   * Returns a list of field names in the order than {@link #resultsAsArrays} would return them. The returned list will
 
 Review comment:
   Yes, it should. I updated it. Thanks.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org