public class JoinableFactoryWrapper extends Object
JoinableFactory for working with Joinable related classes.| Constructor and Description |
|---|
JoinableFactoryWrapper(JoinableFactory joinableFactory) |
| Modifier and Type | Method and Description |
|---|---|
Optional<byte[]> |
computeJoinDataSourceCacheKey(DataSourceAnalysis dataSourceAnalysis)
Compute a cache key prefix for a join data source.
|
Function<SegmentReference,SegmentReference> |
createSegmentMapFn(Filter baseFilter,
List<PreJoinableClause> clauses,
AtomicLong cpuTimeAccumulator,
Query<?> query)
Creates a Function that maps base segments to
HashJoinSegment if needed (i.e. |
public JoinableFactoryWrapper(JoinableFactory joinableFactory)
public Function<SegmentReference,SegmentReference> createSegmentMapFn(@Nullable Filter baseFilter, List<PreJoinableClause> clauses, AtomicLong cpuTimeAccumulator, Query<?> query)
HashJoinSegment if needed (i.e. if the number of join
clauses is > 0). If mapping is not needed, this method will return Function.identity().baseFilter - Filter to apply before the join takes placeclauses - Pre-joinable clausescpuTimeAccumulator - 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 Joinablesquery - The query that will be run on the mapped segments. Usually this should be
analysis.getBaseQuery().orElse(query), where "analysis" is a
DataSourceAnalysis and "query" is the original
query from the end user.public Optional<byte[]> computeJoinDataSourceCacheKey(DataSourceAnalysis dataSourceAnalysis)
PreJoinableClause
- NULL - There is a join but caching is not possible. It may happen if one of the participating datasource
in the JOIN is not cacheable.dataSourceAnalysis - for the join datasource{@link - IAE} if this operation is called on a non-join data sourceCopyright © 2011–2021 The Apache Software Foundation. All rights reserved.