refactor: consolidate and strengthen Iceberg statistics tests - #705
Open
alexanderbianchi wants to merge 4 commits into
Open
refactor: consolidate and strengthen Iceberg statistics tests#705alexanderbianchi wants to merge 4 commits into
alexanderbianchi wants to merge 4 commits into
Conversation
alexanderbianchi
force-pushed
the
iceberg/test-statistics-cases
branch
from
September 6, 2026 01:51
cefbe81 to
8e6fd2d
Compare
alexanderbianchi
changed the base branch from
iceberg-0.10
to
codex/iceberg-runtime-metadata
September 6, 2026 01:51
This was referenced Sep 6, 2026
alexanderbianchi
commented
Sep 6, 2026
|
|
||
| assert_eq!(stats.num_rows, Precision::Exact(TAXI_ROWS)); | ||
| assert_eq!(stats.total_byte_size, Precision::Exact(TAXI_BYTES)); | ||
| insta::allow_duplicates! { |
Collaborator
Author
There was a problem hiding this comment.
Should we switch the harness to something more like
async fn run(
ctx: &SessionContext,
query: &str,
) -> Result<(Arc<dyn ExecutionPlan>, Vec<RecordBatch>)> {
let df = ctx.sql(query).await?;
let plan = df.create_physical_plan().await?;
let batches = collect(Arc::clone(&plan), ctx.task_ctx()).await?;
Ok((plan, batches))
}from tests/multi_task_collect_join_repros.rs
This was referenced Sep 6, 2026
alexanderbianchi
marked this pull request as ready for review
September 7, 2026 14:14
Replace test-case matrices with named tests sharing assertions and configure column statistics through the merged harness API. Preserve manifest metrics coverage and shared COUNT(*) snapshots without exposing the context. Remove the unused Iceberg test-case dependency after rebasing onto iceberg-0.10.
alexanderbianchi
force-pushed
the
iceberg/test-statistics-cases
branch
from
September 8, 2026 19:21
f8dcd0c to
ea6a73e
Compare
alexanderbianchi
changed the base branch from
codex/iceberg-runtime-metadata
to
iceberg-0.10
September 8, 2026 19:21
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.
Less test code, stronger statistics coverage
Based directly on
iceberg-0.10atf9340ef, including merged #715 and #716. “Before” refers to that base. Onlyiceberg/tests/statistics.rschanges, with a net reduction of 24 lines.Absent, rather than treating missing as zeroCOUNT(*)skips the scanStructure
COUNT(*)scan elimination. Notest_casemacros or dependency.configure_session(...); tests never access its private context.with_filesupplies the bytes to the harness.insta::allow_duplicates!is needed only for the shared, identicalCOUNT(*)inline snapshots.Validation
cargo test -p datafusion-distributed-iceberg --test statistics --locked— all 10 cases passedcargo test -p datafusion-distributed-iceberg --locked— 95 tests passed, including the doctestcargo test -p datafusion-distributed-iceberg --features integration --locked— 96 tests passed, including the doctestcargo clippy -p datafusion-distributed-iceberg --all-targets --locked -- -D warnings— passed, also with--all-featurescargo fmt --all -- --checkgit diff --check