zeroshade commented on code in PR #2559:
URL: https://github.com/apache/iceberg-go/pull/2559#discussion_r4553923033


##########
table/arrow_utils.go:
##########
@@ -2205,6 +2215,30 @@ type recordWritingArgs struct {
        existingDVs map[string]*dv.RoaringPositionBitmap
 }
 
+func checkPartitionSourceType(field iceberg.PartitionField, sourceType 
iceberg.Type) error {

Review Comment:
   The built-in transform list and the pointer-deref reflection here duplicate 
`addSpecFieldInternal` in `partitions.go`. Could both call one helper in the 
root package (unexported, plus a thin exported or internal wrapper for 
`table`), so the list of built-in transforms can't drift between them?
   
   Also, the `reflect.TypeAssert` deref seems avoidable. iceberg-go's primitive 
types are value types, so if a `*DecimalType`-style pointer can actually reach 
this code, a small type switch would handle it without reflection. If it can't 
reach this code, the block can go.



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