irenjj commented on issue #5492:
URL: https://github.com/apache/datafusion/issues/5492#issuecomment-2898269822

   > From what i understand, duckdb does not directly differentiate between 
simple unnest vs general unnest right? 
   
   Yep, It should be that general unnest includes the simple unnest case.
   
   > they achieve the simplified query plan thanks to the optimizor of 
`DelimGetRemove`, where the `DelimGet` operator in the RHS is removed?
   
   Sorry, I couldn't find the `DelimGetRemove` keyword in the DuckDB source 
code. Could you help provide a link to it? If you mean `Deliminator`, the 
optimization rule collects all `DelimJoin` and `DelimGet` under `DeliminJoin` 
as candidates. For each candidate's joins array, it sorts them from largest to 
smallest by depth, finding the `DelimGet` with the deepest depth. Keeping the 
deepest join with `DelimGet` is meaningful because this selection condition can 
filter out large amounts of data early. Then it attempts to remove other 
shallower joins while still maintaining safety, since the deepest one already 
ensures data correctness. This helps avoid redundant join operations.


-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to