yaooqinn commented on code in PR #13714:
URL: https://github.com/apache/gluten/pull/13714#discussion_r4705433436
##########
gluten-substrait/src/main/scala/org/apache/gluten/extension/columnar/PushDownInputFileExpression.scala:
##########
@@ -188,17 +221,36 @@ object PushDownInputFileExpression {
object PostOffload extends Rule[SparkPlan] {
override def apply(plan: SparkPlan): SparkPlan = plan.transformUp {
+ // A project over the scan that lists nothing but columns and input file
function calls, such
+ // as the one PreOffload added: the scan, with a project over it for
repeats, can produce its
+ // output.
case p @ ProjectExec(projectList, child: FileSourceScanExecTransformer)
- if projectList.exists(containsInputFileRelatedExpr) =>
- child.copy(output = p.output)
+ if projectList.exists(containsInputFileRelatedExpr) &&
canCollapseProject(p) =>
Review Comment:
PreOffload and the DSv2 case now match on an input file function call, but
this case and the Hive one below still use the name-based
`containsInputFileRelatedExpr`. Since PreOffload's project always carries an
`Alias(InputFileName...)`, would `containsInputFileFunctionExpr` be enough here
too? As far as I can tell, the name-based match is what folds a user's
column-only project (like the `SELECT id, id` in the Sort test) into the scan.
--
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]