joooger commented on PR #2487:
URL: https://github.com/apache/calcite/pull/2487#issuecomment-6274038770

   @korlov42, thank you for the reproducer and the analysis. It helped a lot.
   
   I have opened #5344, which is based on your findings. Removing `rel = 
passThroughRel` fixes the derive, but it has a side effect. The pass-through 
rel is registered with `applying == null`, so `onProduce` ignores it and 
nothing optimizes its inputs anymore. On `TopDownOptTest`, 39 of the 195 
pass-through rels then keep inputs that are never optimized. With top-down 
enabled for the whole `core` suite, two `JdbcAdapterTest` tests also start 
failing. The change also does not cover the case where `passThrough` returns 
`null`, which @rkondakov asked about.
   
   #5344 keeps the pass-through handling as it is, and also derives traits for 
the original rel in its own subset. I'd appreciate it if you could take a look. 
If you agree, this PR could be closed in favour of #5344.
   


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