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