pepijnve commented on PR #25388:
URL: https://github.com/apache/datafusion/pull/25388#issuecomment-5705673812

   There are still some test failures which is why this is still marked draft.
   
   For this particular case, I'm wondering if the older version is actually an 
improvement. The arithmetic isn't super expensive, but we are evaluating it 
twice for all rows and we're not really saving any work in the scan.
   
   The number of expressions being marked as 'keep in place' is probably a bit 
too broad at the moment though. I'm concerned that this change may prevent too 
many filter pushdown opportunities.
   
   ```
   Expression: optimized_plan
   
────────────────────────────────────────────────────────────────────────────────
   -old snapshot
   +new results
   
────────────┬───────────────────────────────────────────────────────────────────
       1       │-Projection: b * Int32(3) AS a, test.c
       2       │-  Projection: test.a * Int32(2) + test.c AS b, test.c
       3       │-    TableScan: test, full_filters=[(test.a * Int32(2) + 
test.c) * Int32(3) = Int64(1)]
             1 │+Filter: a = Int64(1)
             2 │+  Projection: b * Int32(3) AS a, test.c
             3 │+    Projection: test.a * Int32(2) + test.c AS b, test.c
             4 │+      TableScan: test
   
────────────┴───────────────────────────────────────────────────────────────────
   ```


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