badalprasadsingh commented on code in PR #2729:
URL: https://github.com/apache/iceberg-go/pull/2729#discussion_r4737360144


##########
table/internal/parquet_files.go:
##########
@@ -2135,14 +2141,27 @@ func (p parquetFormat) DataFileStatsFromMeta(meta 
Metadata, statsCols map[int]St
        }
 
        slices.Sort(splitOffsets)
+       for fieldID := range invalidateCol {
+               delete(nullValueCounts, fieldID)
+               delete(sourceNullCounts, fieldID)
+               delete(colAggs, fieldID)
+               incompleteBounds[fieldID] = nil
+       }

Review Comment:
   this just doesn't compile please check



##########
table/internal/parquet_files.go:
##########
@@ -2047,20 +2051,23 @@ func (p parquetFormat) DataFileStatsFromMeta(meta 
Metadata, statsCols map[int]St
 
                                panic(column.resolveErr)
                        }
-                       if column.variantChild || column.skipStats || 
column.statsCol.Mode.Typ == MetricModeNone {
+                       if column.variantChild || column.skipStats {
                                continue
                        }
 
                        fieldID, statsCol := column.fieldID, column.statsCol
+                       recordCounts := statsCol.Mode.Typ != MetricModeNone

Review Comment:
   this reads bounds for everynone and counts col not only the partition 
sources, nested cols are counts by default
   
   a list of half floats imports on the current main branchbut fails here, and, 
none now costs as much as full
   
   better would be to limit it to partitions sources



##########
table/internal/parquet_files.go:
##########
@@ -2135,14 +2141,27 @@ func (p parquetFormat) DataFileStatsFromMeta(meta 
Metadata, statsCols map[int]St
        }
 
        slices.Sort(splitOffsets)
+       for fieldID := range invalidateCol {
+               delete(nullValueCounts, fieldID)
+               delete(sourceNullCounts, fieldID)
+               delete(colAggs, fieldID)
+               incompleteBounds[fieldID] = nil
+       }
        for fieldID := range missingNulls {
                delete(nullValueCounts, fieldID)
+               delete(sourceNullCounts, fieldID)

Review Comment:
   in case a rowgroup has no null count, this line drops nulls found in other 
rowgroups
   
   one known null is enough, so, better remove this line and add a test



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