Repository navigation
feat: derive eager scan statistics from selected files - #125
Merged
gabotechs merged 5 commits intoNov 20, 2026
Merged
Conversation
Adapt selected-file statistics from datafusion-contrib/datafusion-distributed#787 while retaining conservative row-count precision and projected output-byte estimates. Signed-off-by: alex.bianchi <alex.bianchi@datadoghq.com>
Signed-off-by: alex.bianchi <alex.bianchi@datadoghq.com>
Signed-off-by: alex.bianchi <alex.bianchi@datadoghq.com>
Signed-off-by: alex.bianchi <alex.bianchi@datadoghq.com>
Signed-off-by: alex.bianchi <alex.bianchi@datadoghq.com>
gabotechs
approved these changes
Nov 20, 2026
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.
Eager scans retained whole-snapshot row estimates even after file pruning, while individual output partitions reported unknown counts. A taxi scan selecting two of seven daily files therefore reported 175,000 rows instead of 50,000.
Follow up on #113 and #114
Derive row estimates from the retained
FileScanTasks for the whole assignment or the requested partition. The two-file scan now reports 50,000 rows total and 25,000 per partition. This also works for explicitly supplied file groups.Adapts the statistics portion of DFD #787:
Using Stats
Exact(0). No files, or only files with zero records, means no rows. Iceberg Java likewise skips zero-record files during predicate evaluation and accepts zero for metadataCOUNT(*).Inexact(n). Predicates and deletes can remove rows. For comparison, Iceberg’s Spark connector declines metadata aggregate pushdown when a task has deletes.Absent. A partial sum is not the total. Java also distinguishes an unknown record count from zero.