fallintoplace opened a new pull request, #1332:
URL: https://github.com/apache/iceberg-go/pull/1332

   Summary
   
   make PartitionToPath walk the same active compacted partition-field sequence 
as PartitionType
   reuse that active-field computation in both code paths to keep them aligned
   add a regression test for a spec whose leading partition source column has 
been dropped from the current schema
   
   Why
   
   `PartitionSpec.PartitionType` explicitly compacts away partition fields 
whose source columns are no longer present in the current schema. But 
`PartitionSpec.PartitionToPath` still indexed into `ps.fields` positionally 
while reading values from that compacted partition record.
   
   When an earlier partition source column had been dropped, the compacted 
record shifted left while `PartitionToPath` kept using names and transforms 
from the full spec. That could label values under the wrong partition field 
names or apply the wrong transform when generating partition paths.
   
   Testing
   
   go test . -run 
'Test(PartitionType|PartitionSpecToPath|PartitionSpecToPathWithDroppedLeadingSourceColumn)$'
 -count=1
   go test . -count=1
   go test ./table -count=1
   go run github.com/golangci/golangci-lint/v2/cmd/[email protected] run 
--timeout=10m . ./table/...
   git diff --check
   


-- 
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]

Reply via email to