| Constructor and Description |
|---|
Joinables() |
| Modifier and Type | Method and Description |
|---|---|
static void |
checkPrefixesForDuplicatesAndShadowing(List<String> prefixes)
Check if any prefixes in the provided list duplicate or shadow each other.
|
static Function<SegmentReference,SegmentReference> |
createSegmentMapFn(List<PreJoinableClause> clauses,
JoinableFactory joinableFactory,
AtomicLong cpuTimeAccumulator,
Query<?> query)
Creates a Function that maps base segments to
HashJoinSegment if needed (i.e. |
static boolean |
isPrefixedBy(String columnName,
String prefix) |
static String |
validatePrefix(String prefix)
Checks that "prefix" is a valid prefix for a join clause (see
JoinableClause.getPrefix()) and, if so,
returns it. |
public static String validatePrefix(@Nullable String prefix)
JoinableClause.getPrefix()) and, if so,
returns it. Otherwise, throws an exception.public static Function<SegmentReference,SegmentReference> createSegmentMapFn(List<PreJoinableClause> clauses, JoinableFactory joinableFactory, 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().clauses - Pre-joinable clausesjoinableFactory - Factory for joinablescpuTimeAccumulator - 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 static void checkPrefixesForDuplicatesAndShadowing(List<String> prefixes)
prefixes - A mutable list containing the prefixes to check. This list will be sorted by descending
string length.Copyright © 2011–2020 The Apache Software Foundation. All rights reserved.