zeroshade commented on code in PR #1414:
URL: https://github.com/apache/iceberg-go/pull/1414#discussion_r3553634039
##########
partitions.go:
##########
@@ -210,6 +210,9 @@ func NewPartitionSpecOpts(opts ...PartitionOption)
(PartitionSpec, error) {
func WithSpecID(id int) PartitionOption {
return func(p *PartitionSpec) error {
+ if id < 0 {
Review Comment:
This negative-spec-id guard is unrelated to the UUID-stats fix and is
identical to the change in #1413 (reject negative PartitionSpec IDs). Please
drop it from this PR so the two don't conflict — it can land via #1413.
##########
table/internal/parquet_files.go:
##########
@@ -730,6 +736,18 @@ func (p parquetFormat) DataFileStatsFromMeta(meta
Metadata, statsCols map[int]St
}
}
+func safeUpdateAgg(agg StatsAgg, stats interface{ HasMinMax() bool }) (err
error) {
+ defer func() {
+ if r := recover(); r != nil {
Review Comment:
This blanket `recover()` swallows panics from any aggregator (nil deref,
type assertion, decimal/FLBA, etc.), turning real bugs into silent column-stat
invalidation. Prefer fixing the root cause: have the UUID (and decimal/FLBA)
stat wrappers' `Min()`/`Max()` check byte-length and return a no-bounds result
rather than panicking.
--
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]