suneet-s commented on a change in pull request #9247: Add JoinableFactory
interface and use it in the query stack.
URL: https://github.com/apache/druid/pull/9247#discussion_r370718897
##########
File path:
processing/src/main/java/org/apache/druid/segment/join/Joinables.java
##########
@@ -52,4 +61,56 @@ public static boolean isPrefixedBy(final String columnName,
final String prefix)
{
return columnName.startsWith(prefix) && columnName.length() >
prefix.length();
}
+
+ /**
+ * Creates a Function that maps base segments to {@link HashJoinSegment} if
needed (i.e. if the number of join
+ * clauses is > 0). If mapping is not needed, this method will return {@link
Function#identity()}.
+ *
+ * @param clauses pre-joinable clauses
+ * @param joinableFactory factory for joinables
+ * @param cpuTimeAccumulator an accumulator that we will add CPU nanos to;
this is part of the function to encourage
+ * callers to remember to track metrics on CPU
time required for creation of Joinables
+ */
+ public static Function<Segment, Segment> createSegmentMapFn(
Review comment:
missing unit tests?
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]