LIANG751234313 commented on code in PR #65821:
URL: https://github.com/apache/doris/pull/65821#discussion_r3794594772


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownScoreTopNIntoOlapScan.java:
##########
@@ -195,12 +195,16 @@ private Plan pushDown(
             return null;
         }
 
+        long scoreLimit = topN.getLimit() + topN.getOffset();
+        long pushedScoreLimit = shouldDisableSearchTopN(filter.getConjuncts(), 
extractedScorePredicate)

Review Comment:
   Before that, the overflow has been checked:
   `if (Utils.addOverflows(topN.getLimit(), topN.getOffset())) {
               return null;
           }`
   If overflow occurs, an error will occur:“`score() function requires WHERE 
clause with MATCH function, ORDER BY and LIMIT for optimization`”,instead of 
“`limit + offset overflows the long range`”.
   Do I need to change `return null;` to `throw new AnalysisException("limit + 
offset overflows the long range");`?



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