Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-10781

[Rust] [DataFusion] TableProvider should provide row count statistics

    XMLWordPrintableJSON

Details

    Description

      In order to start building a cost-based optimizer, we need some statistics about data sources. The most basic statistic would be number of rows.

      I propose that we add a Statistics struct that initially just makes a total row count available but that we can later extend to support more advanced statistics.

      struct Statistics {
        row_count: Option<usize>
      } 

      We can then add a method to TableProvider:

      trait TableProvider {
        fn statistics() -> Option<Statistics>;
      } 

      Statistics should be optional because not all data sources can provide statistics.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              andygrove Andy Grove
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 8h 10m
                  8h 10m