mirror of https://github.com/apache/druid.git
Fix some naming related to AggregatePullUpLookupRule. (#15677)
It was called "split" rather than "pull up" in some places. This patch standardizes on "pull up".
This commit is contained in:
parent
0457c71d03
commit
866fe1cda6
|
@ -90,14 +90,14 @@ public class QueryLookupOperatorConversion implements SqlOperatorConversion
|
|||
false,
|
||||
replaceMissingValueWith,
|
||||
null,
|
||||
// If SplitLookupRule is disabled, then enable optimization at the extractionFn level, since a
|
||||
// If LOOKUP pull-up is disabled, then enable optimization at the extractionFn level, since a
|
||||
// similar optimization may be done by the native query toolchests. We'd like to ensure that if
|
||||
// people upgrade to a version where this rule was added, and then disable the rule due to some
|
||||
// problem with it, they still get any optimization that the native layer was able to do.
|
||||
//
|
||||
// Note that we don't check plannerContext.isReverseLookup(), because the native layer doesn't
|
||||
// optimize filters on RegisteredLookupExtractionFn anyway.
|
||||
!plannerContext.isSplitLookup()
|
||||
!plannerContext.isPullUpLookup()
|
||||
)
|
||||
);
|
||||
} else {
|
||||
|
|
|
@ -333,7 +333,7 @@ public class CalciteRulesManager
|
|||
builder.addRuleInstance(new FilterDecomposeConcatRule());
|
||||
|
||||
// Include rule to split injective LOOKUP across a GROUP BY.
|
||||
if (plannerContext.isSplitLookup()) {
|
||||
if (plannerContext.isPullUpLookup()) {
|
||||
builder.addRuleInstance(new AggregatePullUpLookupRule(plannerContext));
|
||||
}
|
||||
|
||||
|
|
|
@ -96,7 +96,7 @@ public class PlannerContext
|
|||
public static final boolean DEFAULT_SQL_USE_BOUNDS_AND_SELECTORS = NullHandling.replaceWithDefault();
|
||||
|
||||
/**
|
||||
* Context key for {@link PlannerContext#isSplitLookup()}.
|
||||
* Context key for {@link PlannerContext#isPullUpLookup()}.
|
||||
*/
|
||||
public static final String CTX_SQL_PULL_UP_LOOKUP = "sqlPullUpLookup";
|
||||
public static final boolean DEFAULT_SQL_PULL_UP_LOOKUP = true;
|
||||
|
@ -120,7 +120,7 @@ public class PlannerContext
|
|||
private final String sqlQueryId;
|
||||
private final boolean stringifyArrays;
|
||||
private final boolean useBoundsAndSelectors;
|
||||
private final boolean splitLookup;
|
||||
private final boolean pullUpLookup;
|
||||
private final boolean reverseLookup;
|
||||
private final CopyOnWriteArrayList<String> nativeQueryIds = new CopyOnWriteArrayList<>();
|
||||
private final PlannerHook hook;
|
||||
|
@ -148,7 +148,7 @@ public class PlannerContext
|
|||
final DateTime localNow,
|
||||
final boolean stringifyArrays,
|
||||
final boolean useBoundsAndSelectors,
|
||||
final boolean splitLookup,
|
||||
final boolean pullUpLookup,
|
||||
final boolean reverseLookup,
|
||||
final SqlEngine engine,
|
||||
final Map<String, Object> queryContext,
|
||||
|
@ -164,7 +164,7 @@ public class PlannerContext
|
|||
this.localNow = Preconditions.checkNotNull(localNow, "localNow");
|
||||
this.stringifyArrays = stringifyArrays;
|
||||
this.useBoundsAndSelectors = useBoundsAndSelectors;
|
||||
this.splitLookup = splitLookup;
|
||||
this.pullUpLookup = pullUpLookup;
|
||||
this.reverseLookup = reverseLookup;
|
||||
this.hook = hook == null ? NoOpPlannerHook.INSTANCE : hook;
|
||||
|
||||
|
@ -188,14 +188,14 @@ public class PlannerContext
|
|||
final DateTimeZone timeZone;
|
||||
final boolean stringifyArrays;
|
||||
final boolean useBoundsAndSelectors;
|
||||
final boolean splitLookup;
|
||||
final boolean pullUpLookup;
|
||||
final boolean reverseLookup;
|
||||
|
||||
final Object stringifyParam = queryContext.get(QueryContexts.CTX_SQL_STRINGIFY_ARRAYS);
|
||||
final Object tsParam = queryContext.get(CTX_SQL_CURRENT_TIMESTAMP);
|
||||
final Object tzParam = queryContext.get(CTX_SQL_TIME_ZONE);
|
||||
final Object useBoundsAndSelectorsParam = queryContext.get(CTX_SQL_USE_BOUNDS_AND_SELECTORS);
|
||||
final Object splitLookupParam = queryContext.get(CTX_SQL_PULL_UP_LOOKUP);
|
||||
final Object pullUpLookupParam = queryContext.get(CTX_SQL_PULL_UP_LOOKUP);
|
||||
final Object reverseLookupParam = queryContext.get(CTX_SQL_REVERSE_LOOKUP);
|
||||
|
||||
if (tsParam != null) {
|
||||
|
@ -222,10 +222,10 @@ public class PlannerContext
|
|||
useBoundsAndSelectors = DEFAULT_SQL_USE_BOUNDS_AND_SELECTORS;
|
||||
}
|
||||
|
||||
if (splitLookupParam != null) {
|
||||
splitLookup = Numbers.parseBoolean(splitLookupParam);
|
||||
if (pullUpLookupParam != null) {
|
||||
pullUpLookup = Numbers.parseBoolean(pullUpLookupParam);
|
||||
} else {
|
||||
splitLookup = DEFAULT_SQL_PULL_UP_LOOKUP;
|
||||
pullUpLookup = DEFAULT_SQL_PULL_UP_LOOKUP;
|
||||
}
|
||||
|
||||
if (reverseLookupParam != null) {
|
||||
|
@ -241,7 +241,7 @@ public class PlannerContext
|
|||
utcNow.withZone(timeZone),
|
||||
stringifyArrays,
|
||||
useBoundsAndSelectors,
|
||||
splitLookup,
|
||||
pullUpLookup,
|
||||
reverseLookup,
|
||||
engine,
|
||||
queryContext,
|
||||
|
@ -378,13 +378,12 @@ public class PlannerContext
|
|||
}
|
||||
|
||||
/**
|
||||
* Whether we should use {@link AggregatePullUpLookupRule} to split LOOKUP functions on injective lookups when they
|
||||
* are dimensions in aggregations, and whether we should set the "optimize" flag on
|
||||
* {@link RegisteredLookupExtractionFn}.
|
||||
* Whether we should use {@link AggregatePullUpLookupRule} to pull LOOKUP functions on injective lookups up above
|
||||
* a GROUP BY.
|
||||
*/
|
||||
public boolean isSplitLookup()
|
||||
public boolean isPullUpLookup()
|
||||
{
|
||||
return splitLookup;
|
||||
return pullUpLookup;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue