You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/10/27 16:09:56 UTC

[GitHub] [arrow-datafusion] andygrove opened a new pull request, #3986: Add TableProvider.statistics method

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

   # 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.
   -->
   
   Closes https://github.com/apache/arrow-datafusion/issues/3983
   
   # 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.  
   -->
   
   I would like the ability for table providers to provide statistics that can be used in logical plan optimizations, such as join reordering.
   
   # 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.
   -->
   
   Add new TableProvider.statistics method
   
   # Are there any user-facing changes?
   
   <!--
   If there are user-facing changes then we may require documentation to be updated before approving the PR.
   -->
   
   No. The method has a default implementation.
   
   <!--
   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] andygrove commented on pull request #3986: Add TableProvider.statistics method

Posted by GitBox <gi...@apache.org>.
andygrove commented on PR #3986:
URL: https://github.com/apache/arrow-datafusion/pull/3986#issuecomment-1294782919

   > Does it mean that we already decide to move the stats back to the LogicalPlan ?
   
   No. This change is independent of any existing cost based optimizations.


-- 
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] ursabot commented on pull request #3986: Add TableProvider.statistics method

Posted by GitBox <gi...@apache.org>.
ursabot commented on PR #3986:
URL: https://github.com/apache/arrow-datafusion/pull/3986#issuecomment-1294786522

   Benchmark runs are scheduled for baseline = 067809389d892deac7788ac626f811fdb9ee7730 and contender = 4ea970d1bda5bdcede31d41f5c4ba7f9a280c659. 4ea970d1bda5bdcede31d41f5c4ba7f9a280c659 is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
   Conbench compare runs links:
   [Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on ec2-t3-xlarge-us-east-2] [ec2-t3-xlarge-us-east-2](https://conbench.ursa.dev/compare/runs/c5c6bdb79ad744ee9296a70780b931fb...c05c7ac0483447fd8d5c5e4923023558/)
   [Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on test-mac-arm] [test-mac-arm](https://conbench.ursa.dev/compare/runs/5c805fe17c43485d8dc9591eee84fc74...58cc1acbe26342d1ba4b03ff75b73443/)
   [Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on ursa-i9-9960x] [ursa-i9-9960x](https://conbench.ursa.dev/compare/runs/603902fc4679421cabfb2c32fc221790...45770a83253c4ec9a6e9544764ac58c4/)
   [Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on ursa-thinkcentre-m75q] [ursa-thinkcentre-m75q](https://conbench.ursa.dev/compare/runs/e56fa1d69985455882544ae0346bc777...6a3ac07e128e43aaa660a548a5580731/)
   Buildkite builds:
   Supported benchmarks:
   ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
   test-mac-arm: Supported benchmark langs: C++, Python, R
   ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
   ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java
   


-- 
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] mingmwang commented on pull request #3986: Add TableProvider.statistics method

Posted by GitBox <gi...@apache.org>.
mingmwang commented on PR #3986:
URL: https://github.com/apache/arrow-datafusion/pull/3986#issuecomment-1294525365

   Does it mean that we already decide to move the stats back to the LogicalPlan ?


-- 
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] andygrove commented on pull request #3986: Add TableProvider.statistics method

Posted by GitBox <gi...@apache.org>.
andygrove commented on PR #3986:
URL: https://github.com/apache/arrow-datafusion/pull/3986#issuecomment-1293765012

   @isidentical @Dandandan @alamb PTAL when you can


-- 
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] alamb commented on a diff in pull request #3986: Add TableProvider.statistics method

Posted by GitBox <gi...@apache.org>.
alamb commented on code in PR #3986:
URL: https://github.com/apache/arrow-datafusion/pull/3986#discussion_r1007180678


##########
datafusion/core/src/datasource/datasource.rs:
##########
@@ -77,6 +78,11 @@ pub trait TableProvider: Sync + Send {
     ) -> Result<TableProviderFilterPushDown> {
         Ok(TableProviderFilterPushDown::Unsupported)
     }
+
+    /// Get statistics for this table, if available
+    fn statistics(&self) -> Option<Statistics> {

Review Comment:
   I wonder if any of the built in providers can give statistic (I am thinking Parquet) 🤔  
   
   Definitely something for a follow on PR



-- 
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] andygrove commented on a diff in pull request #3986: Add TableProvider.statistics method

Posted by GitBox <gi...@apache.org>.
andygrove commented on code in PR #3986:
URL: https://github.com/apache/arrow-datafusion/pull/3986#discussion_r1007185567


##########
datafusion/core/src/datasource/datasource.rs:
##########
@@ -77,6 +78,11 @@ pub trait TableProvider: Sync + Send {
     ) -> Result<TableProviderFilterPushDown> {
         Ok(TableProviderFilterPushDown::Unsupported)
     }
+
+    /// Get statistics for this table, if available
+    fn statistics(&self) -> Option<Statistics> {

Review Comment:
   :+1: Filed as https://github.com/apache/arrow-datafusion/issues/3988



-- 
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] andygrove merged pull request #3986: Add TableProvider.statistics method

Posted by GitBox <gi...@apache.org>.
andygrove merged PR #3986:
URL: https://github.com/apache/arrow-datafusion/pull/3986


-- 
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] Dandandan commented on pull request #3986: Add TableProvider.statistics method

Posted by GitBox <gi...@apache.org>.
Dandandan commented on PR #3986:
URL: https://github.com/apache/arrow-datafusion/pull/3986#issuecomment-1294781499

   > Does it mean that we already decide to move the stats back to the LogicalPlan ?
   
   It seems this change would make it more hybrid. I would like to continue discussing in the Google doc what is the best way forward.


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