IGNITE-12819 Calcite integration. Cost system#8590
Conversation
| awaitPartitionMapExchange(true, true, null); | ||
|
|
||
| QueryEngine engine = Commons.lookupComponent(grid(1).context(), QueryEngine.class); | ||
| QueryEngine engine = Commons.lookupComponent(ignite.context(), QueryEngine.class); |
There was a problem hiding this comment.
hope we need to extend this and lower tests, append additional call from server nodes and check results for equality.
There was a problem hiding this comment.
think it should be done under separate ticket
| @Test | ||
| public void testOrderByNoIndexedColumn() { | ||
| assertQuery("SELECT * FROM Developer ORDER BY age DESC") | ||
| .matches(containsTableScan("PUBLIC", "DEVELOPER")) |
There was a problem hiding this comment.
possibly we need to append additional check for IndexScan usage here and all appropriate tests? If it`s beyond the scope of this ticket may be we need additional one?
There was a problem hiding this comment.
We don't. Every test should have only those checks which verifies a state the current test is suppose to verify.
| public void testMergeJoin() { | ||
| assertQuery("" + | ||
| "SELECT d1.name, d2.name FROM Developer d1, Developer d2 WHERE d1.depId = d2.depId") | ||
| "SELECT /*+ DISABLE_RULE('CorrelatedNestedLoopJoin') */ d1.name, d2.name FROM Developer d1, Developer d2 WHERE d1.depId = d2.depId") |
There was a problem hiding this comment.
why do we need it here? test passed without this change too.
There was a problem hiding this comment.
because in the middle of the task progress this test was failing several times because of changed plan. Since this test should verify only correctness of MergeJoin execution, I think it's OK to disable other algorithms explicitly
| double rowCount = mq.getRowCount(getInput()); | ||
|
|
||
| return planner.getCostFactory().makeCost(rowCount, | ||
| rowCount * (IgniteCost.ROW_COMPARISON_COST + IgniteCost.ROW_PASS_THROUGH_COST), 0); |
There was a problem hiding this comment.
not obvious here, can u explain plz ? why : IgniteCost.ROW_COMPARISON_COST + IgniteCost.ROW_PASS_THROUGH_COST
There was a problem hiding this comment.
TrimExchange just filter out rows which don't met the distribution function's. So the cost function is the same as for IgniteFilter
| return super.computeSelfCost(planner, mq).plus(planner.getCostFactory().makeTinyCost()); | ||
| double rows = table.getRowCount(); | ||
|
|
||
| double cost = rows * IgniteCost.ROW_PASS_THROUGH_COST; |
There was a problem hiding this comment.
u can place this cost computation under "else" scope.
There was a problem hiding this comment.
yep, but I would prefer to left this as is, If you don't mind
|
This PR is associated with a resolved ticket. Closing the PR, please reopen it if you still need it. |
Thank you for submitting the pull request to the Apache Ignite.
In order to streamline the review of the contribution
we ask you to ensure the following steps have been taken:
The Contribution Checklist
The description explains WHAT and WHY was made instead of HOW.
The following pattern must be used:
IGNITE-XXXX Change summarywhereXXXX- number of JIRA issue.(see the Maintainers list)
the
green visaattached to the JIRA ticket (see TC.Bot: Check PR)Notes
If you need any help, please email dev@ignite.apache.org or ask anу advice on http://asf.slack.com #ignite channel.