xudong963 commented on code in PR #15811:
URL: https://github.com/apache/datafusion/pull/15811#discussion_r2054259450


##########
datafusion/expr/src/logical_plan/builder.rs:
##########
@@ -498,7 +498,7 @@ impl LogicalPlanBuilder {
             TableScan::try_new(table_name, table_source, projection, filters, 
fetch)?;
 
         // Inline TableScan
-        if table_scan.filters.is_empty() {
+        if table_scan.projection.is_none() && table_scan.filters.is_empty() {

Review Comment:
   
   
   
   
   
   
   
   
   
   
   Thank you, nice find!
   
   I'm wondering if we can still inline `TableScan` and wrap `Projection` on 
top of the view's logical plan. In this way, maybe the plan will be easier to 
optimize in the optimizer. -- This can be a further experiment, I think the PR 
is good to go.
   
   
   
   



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