anshurajbisoyi98-ctrl commented on code in PR #2729:
URL: https://github.com/apache/iceberg-go/pull/2729#discussion_r4738193152


##########
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:
   Sorry about that. The merge from main brought in the change that removed 
`invalidateCol`, and I didn't rebuild after it. I removed the leftover loop and 
it builds now.



##########
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:
   Agreed. The import paths now mark partition source columns in the stats 
plan, and only those get bounds and null counts read outside their metrics 
mode. Every other `none` or `counts` column is handled like on main. I added 
the list of half floats as a test.



##########
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:
   Good point, I removed that line. A null count from any row group is now 
kept, and I added a test where the second row group has no null count.



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