You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "waynexia (via GitHub)" <gi...@apache.org> on 2023/04/17 11:47:28 UTC

[GitHub] [arrow-datafusion] waynexia opened a new pull request, #6032: feat: allow TableScan without projection

waynexia opened a new pull request, #6032:
URL: https://github.com/apache/arrow-datafusion/pull/6032

   # Which issue does this PR close?
   
   <!--
   We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123.
   -->
   
   Related to https://github.com/GreptimeTeam/greptimedb/issues/1396
   
   # Rationale for this change
   
   <!--
    Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
    Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.  
   -->
   
   Allow table scan without projection. It should be a constrain as the projection field in `TableScan` plan is optional:
   https://github.com/apache/arrow-datafusion/blob/3ad7734a7e5b1844b02f1374d0dc1c441bef216d/datafusion/expr/src/logical_plan/plan.rs#L1396-L1403
   
   # What changes are included in this PR?
   
   <!--
   There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
   -->
   
   Don't throw error when there is no projection in `TableScan`.
   
   # Are these changes tested?
   
   Adding test
   <!--
   We typically require tests for all PRs in order to:
   1. Prevent the code from being accidentally broken by subsequent changes
   2. Serve as another way to document the expected behavior of the code
   
   If tests are not included in your PR, please explain why (for example, are they covered by existing tests)?
   -->
   
   # Are there any user-facing changes?
   
   Yes but not breaking
   <!--
   If there are user-facing changes then we may require documentation to be updated before approving the PR.
   -->
   
   <!--
   If there are any breaking changes to public APIs, please add the `api change` label.
   -->


-- 
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-unsubscribe@arrow.apache.org

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


[GitHub] [arrow-datafusion] waynexia commented on pull request #6032: feat: allow TableScan without projection

Posted by "waynexia (via GitHub)" <gi...@apache.org>.
waynexia commented on PR #6032:
URL: https://github.com/apache/arrow-datafusion/pull/6032#issuecomment-1512371873

   cc @andygrove and @nseekhao 


-- 
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-unsubscribe@arrow.apache.org

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


[GitHub] [arrow-datafusion] yjshen merged pull request #6032: feat: allow TableScan without projection

Posted by "yjshen (via GitHub)" <gi...@apache.org>.
yjshen merged PR #6032:
URL: https://github.com/apache/arrow-datafusion/pull/6032


-- 
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-unsubscribe@arrow.apache.org

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


[GitHub] [arrow-datafusion] jackwener commented on a diff in pull request #6032: feat: allow TableScan without projection

Posted by "jackwener (via GitHub)" <gi...@apache.org>.
jackwener commented on code in PR #6032:
URL: https://github.com/apache/arrow-datafusion/pull/6032#discussion_r1170060580


##########
datafusion/substrait/tests/serialize.rs:
##########
@@ -49,6 +52,20 @@ mod tests {
         Ok(())
     }
 
+    #[tokio::test]
+    async fn table_scan_without_projection() -> Result<()> {
+        let ctx = create_context().await.unwrap();
+        let table = provider_as_source(ctx.table_provider("data").await.unwrap());
+        let table_scan = LogicalPlanBuilder::scan("data", table, None)
+            .unwrap()
+            .build()
+            .unwrap();

Review Comment:
   ```suggestion
           let ctx = create_context().await?;
           let table = provider_as_source(ctx.table_provider("data").await?);
           let table_scan = LogicalPlanBuilder::scan("data", table, None)?.build()?;
   ```



-- 
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-unsubscribe@arrow.apache.org

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


[GitHub] [arrow-datafusion] waynexia commented on pull request #6032: feat: allow TableScan without projection

Posted by "waynexia (via GitHub)" <gi...@apache.org>.
waynexia commented on PR #6032:
URL: https://github.com/apache/arrow-datafusion/pull/6032#issuecomment-1514053725

   Thanks for reviewing


-- 
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-unsubscribe@arrow.apache.org

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