alex-natzka commented on issue #3635:
URL: 
https://github.com/apache/arrow-datafusion/issues/3635#issuecomment-1276081962

   @liukun4515 , after staring at the actual output for a longer while, I 
realize that there is a double projection above the filter, which is indeed 
unexpected:
   
   ```
       "  Projection: lineitem.l_partkey [l_partkey:Int64]",
       "    Projection: part.p_size >= Int32(1) AS part.p_size >= 
Int32(1)Int32(1)part.p_size, lineitem.l_partkey, lineitem.l_quantity, 
part.p_brand, part.p_size [part.p_size >= 
Int32(1)Int32(1)part.p_size:Boolean;N, l_partkey:Int64, 
l_quantity:Decimal128(15, 2), p_brand:Utf8, p_size:Int32]",
   ```
   The projection on the second line seems completely unnecessary.
   
   Sorry, seems like I solved a different problem than what you meant :/ 
Unfortunately, I'm not familiar enough with this optimization rule to fix this. 
At least it _seems_ to me like the optimized logical plan is not wrong, just 
that the unnecessary projection is inefficient.


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