Skip to content

Statistics::total_byte_size does not account for projection in FileScanConfig::with_projection #14936

Closed

Description

@alamb

Describe the bug

As @blaginin found in #14685, the statistics when a File is projected (aka only a subset of the columns are present) is incorrect

Specifically, the projected statistics have the same total_byte_size as the input. However, given only a subset of columns are selected this will mean that the total_byte_size should actually be lower

To Reproduce

See tests referenced in #14685

Expected behavior

total_byte_size should take into account the subset of columns

Additional context

No response

Activity

  1. blaginin commented on Mar 24, 2025

    @blaginin
    Member

    Should be easier to fix after #15352

  2. added 3 commits that reference this issue on Dec 4, 2025
    8fc890f
    38b2a41
    2ec02bb
  3. added a commit that references this issue on Dec 5, 2025
    03c1a8d
  4. adriangb commented on Dec 8, 2025

    @adriangb
    Contributor

    Hi folks although #19094 technically closed this (the value is correct) we can get better estimates with something like #19113. Would anyone that was interested in this issue like to review that work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions