wForget commented on code in PR #43869:
URL: https://github.com/apache/spark/pull/43869#discussion_r1399297830
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/dynamicpruning/RowLevelOperationRuntimeGroupFiltering.scala:
##########
@@ -51,7 +51,8 @@ class
RowLevelOperationRuntimeGroupFiltering(optimizeSubqueries: Rule[LogicalPla
// apply special dynamic filtering only for group-based row-level
operations
case GroupBasedRowLevelOperation(replaceData, _, Some(cond),
DataSourceV2ScanRelation(_, scan: SupportsRuntimeV2Filtering, _, _, _))
- if conf.runtimeRowLevelOperationGroupFilterEnabled && cond !=
TrueLiteral =>
+ if conf.runtimeRowLevelOperationGroupFilterEnabled && cond !=
TrueLiteral
+ && scan.filterAttributes().nonEmpty =>
Review Comment:
will cause `buildKeys` and `pruningKeys` to be empty.
```
val buildKeys = V2ExpressionUtils.resolveRefs[Attribute](filterAttrs,
matchingRowsPlan)
val pruningKeys = V2ExpressionUtils.resolveRefs[Attribute](filterAttrs, r)
val dynamicPruningCond = buildDynamicPruningCond(matchingRowsPlan,
buildKeys, pruningKeys)
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]