Repository navigation
Conversation
Materialize initial defaults during GPU Parquet reads, preserve Spark default metadata, and fall back for unsupported default types. Add unit and integration coverage for schema evolution and nested structs. Refs NVIDIA#15437. Signed-off-by: Chong Gao <chongg@nvidia.com>
Signed-off-by: Chong Gao <chongg@nvidia.com>
Signed-off-by: Chong Gao <chongg@nvidia.com>
Signed-off-by: Chong Gao <chongg@nvidia.com>
[Medium impact] The reviewed code appears safe to merge; no blocking defect was established. SummaryAdds GPU reads for supported Iceberg v3 initial defaults.
No actionable new issue was established. No previous review threads were supplied. Shim compatibility evidence is incomplete: the referenced skill file is missing, and GitHub access requires authentication. Exact-head core and related-PR reports could not be checked. No builds or runtime tests were run during this review. Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Iceberg scan] --> B[Check defaults and equality-delete keys]
B -->|Unsupported| C[CPU fallback]
B -->|Supported| D[Project physical fields and retain helpers]
D --> E[Decode Parquet]
E --> F[Fill missing defaults and preserve parent nulls]
F --> G[Apply deletes and remaining predicates]
Reviews (19) · Last reviewed commit: "Merge origin/main for VARIANT schema con..." · Reviewed by Greptile |
Signed-off-by: Chong Gao <chongg@nvidia.com>
Signed-off-by: Chong Gao <chongg@nvidia.com>
Signed-off-by: Chong Gao <chongg@nvidia.com>
Signed-off-by: Chong Gao <chongg@nvidia.com>
liurenjie1024
left a comment
There was a problem hiding this comment.
One blocking correctness issue remains in the planning-time default validation; see the inline comment. The updated head now correctly rejects UUID/FIXED defaults and adds direct coverage for supported primitive types.
Non-blocking test note: the end-to-end write-default section only runs outside Spark 3.5, while the reported successful integration validation is Spark 3.5.x, so that branch has not yet been exercised in the listed validation.
Signed-off-by: Chong Gao <chongg@nvidia.com>
Signed-off-by: Chong Gao <chongg@nvidia.com>
Signed-off-by: Chong Gao <chongg@nvidia.com>
Signed-off-by: Chong Gao <chongg@nvidia.com>
Signed-off-by: Chong Gao <chongg@nvidia.com>
Signed-off-by: Chong Gao <chongg@nvidia.com>
Signed-off-by: Chong Gao <chongg@nvidia.com>
Signed-off-by: Chong Gao <chongg@nvidia.com>
Signed-off-by: Chong Gao <chongg@nvidia.com>
Signed-off-by: Chong Gao <chongg@nvidia.com>
Signed-off-by: Chong Gao <chongg@nvidia.com>
Signed-off-by: Chong Gao <chongg@nvidia.com>
…t-semantics Signed-off-by: Chong Gao <chongg@nvidia.com>
Signed-off-by: Chong Gao <chongg@nvidia.com>
GpuDeleteFilter currently resolves equality fields only from top-level schemas. Validate every equality field during planning so nested keys fall back safely, and cover the behavior with a nested delete-file integration test. Signed-off-by: Chong Gao <chongg@nvidia.com>
Move write-default schema metadata and GPU write coverage into a separate follow-up PR. Signed-off-by: Chong Gao <chongg@nvidia.com>
|
NOTE: release/26.10 has been created from main. Please retarget your PR to release/26.10 if it should be included in the release. |
Signed-off-by: Chong Gao <chongg@nvidia.com>
liurenjie1024
left a comment
There was a problem hiding this comment.
One blocking correctness issue remains for projections that select only a newly defaulted child of an existing struct; see the inline comment.
AI-assisted review. The schema-projection case was reproduced with Iceberg 1.10.1. Full GPU validation was unavailable locally because of an NVIDIA driver/library version mismatch.
Retain a physical descendant when pruning would leave an empty struct so the GPU reader preserves parent validity before filling initial defaults. Keep map key/value wrappers intact and drop helper fields from the requested output. Add schema/action coverage through nested containers and a deterministic CPU/GPU regression for default-only child projections across all three Parquet readers. Signed-off-by: Chong Gao <chongg@nvidia.com>
Use the GroupType view to select the single-name getType overload and avoid ambiguity with MessageType.getType(String*) during Scala compilation. Signed-off-by: Chong Gao <chongg@nvidia.com>
Allow physical siblings already retained by Iceberg while requiring exactly the original projected leaf paths plus the expected minimum helper paths. Keep field-ID and default-action assertions. Signed-off-by: Chong Gao <chongg@nvidia.com>
Disable nested schema pruning only for the CPU reference because Iceberg otherwise loses null-parent validity. Keep GPU pruning enabled and preserve exact CPU/GPU and expected default-value assertions. Signed-off-by: Chong Gao <chongg@nvidia.com>
Use required field IDs to restore physical nested containers dropped entirely by Iceberg pruning. Preserve file order and existing projected fields, retain valid helper paths, and keep metadata-only projections empty. Pass the requested schema through the shared reader and keep all nested-container action tests. Signed-off-by: Chong Gao <chongg@nvidia.com>
Signed-off-by: Chong Gao <chongg@nvidia.com>
Keep row groups when a filter references an absent non-null initial value so residual evaluation happens after default materialization. Decode unprojected NTZ helper leaves as timestamps to retain parent validity without enabling unsupported projected types. Add interaction coverage for predicates, nested containers, mixed-file combining, schema evolution, name mapping, and equality/position/DV deletes. The final matrix passes 172 integration executions and 41 Scala unit tests across Spark 3.5.6 and Spark 4.0.4. Signed-off-by: Chong Gao <chongg@nvidia.com>
Restore requested physical containers recursively before selecting helper leaves, including Parquet list and map wrappers without field IDs. This preserves sibling collections and their cardinality in default-only projections. Cover unrelated first siblings, nested list/map projections, and multiple requested collections with schema and end-to-end query regressions. Signed-off-by: Chong Gao <chongg@nvidia.com>
Retain initial-default planning imports together with the upstream encrypted-table fallback in GpuSparkScan. Signed-off-by: Chong Gao <chongg@nvidia.com>
Read unprojected validity helpers using their raw Parquet types so UUID and timestamp annotations cannot fail schema conversion. Preserve projected logical types and include helpers retained for deletion-vector reads. Cover v2 and v3 struct, list, and map projections with unprojected UUIDs across all three readers, plus physical schema conversion and projected logical types. Signed-off-by: Chong Gao <chongg@nvidia.com>
Assign unmapped physical helpers IDs outside the requested schema and preserve the element shape of legacy two-level LIST projections. Cover initial defaults and v2 null filling with schema and end-to-end regressions. Signed-off-by: Chong Gao <chongg@nvidia.com>
Signed-off-by: Chong Gao <chongg@nvidia.com>
Signed-off-by: Chong Gao <chongg@nvidia.com>
Signed-off-by: Chong Gao <chongg@nvidia.com>
Signed-off-by: Chong Gao <chongg@nvidia.com>
Signed-off-by: Chong Gao <chongg@nvidia.com>
Contributes to #15437.
Description
This PR supports Iceberg v3
initial-defaultsemantics in GPU reads, including fields required implicitly by equality-delete files.It materializes supported primitive and nested defaults while preserving parent/container nullability, and falls back during planning for unsupported default types or nested equality-delete keys.
Earlier planning-only measurement, before the reader fixes: on an AMD EPYC 7R13 host with Spark
local[16], the opt-in traversal added a median paired0.694 ms(0.71 us/task) across 978 scan tasks, with a paired p95 of4.687 ms. This used 30 measured pairs after five warm-up pairs. Both modes asserted CPUBatchScanfallback, so this measures planning rather than GPU reader performance.Reader-only runtime measurements at
259d6b98c, before the shim/visitor refactor and the latest base integration, show the cost of retaining helper leaves and bypassing unsafe pruning. The control substitutesreader.scalaandGpuParquetReaderPostProcessor.scalafrombe4e548e4while holding the other PR dependencies fixed. Spark 3.5.6 / Scala 2.12 / Iceberg 1.10.1, one NVIDIA L4,local[4], PERFILE, file cache disabled, two million rows in 16 files; A/B/B/A ordering, five warm-ups per JVM and 20 measured samples per artifact/shape.The missing-default predicate returns the same correct empty result in both versions; the candidate reads old row groups conservatively before evaluating the residual. Input metrics report requested Spark bytes, not physical disk I/O. These measurements do not establish the performance of the final head, which has not been rebenchmarked after the shim/visitor refactor and VARIANT integration.
iceberg/iceberg_read_test.py, since they cover both format v2 and v3. Delete regressions are consolidated iniceberg/iceberg_delete_test.py. The move preserves all 47 function/class definitions, and all 83 moved parametrized case IDs match the prior runtime report.Latest base integration: merged
98d729483(#16443) without rewriting the reviewed commits. The merge retains both shim APIs and adapts two new unit-test calls to the version-dispatchedParquetUnshader.Combined-head validation at
1513612acagainst base98d729483:GpuPostProcessorSuite: 46/46;GpuTypeToSparkTypeSuite: 9/9; Spark 4.1GpuIcebergVariantSchemaSuite: 10/10. No unit-test failures, errors or skips.sql-pluginsource selection rather than API or full-runtime compatibility.The test reorganization additionally collected 153 cases across 37 test functions, preserving all 83 moved case IDs and all 47 function/class definitions; 17 targeted post-reorganization cases passed before the base merge. Earlier
America/New_Yorkruns at259d6b98cpassed four cases on each of Spark 3.5.6 and 4.0.4; they were not repeated for the merged head.Baseline checks reproduced
Unknown logical type annotation: VARIANT(1), unmapped helpers supplying99/100instead of default11, andNot a struct type: longon a legacy LIST. The corresponding regressions now pass. Legacy LIST tests use Spark's raw Parquet CPU reader as their oracle because Iceberg's CPU row reader separately fails on that layout.The title retains
[databricks]for filesystem-path and execution-plan coverage. AI assistance: Codex assisted with implementation, tests and local validation under Chong Gao's direction.Checklists
Documentation
Testing
(Please provide the names of the existing tests in the PR description.)
Performance