Vladsz83 commented on code in PR #9987:
URL: https://github.com/apache/ignite/pull/9987#discussion_r854343627
##########
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/rel/IgniteSort.java:
##########
@@ -109,14 +130,21 @@ public IgniteSort(RelInput input) {
/** {@inheritDoc} */
@Override public RelOptCost computeSelfCost(RelOptPlanner planner,
RelMetadataQuery mq) {
- double rows = mq.getRowCount(getInput());
+ double inputRows = mq.getRowCount(getInput());
- double cpuCost = rows * IgniteCost.ROW_PASS_THROUGH_COST +
Util.nLogN(rows) * IgniteCost.ROW_COMPARISON_COST;
- double memory = rows * getRowType().getFieldCount() *
IgniteCost.AVERAGE_FIELD_SIZE;
+ double lim = fetch != null ? doubleFromRex(fetch, inputRows *
FETCH_IS_PARAM_FACTOR) : inputRows;
Review Comment:
Fixed
##########
modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/CalciteQueryProcessorTest.java:
##########
@@ -1049,6 +1049,27 @@ public void quantifiedCompTest() throws
InterruptedException {
.returns(13d)
.check();
+ assertQuery(client, "select salary from account where salary > SOME
(10, 11) ORDER BY salary OFFSET 1")
+ .returns(12d)
+ .returns(13d)
+ .returns(13d)
+ .returns(13d)
+ .check();
+
+ assertQuery(client, "select salary from account where salary > 11
ORDER BY salary LIMIT 3 OFFSET 1")
+ .returns(13d)
+ .returns(13d)
+ .returns(13d)
+ .check();
+
+ assertQuery(client, "select salary from account where salary > 11
ORDER BY salary LIMIT 0")
+ .returns()
Review Comment:
Fixed
--
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]