← Back to Pull requests

Preserve known Iceberg data and delete file sizes #17156

Closed
unknown closed this pull request without merging on Nov 28, 2026 10:45 UTC
View on GitHub
unknown unknown commented on Nov 26, 2026 03:12 UTC
Author

Related issue: N/A. Related PR: #17157 (footer caching and connection reuse).

Description

Iceberg scan tasks contain the sizes of data and delete files, but reader setup discarded them. Creating an S3 input with only its path makes the client discover its length with an extra HEAD request.

Pass each task's known size through the length-aware RapidsFileIO API and retain it as an OptionalLong throughout the input-file wrappers. Reject zero and negative values in both IcebergInputFile and IcebergFileIO, before calling the delegate. A supplied length must be exact and strictly positive. Callers without an exact length must use the overload without a length, or OptionalLong.empty(), to retain delegate lookup.

The shared API was added by the merged https://github.com/NVIDIA/cudf-spark-jni/pull/5559. Validation now uses published JNI snapshot 26.12.0-20261127.042744-56, with the unmodified CUDA 12 artifact. #17157 can land independently.

Validation and performance

On local Linux with JDK 17, Spark 3.5.9, and an RTX 5880 Ada GPU, including main 9d2a2d162081:

  • Maven production build and root verification, including style checks, passed against the published JNI artifact.

  • All four IcebergInputFileSuite tests passed: zero and negative lengths (including Long.MIN_VALUE) are rejected; both shared FileIO overloads reject them before delegate access; positive known lengths, including one byte, avoid delegate lookups; and unknown lengths use the actual file size.

  • All four GpuMultiThreadIcebergParquetReaderSuite tests and all three IcebergS3InputFileSuite tests passed. A separate CPU/GPU probe passed for coalescing and multithreaded readers, dictionary predicates, repeated reads, and position deletes, with matching results and GPU scan assertions. All 12 tests passed on each of Iceberg 1.9.2 and 1.10.1, with no skipped or canceled tests.

  • A ten-file loopback HTTP/1.1 S3 probe invoked both known-length overloads through the shared interface. Each reduced HEAD requests from 10 to 0, with GETs unchanged at 20 and TCP connections unchanged at 10. These are request counts, not remote-storage throughput measurements.
  • Static shim source selection passed for all 34 current profiles at head 8078c62997ed against main 9d2a2d162081. The bounded related-PR advisory completed five joint checks without new static findings; candidates beyond the five-peer limit remain unchecked. These checks do not replace premerge runtime validation.

    Remaining validation

  • Complete premerge validation for the updated head, including Databricks, and measure a representative remote-storage workload.
  • AI assistance: Codex helped implement and validate the changes and prepare this description.

    Checklists

    Documentation

  • Updated for new or modified user-facing features or behaviors

  • No user-facing change
  • Testing

  • Added or modified tests to cover new code paths

  • Covered by existing tests

  • (Please provide the names of the existing tests in the PR description.)
  • Not required
  • Performance

  • Tests ran and results are added in the PR description

  • Issue filed with a link in the PR description

  • Not required
  • Diff: 402 lines (+301 / -101) across 5 files Reviewer: res-life Review duration: 3333m
    All Vouch review confidence checks passed
    Residual risk 0.19 = Change Risk (0.45) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.45 · 402 lines diff across 5 files
    0.45
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    56%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.359
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #17156"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 44.7% (MEDIUM) · Higher = larger blast radius
    44.7%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 56.8% · Lower = rushed or shallow review
    56.8%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 19.4% · Safe to merge
    19.4%