huaxingao commented on code in PR #10943:
URL: https://github.com/apache/iceberg/pull/10943#discussion_r1719976513


##########
parquet/src/main/java/org/apache/iceberg/parquet/Parquet.java:
##########
@@ -1151,6 +1152,11 @@ public ReadBuilder withAADPrefix(ByteBuffer aadPrefix) {
       return this;
     }
 
+    public ReadBuilder pushedlimit(int limit) {

Review Comment:
   I think we are OK because Spark has assert for limit. If the limit is 
negative, e.g. `SELECT * FROM table limit -2`, Spark will throw 
   ```
   org.apache.spark.sql.AnalysisException: 
[INVALID_LIMIT_LIKE_EXPRESSION.IS_NEGATIVE] The limit like expression "-2" is 
invalid. The limit expression must be equal to or greater than 0, but got -2.;
   ```
   If the limit is 0, e.g. `SELECT * FROM table limit 0`, Spark changes this to 
an empty table scan and it won't reach here.



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