[jira] [Commented] (IGNITE-14816) Calcite engine. Change TreeMap in sorted IndexSpoolNode to ArrayList
[ https://issues.apache.org/jira/browse/IGNITE-14816?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17398513#comment-17398513 ] Taras Ledkov commented on IGNITE-14816: --- [~alex_pl], not catch an idea. {quote} in most cases it will give a performance boost.{quote} How is this possible? *N* comparisons is faster than *log(N)* comparisons? Is there any benchmark for the {{RuntimeSortedIndex}}? > Calcite engine. Change TreeMap in sorted IndexSpoolNode to ArrayList > > > Key: IGNITE-14816 > URL: https://issues.apache.org/jira/browse/IGNITE-14816 > Project: Ignite > Issue Type: Improvement >Reporter: Aleksey Plekhanov >Assignee: Pavel Pereslegin >Priority: Minor > Labels: calcite3-required > Time Spent: 50m > Remaining Estimate: 0h > > {{IgniteSortedIndexSpool}} assumes that the underlying input is already > sorted, but the execution node creates {{TreeMap}} to find the rows (see > {{IndexSpoolNode#createTreeSpool}}). This {{TreeMap}} can be replaced with > {{ArrayList}} and binary search with the same efficiency for searching and > lower costs for inserting data. > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (IGNITE-14816) Calcite engine. Change TreeMap in sorted IndexSpoolNode to ArrayList
[ https://issues.apache.org/jira/browse/IGNITE-14816?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17398142#comment-17398142 ] Aleksey Plekhanov commented on IGNITE-14816: [~tledkov-gridgain], in most cases it will give a performance boost. I see only one disadvantage here: the use of RuntimeSortedIndex with almost unique values. In the case of correlated NL join with unique RuntimeSortedIndex as the right input, for example, we will do 2 times more comparisons for each row of the left input. > Calcite engine. Change TreeMap in sorted IndexSpoolNode to ArrayList > > > Key: IGNITE-14816 > URL: https://issues.apache.org/jira/browse/IGNITE-14816 > Project: Ignite > Issue Type: Improvement >Reporter: Aleksey Plekhanov >Assignee: Pavel Pereslegin >Priority: Minor > Labels: calcite3-required > Time Spent: 50m > Remaining Estimate: 0h > > {{IgniteSortedIndexSpool}} assumes that the underlying input is already > sorted, but the execution node creates {{TreeMap}} to find the rows (see > {{IndexSpoolNode#createTreeSpool}}). This {{TreeMap}} can be replaced with > {{ArrayList}} and binary search with the same efficiency for searching and > lower costs for inserting data. > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (IGNITE-14816) Calcite engine. Change TreeMap in sorted IndexSpoolNode to ArrayList
[ https://issues.apache.org/jira/browse/IGNITE-14816?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17398094#comment-17398094 ] Taras Ledkov commented on IGNITE-14816: --- [~xtern], [~alex_pl] what do you think about remove comparison with {{upper}} for the each row at the {{RuntimeSortedIndex.Cursor#next}}. I mean calculate upper bound one time on cursor initialization then check only index of the upper bound. > Calcite engine. Change TreeMap in sorted IndexSpoolNode to ArrayList > > > Key: IGNITE-14816 > URL: https://issues.apache.org/jira/browse/IGNITE-14816 > Project: Ignite > Issue Type: Improvement >Reporter: Aleksey Plekhanov >Assignee: Pavel Pereslegin >Priority: Minor > Labels: calcite3-required > Time Spent: 50m > Remaining Estimate: 0h > > {{IgniteSortedIndexSpool}} assumes that the underlying input is already > sorted, but the execution node creates {{TreeMap}} to find the rows (see > {{IndexSpoolNode#createTreeSpool}}). This {{TreeMap}} can be replaced with > {{ArrayList}} and binary search with the same efficiency for searching and > lower costs for inserting data. > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (IGNITE-14816) Calcite engine. Change TreeMap in sorted IndexSpoolNode to ArrayList
[ https://issues.apache.org/jira/browse/IGNITE-14816?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17390399#comment-17390399 ] Pavel Pereslegin commented on IGNITE-14816: --- [~alex_pl], [~korlov], thanks for the review! > Calcite engine. Change TreeMap in sorted IndexSpoolNode to ArrayList > > > Key: IGNITE-14816 > URL: https://issues.apache.org/jira/browse/IGNITE-14816 > Project: Ignite > Issue Type: Improvement >Reporter: Aleksey Plekhanov >Assignee: Pavel Pereslegin >Priority: Minor > Labels: calcite3-required > Time Spent: 50m > Remaining Estimate: 0h > > {{IgniteSortedIndexSpool}} assumes that the underlying input is already > sorted, but the execution node creates {{TreeMap}} to find the rows (see > {{IndexSpoolNode#createTreeSpool}}). This {{TreeMap}} can be replaced with > {{ArrayList}} and binary search with the same efficiency for searching and > lower costs for inserting data. > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (IGNITE-14816) Calcite engine. Change TreeMap in sorted IndexSpoolNode to ArrayList
[ https://issues.apache.org/jira/browse/IGNITE-14816?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17389925#comment-17389925 ] Konstantin Orlov commented on IGNITE-14816: --- [~xtern], LGTM! > Calcite engine. Change TreeMap in sorted IndexSpoolNode to ArrayList > > > Key: IGNITE-14816 > URL: https://issues.apache.org/jira/browse/IGNITE-14816 > Project: Ignite > Issue Type: Improvement >Reporter: Aleksey Plekhanov >Assignee: Pavel Pereslegin >Priority: Minor > Labels: calcite2-required, calcite3-required > Time Spent: 40m > Remaining Estimate: 0h > > {{IgniteSortedIndexSpool}} assumes that the underlying input is already > sorted, but the execution node creates {{TreeMap}} to find the rows (see > {{IndexSpoolNode#createTreeSpool}}). This {{TreeMap}} can be replaced with > {{ArrayList}} and binary search with the same efficiency for searching and > lower costs for inserting data. > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (IGNITE-14816) Calcite engine. Change TreeMap in sorted IndexSpoolNode to ArrayList
[ https://issues.apache.org/jira/browse/IGNITE-14816?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17377954#comment-17377954 ] Pavel Pereslegin commented on IGNITE-14816: --- [~alex_pl], take a look at these changes, please. > Calcite engine. Change TreeMap in sorted IndexSpoolNode to ArrayList > > > Key: IGNITE-14816 > URL: https://issues.apache.org/jira/browse/IGNITE-14816 > Project: Ignite > Issue Type: Improvement >Reporter: Aleksey Plekhanov >Assignee: Pavel Pereslegin >Priority: Minor > Labels: calcite2-required, calcite3-required > Time Spent: 10m > Remaining Estimate: 0h > > {{IgniteSortedIndexSpool}} assumes that the underlying input is already > sorted, but the execution node creates {{TreeMap}} to find the rows (see > {{IndexSpoolNode#createTreeSpool}}). This {{TreeMap}} can be replaced with > {{ArrayList}} and binary search with the same efficiency for searching and > lower costs for inserting data. > -- This message was sent by Atlassian Jira (v8.3.4#803005)