huaxingao commented on code in PR #10659: URL: https://github.com/apache/iceberg/pull/10659#discussion_r1683659065
########## spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/source/SparkScan.java: ########## @@ -189,9 +192,8 @@ protected Statistics estimateStatistics(Snapshot snapshot) { boolean cboEnabled = Boolean.parseBoolean(spark.conf().get(SQLConf.CBO_ENABLED().key(), "false")); - Map<NamedReference, ColumnStatistics> colStatsMap = null; + Map<NamedReference, ColumnStatistics> colStatsMap = Maps.newHashMap(); Review Comment: In Spark side, it has a `columnStats().isEmpty`, so I changed back to `Maps.newHashMap()` to avoid the NPE. -- 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