You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Ignite TC Bot (Jira)" <ji...@apache.org> on 2022/09/20 07:19:00 UTC
[jira] [Commented] (IGNITE-15425) Calcite engine. Add native support for SEARCH/SARG operator
[ https://issues.apache.org/jira/browse/IGNITE-15425?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17606954#comment-17606954 ]
Ignite TC Bot commented on IGNITE-15425:
----------------------------------------
{panel:title=Branch: [pull/10251/head] Base: [master] : No blockers found!|borderStyle=dashed|borderColor=#ccc|titleBGColor=#D6F7C1}{panel}
{panel:title=Branch: [pull/10251/head] Base: [master] : New Tests (16)|borderStyle=dashed|borderColor=#ccc|titleBGColor=#D6F7C1}
{color:#00008b}Calcite SQL{color} [[tests 16|https://ci2.ignite.apache.org/viewLog.html?buildId=6616080]]
* {color:#013220}IgniteCalciteTestSuite: SearchSargOnIndexPlannerTest.testBoundsOneFieldSearchWithNull - PASSED{color}
* {color:#013220}IgniteCalciteTestSuite: SearchSargOnIndexPlannerTest.testBoundsWithCorrelate - PASSED{color}
* {color:#013220}IgniteCalciteTestSuite: SearchSargOnIndexPlannerTest.testBoundsOneFieldSearchRangeOptimization - PASSED{color}
* {color:#013220}IgniteCalciteTestSuite: SearchSargOnIndexPlannerTest.testBoundsSeveralFieldsSearch - PASSED{color}
* {color:#013220}IgniteCalciteTestSuite: SearchSargOnIndexPlannerTest.testBoundsMaxComplexity - PASSED{color}
* {color:#013220}IgniteCalciteTestSuite: SearchSargOnIndexPlannerTest.testBoundsDynamicParams - PASSED{color}
* {color:#013220}IgniteCalciteTestSuite: SearchSargOnIndexPlannerTest.testBoundsOneFieldSearchDeduplication - PASSED{color}
* {color:#013220}IgniteCalciteTestSuite: SearchSargOnIndexPlannerTest.testBoundsOneFieldSearch - PASSED{color}
* {color:#013220}IgniteCalciteTestSuite: SearchSargOnIndexPlannerTest.testBoundsDescOrdering - PASSED{color}
* {color:#013220}IgniteCalciteTestSuite: SearchSargOnIndexIntegrationTest.testNulls - PASSED{color}
* {color:#013220}IgniteCalciteTestSuite: SearchSargOnIndexIntegrationTest.testNot - PASSED{color}
... and 5 new tests
{panel}
[TeamCity *--> Run :: All* Results|https://ci2.ignite.apache.org/viewLog.html?buildId=6616159&buildTypeId=IgniteTests24Java8_RunAll]
> Calcite engine. Add native support for SEARCH/SARG operator
> -----------------------------------------------------------
>
> Key: IGNITE-15425
> URL: https://issues.apache.org/jira/browse/IGNITE-15425
> Project: Ignite
> Issue Type: Improvement
> Reporter: Aleksey Plekhanov
> Assignee: Aleksey Plekhanov
> Priority: Major
> Labels: calcite2-required, calcite3-required
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Currently, Calcite compose some field conditions to {{SEARCH/SARG}} operator (for example: {{field IN (scalar)}}, {{field <> ...}}, {{field = value1 OR field = value2}}, etc). This operator is not supported natively by Ignite Calcite engine and converted back to original expression using {{RexUtil.expandSearch}} method on theĀ {{RexToLixTranslator}} phase.
> Such behavior forces Ignite to use full table scan instead of indexes in some cases. For example, if {{field}} is indexed, with {{field IN (1, 2)}} condition usually is much faster to scan index for 2 values, then full scan table and filter out results. For {{OR}} operator {{OrToUnion}} rule can't be applied and there will be full table scan again.
> We should support index traversing using SEARCH/SARG operator.
> Alternatively we can convert {{SEARCH/SARG}} to {{UNIONs}} (similarly to {{OrToUnion}} rule), but this approach will extend plan search space a lot.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)