ulysses-you commented on code in PR #5853:
URL: https://github.com/apache/incubator-gluten/pull/5853#discussion_r1618070291


##########
gluten-core/src/main/scala/org/apache/gluten/utils/PullOutProjectHelper.scala:
##########
@@ -61,7 +61,13 @@ trait PullOutProjectHelper {
       replaceBoundReference: Boolean = false): Expression =
     expr match {
       case alias: Alias =>
-        projectExprsMap.getOrElseUpdate(alias.child.canonicalized, 
alias).toAttribute
+        alias.child match {
+          case _: Literal =>
+            projectExprsMap.getOrElseUpdate(alias.child.canonicalized, alias)

Review Comment:
    Does `getMissingLiterals` method do the same things with this code ? This 
code and `getMissingLiterals` say if there is an `Alias(Literal)` then we add 
one more `Alias(Literal)` to project. What happens if there are three 
`Alias(Literal)` ?
   
   Do you mean we should always include `Alias(Literal)` ? if so we can change 
`projectExprsMap.getOrElseUpdate(alias.child.canonicalized, alias)` to 
`projectExprsMap.getOrElseUpdate(alias, alias)` and remove `getMissingLiterals`.



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