RussellSpitzer commented on code in PR #11035:
URL: https://github.com/apache/iceberg/pull/11035#discussion_r1802045566


##########
spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/source/TestSparkScan.java:
##########
@@ -911,9 +1027,17 @@ private void checkColStatisticsReported(
     assertThat(stats.numRows().getAsLong()).isEqualTo(expectedRowCount);
 
     Map<NamedReference, ColumnStatistics> columnStats = stats.columnStats();
-    for (Map.Entry<String, Long> entry : expectedNDVs.entrySet()) {
-      
assertThat(columnStats.get(FieldReference.column(entry.getKey())).distinctCount().getAsLong())
-          .isEqualTo(entry.getValue());
+    if (expectedNDVs.isEmpty()) {
+      assertThat(
+              columnStats.isEmpty()
+                  || 
columnStats.values().iterator().next().distinctCount().isEmpty())

Review Comment:
   I'm not sure I understand the second check here. Shouldn't we be checking 
all `columnStats.values().distinctCount` are empty?



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to