jon-wei commented on a change in pull request #9516: More efficient join filter
rewrites
URL: https://github.com/apache/druid/pull/9516#discussion_r393376432
##########
File path:
processing/src/main/java/org/apache/druid/segment/join/filter/JoinFilterAnalyzer.java
##########
@@ -462,45 +559,14 @@ private static String
getCorrelatedBaseExprVirtualColumnName(int counter)
return clauseForFilteredTable.getJoinable().getCorrelatedColumnValues(
filterColumnNoPrefix,
filterValue,
- correlatedColumnNoPrefix
+ correlatedColumnNoPrefix,
+ filterRewriteMaxSize,
+ enableRewriteValueColumnFilters
);
}
- /**
- * For each rhs column that appears in the equiconditions for a table's
JoinableClause,
- * we try to determine what base table columns are related to the rhs column
through the total set of equiconditions.
- * We do this by searching backwards through the chain of join
equiconditions using the provided equicondition map.
- *
- * For example, suppose we have 3 tables, A,B,C, joined with the following
conditions, where A is the base table:
- * A.joinColumn == B.joinColumn
- * B.joinColum == C.joinColumn
- *
- * We would determine that C.joinColumn is correlated with A.joinColumn: we
first see that
- * C.joinColumn is linked to B.joinColumn which in turn is linked to
A.joinColumn
- *
- * Suppose we had the following join conditions instead:
- * f(A.joinColumn) == B.joinColumn
- * B.joinColum == C.joinColumn
- * In this case, the JoinFilterColumnCorrelationAnalysis for C.joinColumn
would be linked to f(A.joinColumn).
- *
- * Suppose we had the following join conditions instead:
- * A.joinColumn == B.joinColumn
- * f(B.joinColum) == C.joinColumn
- *
- * Because we cannot reverse the function f() applied to the second table B
in all cases,
- * we cannot relate C.joinColumn to A.joinColumn, and we would not generate
a correlation for C.joinColumn
- *
- * @param baseColumnNames Set of names of columns that belong to the
base table, including pre-join virtual
- * columns
- * @param tablePrefix Prefix for a join table
- * @param clauseForTablePrefix Joinable clause for the prefix
- * @param equiConditions Map of equiconditions, keyed by the right
hand columns
- *
- * @return A list of correlatation analyses for the equicondition RHS
columns that reside in the table associated with
- * the tablePrefix
- */
- private static Optional<List<JoinFilterColumnCorrelationAnalysis>>
findCorrelatedBaseTableColumns(
- Set<String> baseColumnNames,
+ private static Optional<Map<String, JoinFilterColumnCorrelationAnalysis>>
findCorrelatedBaseTableColumns(
Review comment:
Whoops, restored the missing javadocs
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]