laskoviymishka commented on code in PR #926:
URL: https://github.com/apache/iceberg-go/pull/926#discussion_r3116095144


##########
transforms.go:
##########
@@ -882,7 +895,7 @@ func (HourTransform) Transformer(src Type) (func(any) 
Optional[int32], error) {
 
                        return Optional[int32]{
                                Valid: true,
-                               Val:   int32(int64(v.(Timestamp)) / factor),
+                               Val:   int32(floorDiv(int64(v.(Timestamp)), 
factor)),

Review Comment:
   While we're in here: CanTransform accepts TimestampNsType/TimestampTzNsType 
but the type switches in both Transformer and Apply only handle the micros 
variants, so hour(ts_ns) on v3 tables hits ErrInvalidArgument instead of 
bucketing. 
   
   Pre-existing, but we're one case away from closing it here (factor = 
time.Hour / time.Nanosecond).
   
   Want to fold it into this PR while the code is hot?



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