aokolnychyi commented on a change in pull request #1379:
URL: https://github.com/apache/iceberg/pull/1379#discussion_r476623038



##########
File path: spark2/src/main/java/org/apache/iceberg/spark/source/Reader.java
##########
@@ -283,7 +283,8 @@ public Statistics estimateStatistics() {
       return new Stats(0L, 0L);
     }
 
-    if (filterExpressions == null || filterExpressions == 
Expressions.alwaysTrue()) {
+    // estimate stats using snapshot summary only for partitioned tables 
(metadata tables are unpartitioned)
+    if (table.spec().fields().size() > 0 && filterExpression() == 
Expressions.alwaysTrue()) {

Review comment:
       I try to avoid negation in conditions to keep them easy to read. It 
looks OK here, updated.




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

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