RussellSpitzer commented on code in PR #11035: URL: https://github.com/apache/iceberg/pull/11035#discussion_r1803219170
########## 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 was using shorthand, I meant that for every value in "values" you should be checking disticntCount Psuedocode for all values in columStatsValues value.distinctCount.isEmpty columStats.values().allOf( v -> v.distinctCount.isEmpty) -- 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