waynexia commented on pull request #792:
URL: https://github.com/apache/arrow-datafusion/pull/792#issuecomment-903115781


   Thank you @alamb and @houqp !
   
   >I wonder if perhaps the bug you are chasing is something related to do with 
window functions specifically rather than a more general problem.
   
   AFAIK, It's general problem. A SQL without window function can also run into 
this problem, like
   ```SQL
   SELECT AVG(c1 + 1), SUM(c1 + 1) FROM test GROUP BY c2;
   ```
   it is reproducible if there is some common sub-expression for this optimizer 
to eliminate, without the need to have a window expression.
   
   >For compound projections like test.c1 PLUS test.c2, it might be preferable 
to include qualifiers in the name for better readability.
   
   The current implementation of `physical_name()` seems to be stripping all 
qualifiers. I agree that the behavior can vary depending on the situation.


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


Reply via email to