rdblue commented on issue #26150: [SPARK-29501][SQL] 
SupportsPushDownRequiredColumns should report pruned schema immediately
URL: https://github.com/apache/spark/pull/26150#issuecomment-544693234
 
 
   > In fact Spark always do column pruning at the end, so this can be 
determined then pushRequiredColumns is called.
   
   One of the main reasons for the recent refactor that introduced the scan 
builder was that ["scan execution order is not 
obvious"](https://docs.google.com/document/d/1DDXCTCrup4bKWByTalkXWgavcPdvur8a4eEu8x1BzPM/edit#heading=h.s9owpjn3wl3d).
 The builder was introduced so that the order was clear: filters and 
projections are pushed, then the read schema is fetched. What you're 
suggesting, to get the read schema before building the scan, reintroduces the 
problem this was intended to fix by breaking the guarantee that the read schema 
is fetched after both projection and filters are pushed.
   
   I'm -1 for this change.
   
   Also, why can't the v1 fallback path can't build a scan, even if it isn't 
used?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to