You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(table): use filter-based partition conflict check in RowDelta.validate
Replace partitionTupleKey + validateNoConflictingDataFilesInPartitions (old) with
eqDeletePartitionsToFilter which builds an OR(AND(EqualTo(...))) BooleanExpression
from the eq-delete DataFiles and routes it through validateNoConflictingDataFiles
→ validateAddedDataFilesMatchingFilter.
Benefits over the removed partitionTupleKey approach:
- Type-safe: anyToLiteral uses a type switch over all iceberg.LiteralType values
(bool, int32/64, float32/64, string, []byte, Date, Time, Timestamp,
TimestampNano, Decimal, uuid.UUID) — no fmt.Sprintf instability for
UUID/decimal/binary partitions.
- Spec-evolution correct: the filter is projected per each concurrent manifest's
PartitionSpec via buildPartitionProjection, so renamed fields and transform
changes do not produce false conflicts.
- No key-injection: avoids the =;-separator collision risk in string-keyed maps.
- Unpartitioned tables: RowDelta.validate now explicitly checks
PartitionSpec.NumFields() == 0 and passes AlwaysTrue directly, rather than
relying on implicit fallback.
Adds 9 regression and validation tests:
- anyToLiteral for all supported types and an unsupported type
- Short-circuit under SnapshotIsolation and empty inputs
- #978 reproducer: different-partition concurrent append is not rejected
- Same-partition concurrent append IS rejected
- UUID partition: same rejected, different allowed
- Unpartitioned table AlwaysTrue fallback detects any concurrent append
Fixes#978
0 commit comments