Repository navigation
fix: sum projected column byte sizes in project_statistics - #27052
Open
joseph-isaacs wants to merge 1 commit into
Open
joseph-isaacs wants to merge 1 commit into
joseph-isaacs wants to merge 1 commit into
Conversation
ProjectionExprs::project_statistics kept the input's total_byte_size, marked inexact, whenever a projected column is variable width, even when every projected column has a known byte_size. Sources that report column byte sizes then show every projected scan as large as the whole table, so join selection picks the wrong build side. Sum the projected columns' byte sizes when they are all known, as Statistics::with_fetch already does, and keep the old fallback otherwise. Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
joseph-isaacs
force-pushed
the
ji/project-stats-byte-size
branch
from
November 3, 2026 14:56
23f8f6c to
f655c82
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #27050
In
ProjectionExprs::project_statisticscomputing theStatistics::total_byte_sizetheColumnStatistics::byte_sizeis ignored even when present.This PR sums the columns statastics if present and fallbacks to the
ProjectionExprs::calculate_total_byte_sizeis absent