clintropolis commented on a change in pull request #10366:
URL: https://github.com/apache/druid/pull/10366#discussion_r493188636
##########
File path:
processing/src/main/java/org/apache/druid/segment/join/JoinableFactory.java
##########
@@ -43,8 +43,18 @@
*
* @param dataSource the datasource to join on
* @param condition the condition to join on
- *
* @return a Joinable if this datasource + condition combo is joinable;
empty if not
*/
Optional<Joinable> build(DataSource dataSource, JoinConditionAnalysis
condition);
+
+ /**
+ * Compute the cache key for a data source participating in join operation.
This is done separately from {{@link #build(DataSource, JoinConditionAnalysis)}}
+ * which can be an expensive operation and can potentially be avoided if
cached results can be used.
+ *
+ * @param dataSource the datasource to join on
+ */
+ default Optional<byte[]> computeJoinCacheKey(DataSource dataSource)
Review comment:
+1 for having a consistent interface with `build` since they need to
make the same decisions. I'm not sure this PR is the correct venue to refactor
`build` so I would be in favor of adding `JoinConditionAnalysis` argument
----------------------------------------------------------------
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]