wangyum opened a new pull request, #36829:
URL: https://github.com/apache/spark/pull/36829

   ### What changes were proposed in this pull request?
   
   This pr add a threshold to not in line CTE if the CTE is referenced at least 
this threshold and `spark.sql.exchange.reuse` is enabled.
   
   ### Why are the changes needed?
   
   1. In some cases, the CTE can be heavy and referenced many times. Not in 
line CTE can reduce a lot of duplicate work. But this is not always true. Such 
as TPC-DS q4.
   2. It can reduce the number of table reads and reduce the pressure on 
Namenode. Especially for tables with many small files. 
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   Unit 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