You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/10/05 19:57:30 UTC
[GitHub] [spark] amaliujia commented on a diff in pull request #38073: [SPARK-40632][SQL] Do not inject runtime filter if join condition reference non simple expression
amaliujia commented on code in PR #38073:
URL: https://github.com/apache/spark/pull/38073#discussion_r985308369
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/InjectRuntimeFilter.scala:
##########
@@ -281,6 +289,7 @@ object InjectRuntimeFilter extends Rule[LogicalPlan] with PredicateHelper with J
case join @ ExtractEquiJoinKeys(joinType, leftKeys, rightKeys, _, _, left, right, hint) =>
var newLeft = left
var newRight = right
+ val attributeMap = AttributeMap(join.children.flatMap(getAliasMap))
Review Comment:
Just curious, I might have missed some context here:
How can be Join's children to be Project or Aggregate based on
```
case p: Project => getAliasMap(p)
case a: Aggregate => getAliasMap(a)
```?
Based on the test case, I assume this is to identify if there is non-simple expression in, for example, join condition?>
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/InjectRuntimeFilter.scala:
##########
@@ -281,6 +289,7 @@ object InjectRuntimeFilter extends Rule[LogicalPlan] with PredicateHelper with J
case join @ ExtractEquiJoinKeys(joinType, leftKeys, rightKeys, _, _, left, right, hint) =>
var newLeft = left
var newRight = right
+ val attributeMap = AttributeMap(join.children.flatMap(getAliasMap))
Review Comment:
Just curious, I might have missed some context here:
How can be Join's children to be Project or Aggregate based on
```
case p: Project => getAliasMap(p)
case a: Aggregate => getAliasMap(a)
```
?
Based on the test case, I assume this is to identify if there is non-simple expression in, for example, join condition?>
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/InjectRuntimeFilter.scala:
##########
@@ -281,6 +289,7 @@ object InjectRuntimeFilter extends Rule[LogicalPlan] with PredicateHelper with J
case join @ ExtractEquiJoinKeys(joinType, leftKeys, rightKeys, _, _, left, right, hint) =>
var newLeft = left
var newRight = right
+ val attributeMap = AttributeMap(join.children.flatMap(getAliasMap))
Review Comment:
Just curious, I might have missed some context here:
How can be Join's children to be Project or Aggregate based on
```
case p: Project => getAliasMap(p)
case a: Aggregate => getAliasMap(a)
```
?
Based on the test case, I assume this is to identify if there is non-simple expression in, for example, join condition?
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/InjectRuntimeFilter.scala:
##########
@@ -281,6 +289,7 @@ object InjectRuntimeFilter extends Rule[LogicalPlan] with PredicateHelper with J
case join @ ExtractEquiJoinKeys(joinType, leftKeys, rightKeys, _, _, left, right, hint) =>
var newLeft = left
var newRight = right
+ val attributeMap = AttributeMap(join.children.flatMap(getAliasMap))
Review Comment:
Just curious, I might have missed some context here:
How can be Join's children to be Project or Aggregate based on
```
case p: Project => getAliasMap(p)
case a: Aggregate => getAliasMap(a)
```
?
Based on the test case, I assume this is to identify if there is non-simple expression in, for example, join condition which probably is a seq of expressions?
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/InjectRuntimeFilter.scala:
##########
@@ -281,6 +289,7 @@ object InjectRuntimeFilter extends Rule[LogicalPlan] with PredicateHelper with J
case join @ ExtractEquiJoinKeys(joinType, leftKeys, rightKeys, _, _, left, right, hint) =>
var newLeft = left
var newRight = right
+ val attributeMap = AttributeMap(join.children.flatMap(getAliasMap))
Review Comment:
Just curious, I might have missed some context here:
Why do you check Join's children to be Project or Aggregate based on
```
case p: Project => getAliasMap(p)
case a: Aggregate => getAliasMap(a)
```
?
Based on the test case, I assume this is to identify if there is non-simple expression in, for example, join condition which probably is a seq of expressions?
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org