ferhatelmas commented on code in PR #767:
URL: https://github.com/apache/iceberg-go/pull/767#discussion_r2886153961
##########
table/pos_delete_partitioned_fanout_writer.go:
##########
@@ -132,12 +130,22 @@ func (p *positionDeletePartitionedFanoutWriter)
processBatch(ctx context.Context
}
func (p *positionDeletePartitionedFanoutWriter) partitionPath(partitionContext
partitionContext) (string, error) {
- data :=
partitionRecord(slices.Collect(maps.Values(partitionContext.partitionData)))
spec := p.metadata.PartitionSpecByID(int(partitionContext.specID))
if spec == nil {
return "", fmt.Errorf("unexpected missing partition spec in
metadata for spec id %d", partitionContext.specID)
}
+ data := make(partitionRecord, spec.NumFields())
+ i := 0
+ for field := range spec.Fields() {
+ val, ok := partitionContext.partitionData[field.FieldID]
+ if !ok {
+ return "", fmt.Errorf("unexpected missing partition
value for field id %d in spec id %d", field.FieldID, partitionContext.specID)
+ }
+ data[i] = val
+ i++
+ }
Review Comment:
It would cause some churn and would prevent `AppendSeq` usage.
If we change, I think we should change `SortOrder.Fields()` as well and do
it separately and then use here since it's a bigger scope. Happy to do if
agreed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]