nssalian commented on code in PR #2375:
URL: https://github.com/apache/iceberg-go/pull/2375#discussion_r4517048532
##########
table/internal/variant_bounds.go:
##########
@@ -267,9 +268,12 @@ func appendLiteralToVariant(b *variant.Builder, it
iceberg.PrimitiveType, lit ic
case iceberg.BooleanType:
return b.AppendBool(lit.Any().(bool))
case iceberg.Int32Type:
- return b.AppendInt(int64(lit.Any().(int32)))
+ // AppendInt picks the smallest width; bounds must keep the
column's width.
Review Comment:
Fixed in this PR. INT(8)/INT(16) leaves keep their annotation width for both
bounds, like `ParquetVariantUtil`. `TestShreddedVariantAddFilesNarrowIntBounds`
imports 0..4 and checks int8/int16 on both ends. An out-of-range stat returns
an error instead of being truncated.
--
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]