rui-mo commented on code in PR #8082:
URL: https://github.com/apache/incubator-gluten/pull/8082#discussion_r1877734210
##########
gluten-substrait/src/main/scala/org/apache/gluten/execution/BatchScanExecTransformer.scala:
##########
@@ -96,18 +96,22 @@ abstract class BatchScanExecTransformerBase(
// class. Otherwise, we will encounter an issue where makeCopy cannot find a
constructor
// with the corresponding number of parameters.
// The workaround is to add a mutable list to pass in pushdownFilters.
- protected var pushdownFilters: Option[Seq[Expression]] = None
+ protected var pushdownFilters: Seq[Expression] = scan match {
+ case fileScan: FileScan =>
+ fileScan.dataFilters.filter {
+ expr =>
+ ExpressionConverter.canReplaceWithExpressionTransformer(
+ ExpressionConverter.replaceAttributeReference(expr),
+ output)
+ }
+ case _ => Seq.empty
Review Comment:
Previously we throw an exception if it is not file scan. Do we need to log
the information for unsupported cases?
https://github.com/apache/incubator-gluten/pull/8082/files#diff-0637bf279d5bc9ae2791c4e8919675e1674426634f187dfc55596f7c1eb4c5afL109
--
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]