wForget commented on code in PR #43869:
URL: https://github.com/apache/spark/pull/43869#discussion_r1399305704
##########
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:
before this change, newly added test case would fail.
error:
```
head of empty ArraySeq
java.util.NoSuchElementException: head of empty ArraySeq
at scala.collection.IndexedSeqOps.head(IndexedSeq.scala:99)
at scala.collection.IndexedSeqOps.head$(IndexedSeq.scala:94)
at scala.collection.immutable.ArraySeq.head(ArraySeq.scala:35)
at
org.apache.spark.sql.catalyst.expressions.ListQuery.dataType(subquery.scala:371)
at
org.apache.spark.sql.catalyst.expressions.InSubquery.checkInputDataTypes(predicates.scala:382)
at
org.apache.spark.sql.catalyst.expressions.Expression.resolved$lzycompute(Expression.scala:261)
at
org.apache.spark.sql.catalyst.expressions.Expression.resolved(Expression.scala:261)
at
org.apache.spark.sql.catalyst.expressions.Expression.$anonfun$childrenResolved$1(Expression.scala:273)
at
org.apache.spark.sql.catalyst.expressions.Expression.$anonfun$childrenResolved$1$adapted(Expression.scala:273)
```
--
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]