From ef3d24e88668c150f65b844574cad665b6d498c4 Mon Sep 17 00:00:00 2001 From: Gian Merlino Date: Wed, 26 Feb 2020 22:07:33 -0800 Subject: [PATCH] Add javadocs for enableFilterPushDown. (#9423) --- .../apache/druid/segment/join/HashJoinSegment.java | 9 +++++---- .../segment/join/HashJoinSegmentStorageAdapter.java | 11 ++++++----- .../java/org/apache/druid/segment/join/Joinables.java | 10 ++++++---- 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/processing/src/main/java/org/apache/druid/segment/join/HashJoinSegment.java b/processing/src/main/java/org/apache/druid/segment/join/HashJoinSegment.java index 4c7892f4082..b19bc0f56d8 100644 --- a/processing/src/main/java/org/apache/druid/segment/join/HashJoinSegment.java +++ b/processing/src/main/java/org/apache/druid/segment/join/HashJoinSegment.java @@ -43,10 +43,11 @@ public class HashJoinSegment extends AbstractSegment private final boolean enableFilterPushDown; /** - * @param baseSegment The left-hand side base segment - * @param clauses The right-hand side clauses. The caller is responsible for ensuring that there are no - * duplicate prefixes or prefixes that shadow each other across the clauses - * @param enableFilterPushDown Whether to enable filter push down optimizations to the base segment + * @param baseSegment The left-hand side base segment + * @param clauses The right-hand side clauses. The caller is responsible for ensuring that there are no + * duplicate prefixes or prefixes that shadow each other across the clauses + * @param enableFilterPushDown Whether to enable filter push down optimizations to the base segment. In production + * this should generally be {@code QueryContexts.getEnableJoinFilterPushDown(query)}. */ public HashJoinSegment( Segment baseSegment, diff --git a/processing/src/main/java/org/apache/druid/segment/join/HashJoinSegmentStorageAdapter.java b/processing/src/main/java/org/apache/druid/segment/join/HashJoinSegmentStorageAdapter.java index 932da6ff4ba..99cf4a33cb0 100644 --- a/processing/src/main/java/org/apache/druid/segment/join/HashJoinSegmentStorageAdapter.java +++ b/processing/src/main/java/org/apache/druid/segment/join/HashJoinSegmentStorageAdapter.java @@ -58,9 +58,9 @@ public class HashJoinSegmentStorageAdapter implements StorageAdapter private final boolean enableFilterPushDown; /** - * @param baseAdapter A StorageAdapter for the left-hand side base segment - * @param clauses The right-hand side clauses. The caller is responsible for ensuring that there are no - * duplicate prefixes or prefixes that shadow each other across the clauses + * @param baseAdapter A StorageAdapter for the left-hand side base segment + * @param clauses The right-hand side clauses. The caller is responsible for ensuring that there are no + * duplicate prefixes or prefixes that shadow each other across the clauses * @param enableFilterPushDown Whether to enable filter push down optimizations to the base segment */ HashJoinSegmentStorageAdapter( @@ -305,9 +305,10 @@ public class HashJoinSegmentStorageAdapter implements StorageAdapter * will add each VirtualColumn in the provided virtualColumns to either preJoinVirtualColumns or * postJoinVirtualColumns based on whether the virtual column is pre-join or post-join. * - * @param virtualColumns List of virtual columns from the query - * @param preJoinVirtualColumns If provided, virtual columns determined to be pre-join will be added to this list + * @param virtualColumns List of virtual columns from the query + * @param preJoinVirtualColumns If provided, virtual columns determined to be pre-join will be added to this list * @param postJoinVirtualColumns If provided, virtual columns determined to be post-join will be added to this list + * * @return The set of base column names, including any pre-join virtual columns. */ public Set determineBaseColumnsWithPreAndPostJoinVirtualColumns( diff --git a/processing/src/main/java/org/apache/druid/segment/join/Joinables.java b/processing/src/main/java/org/apache/druid/segment/join/Joinables.java index b1c545abb4d..1d9dae6245c 100644 --- a/processing/src/main/java/org/apache/druid/segment/join/Joinables.java +++ b/processing/src/main/java/org/apache/druid/segment/join/Joinables.java @@ -71,10 +71,12 @@ public class Joinables * 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 + * @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 + * @param enableFilterPushDown whether to enable filter push down optimizations to the base segment. In production + * this should generally be {@code QueryContexts.getEnableJoinFilterPushDown(query)}. */ public static Function createSegmentMapFn( final List clauses,