twuebi opened a new pull request, #1665: URL: https://github.com/apache/iceberg-go/pull/1665
fixes #1664 Decoding rejected source-id 0 in partition specs and sort orders, but positivity is only an invariant for specs already bound to a schema. Create-table and commit requests carry unbound specs whose source IDs are the client's ordinal placeholders: Spark numbers the root struct's fields from zero, so partitioning or sorting by a table's first column sends source-id 0. Those requests failed with "source ID must be positive: 0". Reject only negative IDs during decoding and leave positivity to schema binding, which is where Java enforces it. TableMetadata.newTableMetadata assigns fresh IDs and remaps each spec field by looking the source name up in the request schema; reassignIDs already does the same, so ordinal IDs were handled correctly once past decoding. Non-resolvable IDs are still caught: AddPartitionFieldBySourceID and SortOrder.CheckCompatibility report source IDs missing from the schema. Regression tests cover a create-table request numbered from zero through NewMetadata and a metadata round trip, for both partition specs and sort orders. -- 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]
