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 2021/04/07 11:59:33 UTC

[GitHub] [druid] clintropolis commented on a change in pull request #11068: Enable rewriting certain inner joins as filters.

clintropolis commented on a change in pull request #11068:
URL: https://github.com/apache/druid/pull/11068#discussion_r608306486



##########
File path: processing/src/main/java/org/apache/druid/query/Queries.java
##########
@@ -219,4 +224,73 @@
 
     return retVal;
   }
+
+  /**
+   * Helper for implementations of {@link Query#getRequiredColumns()}. Returns the list of columns that will be read
+   * out of a datasource by a query that uses the provided objects in the usual way.
+   *
+   * The returned set always contains {@code __time}, no matter what.
+   *
+   * If the virtual columns, filter, dimensions, aggregators, or additional columns refer to a virtual column, then the
+   * inputs of the virtual column will be returned instead of the name of the virtual column itself. Therefore, the
+   * returned list will never contain the names of any virtual columns.
+   *
+   * @param virtualColumns    virtual columns whose inputs should be included.
+   * @param filter            optional filter whose inputs should be included.
+   * @param dimensions        dimension specs whose inputs should be included.
+   * @param aggregators       aggregators whose inputs should be included.
+   * @param additionalColumns additional columns to include. Each of these will be added to the returned set, unless it
+   *                          refers to a virtual column, in which case the virtual column inputs will be added instead.
+   */
+  public static Set<String> computeRequiredColumns(

Review comment:
       :+1:




-- 
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



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