tanmayrauth commented on code in PR #1098:
URL: https://github.com/apache/iceberg-go/pull/1098#discussion_r3272801855


##########
table/evaluators.go:
##########
@@ -1568,12 +1568,36 @@ func (m *strictMetricsEval) canContainNulls(fieldID 
int) bool {
        return exists && cnt > 0
 }
 
+func (m *strictMetricsEval) mayContainNulls(field iceberg.NestedField) bool {
+       cnt, exists := m.nullCounts[field.ID]
+       if !exists {
+               return !field.Required

Review Comment:
     +1 on the VisitNotEqual/VisitNotIn gap, but I don't think 
mayContainNulls/mayContainNans is the right fix there. 
   
   The Java reference uses containsNullsOnly/containsNaNsOnly (not 
canContainNulls) and has no  separate null/NaN guard beyond that — it falls 
directly through to bounds checks.                                              
                                                                                
                                                                                
                                                                                
                                                    
     The Go code incorrectly uses canContainNulls (any nulls → rowsMustMatch) 
where it should use containsNullsOnly (all nulls → rowsMustMatch). The helpers 
already exist at evaluators.go:637. Probably best as a  separate fix given the 
different semantics from the six visitors this PR addresses. 



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