comphead commented on issue #8386:
URL: 
https://github.com/apache/arrow-datafusion/issues/8386#issuecomment-1856695669

   Moving discussion from PR to the ticket
   
   @mustafasrepo  can I have your input please. The reason is the query fails
   
   ```
   select rank() over (order by 1) rnk from (select 1 a union all select 2 a) x
   Arrow error: Invalid argument error: number of columns(2) must match number 
of fields(1) in schema
   ```
   The reason for that is optimize_projections removes the unused fields and 
this breaks the consistency. The question for you, what do you think is 
expected behavior for such rare case?
   
   PS. If add a column name to projection or to ORDER BY it will expectedly 
work.


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