Copilot commented on code in PR #2784:
URL: https://github.com/apache/iceberg-go/pull/2784#discussion_r4759425759
##########
table/compaction/compaction.go:
##########
@@ -171,6 +172,12 @@ func (cfg Config) Validate() error {
return fmt.Errorf("max group size (%d) must be zero or at least
the target file size (%d)",
cfg.MaxGroupSizeBytes, cfg.TargetFileSizeBytes)
}
+ if cfg.PackingLookback == 0 {
+ return fmt.Errorf("packing lookback must be >= 1, got %d",
cfg.PackingLookback)
+ }
+ if cfg.PackingLookback > math.MaxInt {
+ return fmt.Errorf("packing lookback (%d) exceeds max int (%d)",
cfg.PackingLookback, math.MaxInt)
Review Comment:
`website/src/releases.md` is the repository's Unreleased compatibility-notes
list, but this new validation is not covered there. A `Config` struct literal
that omits `PackingLookback` now fails validation; please add the migration to
set it to at least 1 (for example, `DefaultPackingLookback`) so existing
callers know how to update.
--
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]