liujiayi771 commented on PR #5144:
URL: 
https://github.com/apache/incubator-gluten/pull/5144#issuecomment-2022954802

   @zhli1142015 Thanks for your fix. We should always keep the contents of 
`expressionMap.values` and append the `child.outputSet`. But the word 'append' 
denotes additional content, so it seems a bit odd to consider it as content to 
be retained in your code. And I think the 'append' should be the last parameter 
of the method.
   
   Perhaps change the function to the below code, using the set difference 
method of the `AttributeSet` seems to be more concise, and swap the order of 
all the arguments that call this function.
   ```scala
   protected def eliminateProjectList(
       projectAttributes: Seq[NamedExpression],
       childOutput: AttributeSet): Seq[NamedExpression] = {
     projectAttributes ++ (childOutput -- projectAttributes).toIndexedSeq
       .sortWith(_.exprId.id < _.exprId.id)
   }
   ```
   


-- 
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]

Reply via email to