julianhyde commented on code in PR #4537:
URL: https://github.com/apache/calcite/pull/4537#discussion_r2361350966
##########
core/src/main/java/org/apache/calcite/rel/rules/SortRemoveRedundantRule.java:
##########
@@ -125,7 +126,7 @@ protected SortRemoveRedundantRule(final
SortRemoveRedundantRule.Config config) {
// then we could remove the redundant sort.
if (inputMaxRowCount != null
&& Double.isFinite(inputMaxRowCount)
- && new BigDecimal(inputMaxRowCount).compareTo(rowCountThreshold.get())
<= 0) {
+ && SqlFunctions.le(new BigDecimal(inputMaxRowCount),
rowCountThreshold.get())) {
call.transformTo(sort.getInput());
Review Comment:
I don't think `SqlFunctions.le` is an improvement. It's overloaded, so it
makes it difficult to figure out what's going on. `new
BigDecimal(inputMaxRowCount).compareTo(rowCountThreshold.get()) <= 0` seems
fine to me.
--
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]