Package org.apache.druid.segment.join
Interface JoinableFactory
- All Known Implementing Classes:
FrameBasedInlineJoinableFactory,InlineJoinableFactory,MapJoinableFactory,NoopJoinableFactory
public interface JoinableFactory
Utility for creating
Joinable objects.- See Also:
-
to register factoriesto register factory types with datasource types
-
Method Summary
Modifier and TypeMethodDescriptionbuild(DataSource dataSource, JoinConditionAnalysis condition) Create a Joinable object.default Optional<byte[]>computeJoinCacheKey(DataSource dataSource, JoinConditionAnalysis condition) Compute the cache key for a data source participating in join operation.booleanisDirectlyJoinable(DataSource dataSource) Returns true if aJoinable**may** be created for a givenDataSource, but is not a guarantee thatbuild(org.apache.druid.query.DataSource, org.apache.druid.segment.join.JoinConditionAnalysis)will return a non-empty result.
-
Method Details
-
isDirectlyJoinable
Returns true if aJoinable**may** be created for a givenDataSource, but is not a guarantee thatbuild(org.apache.druid.query.DataSource, org.apache.druid.segment.join.JoinConditionAnalysis)will return a non-empty result. Successfully building aJoinablemight require specific criteria of theJoinConditionAnalysis. -
build
Create a Joinable object. This may be an expensive operation involving loading data, creating a hash table, etc.- Parameters:
dataSource- the datasource to join oncondition- the condition to join on- Returns:
- a Joinable if this datasource + condition combo is joinable; empty if not
-
computeJoinCacheKey
default Optional<byte[]> computeJoinCacheKey(DataSource dataSource, JoinConditionAnalysis condition) Compute the cache key for a data source participating in join operation. This is done separately from {build(DataSource, JoinConditionAnalysis)} which can be an expensive operation and can potentially be avoided if cached results can be used.- Parameters:
dataSource- the datasource to join oncondition- the condition to join on
-