dongjoon-hyun commented on a change in pull request #29065:
URL: https://github.com/apache/spark/pull/29065#discussion_r467918094
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/DynamicPruning.scala
##########
@@ -67,7 +67,58 @@ case class DynamicPruningSubquery(
pruningKey.dataType == buildKeys(broadcastKeyIndex).dataType
}
- override def toString: String = s"dynamicpruning#${exprId.id}
$conditionString"
+ override def toString: String = s"partitionpruning#${exprId.id}
$conditionString"
+
+ override lazy val canonicalized: DynamicPruning = {
+ copy(
+ pruningKey = pruningKey.canonicalized,
+ buildQuery = buildQuery.canonicalized,
+ buildKeys = buildKeys.map(_.canonicalized),
+ exprId = ExprId(0))
+ }
+}
+
+/**
+ * The BloomFilterPruningSubquery expression is only used in join operations
to prune one side of
+ * the join with a filter from the other side of the join. It is inserted in
cases where shuffle
+ * pruning can be applied.
+ *
+ * @param pruningKey the filtering key of the plan to be pruned.
+ * @param buildQuery the build side of the join.
+ * @param buildKeys the join keys corresponding to the build side of the join
+ * @param broadcastKeyIndex the index of the filtering key collected from the
broadcast
+ */
+case class BloomFilterPruningSubquery(
+ pruningKey: Expression,
+ buildQuery: LogicalPlan,
+ buildKeys: Seq[Expression],
+ broadcastKeyIndex: Int,
+ exprId: ExprId = NamedExpression.newExprId)
+ extends SubqueryExpression(buildQuery, Seq(pruningKey), exprId)
+ with DynamicPruning
+ with Unevaluable {
Review comment:
Please see
https://github.com/databricks/scala-style-guide/blob/master/README.md#indent
and adjust the indentation.
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]