Skip to content

Commit 8881516

Browse files
dramaticllyclaude
andcommitted
Parquet: Restore NameMapping.empty() default after removing NETFLIX_UNSAFE branch
The prior 1.11 logic in `Parquet.ReadBuilder` had three branches when picking the name mapping for a vectorized read: 1. caller-provided nameMapping → use it 2. `NETFLIX_UNSAFE_PARQUET_ID_FALLBACK_ENABLED=true` → use null (unsafe fallback to position-based field resolution) 3. default → use `NameMapping.empty()` (safe) PR apache#16449 removed the deprecated NETFLIX_UNSAFE branch (case 2) but collapsed the default to `null` rather than `NameMapping.empty()`, making unsafe position-based resolution the new default. That contradicts the PR description ("always use NameMapping.empty() (the safe default)") and silently regresses readers that don't supply an explicit mapping. Restore the safe default by using `NameMapping.empty()` when no mapping is provided. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
1 parent 696b97b commit 8881516

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • parquet/src/main/java/org/apache/iceberg/parquet

‎parquet/src/main/java/org/apache/iceberg/parquet/Parquet.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1489,7 +1489,7 @@ public <D> CloseableIterable<D> build() {
14891489
if (nameMapping != null) {
14901490
mapping = nameMapping;
14911491
} else {
1492-
mapping = null;
1492+
mapping = NameMapping.empty();
14931493
}
14941494

14951495
Function<MessageType, VectorizedReader<?>> batchedFunc =

0 commit comments

Comments
 (0)