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

   Fixes #2092
   
   `DecimalLiteral.To(Int32/Int64)` previously ignored scale, converting 
`12.34` to `1234` and causing predicates to bind against the wrong value.
   
   This change preserves exact conversions (`12.00` → `12`) and returns 
`ErrBadCast` for fractional values. Integer bounds are checked after scaling, 
and extreme scales are handled without panicking.
   
   Binding a fractional decimal to an int/long column now returns an error 
instead of silently binding a wrong value. Unlike Java, which rejects all 
decimal-to-int conversions, exact conversions are kept so existing scale-0 
bindings keep working (the second option in #2092).
   
   Tests cover fractional rejection, exact conversions, integer boundaries, 
extreme scales, and predicate binding.
   
   Validation: `gofmt`, `go vet ./...`, `go test -race -count=1 ./...`
   


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