zeroshade commented on issue #2062:
URL: https://github.com/apache/iceberg-go/issues/2062#issuecomment-6476769905

   Decision on the `Schema.FindFieldByIDRef` / `FieldsRef` item: **keep the 
sentinel**, for all three sentinel-gated accessors (`Schema.FieldsRef`, 
`Schema.FindFieldByIDRef` and `PartitionSpec.FieldsRef`).
   
   The `internal.SchemaRef` / `internal.PartitionSpecRef` argument already 
prevents callers outside the module. Hiding the methods entirely would need 
`go:linkname` (removed in #2066) or `init()`-registered function variables to 
break the `iceberg` ↔ `internal` import cycle, which adds an indirect call on 
the hot paths these accessors exist for. #2348 documents them as 
module-internal and not covered by compatibility guarantees. The only cost is 
that API-diff tooling will still flag a signature change after v1.
   
   The only way to drop them altogether is to make schema types deeply 
immutable (unexporting `StructType.FieldList` and the like) so `Fields()` no 
longer needs to clone. That would be a separate, much larger breaking change 
and isn't part of this item.
   


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