logan-keede commented on issue #17261:
URL: https://github.com/apache/datafusion/issues/17261#issuecomment-3508442379

   For UInt64 scenario logical-plan optimizer is unable to optimize/detect 
nested union because each union is wrapped up in a projection like-  
   ```
   Projection: c0, c1, c2, CAST(c3 AS UInt64) AS c3, c4, c5, c6, c7, c8, c9
     Union
       Projection: c0, c1, CAST(c2 AS UInt64) AS c2, c3, c4, c5, c6, c7, c8, c9
         Union
           Projection: t1.c0, CAST(c1 AS UInt64) AS c1, c2, c3, c4, c5, c6, c7, 
c8, c9
             Sort: t1.c0 ASC NULLS LAST
               Projection: t1.c0, Int64(1) AS c1, Int64(2) AS c2, Int64(3) AS 
c3, Int64(4) AS c4, Int64(5) AS c5, Int64(6)
   ```
   This is not the case for other scenarios (tested for UInt32, Int64), so they 
are optimized.
   
   Since, this is an edge case. I think we should temporarily shift the 
benchmark to Int64, while we raise a separate bug ticket or (change the 
description of this one).


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