aokolnychyi commented on a change in pull request #1955:
URL: https://github.com/apache/iceberg/pull/1955#discussion_r546633917
##########
File path:
spark3-extensions/src/main/scala/org/apache/spark/sql/catalyst/optimizer/RewriteDelete.scala
##########
@@ -77,33 +101,30 @@ object RewriteDelete extends Rule[LogicalPlan] with
PredicateHelper with Logging
PushDownUtils.pushFilters(scanBuilder, normalizedPredicates)
val scan = scanBuilder.build()
- val scanRelation = DataSourceV2ScanRelation(table, scan, output)
+ val scanRelation = DataSourceV2ScanRelation(table, scan,
toOutputAttrs(scan.readSchema(), output))
val scanPlan = scan match {
Review comment:
I think this block can be simplified a bit.
```
scan match {
case filterable: SupportsFileFilter =>
val matchingFilePlan = buildFileFilterPlan(cond, scanRelation)
DynamicFileFilter(scanRelation, matchingFilePlan, filterable)
case _ =>
scanRelation
}
```
----------------------------------------------------------------
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]