You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2021/08/13 20:06:00 UTC

[jira] [Commented] (ASTERIXDB-2921) INLJ w/ Quantification

    [ https://issues.apache.org/jira/browse/ASTERIXDB-2921?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17398895#comment-17398895 ] 

ASF subversion and git services commented on ASTERIXDB-2921:
------------------------------------------------------------

Commit a518efb94f6543a4885c1f314a07bc13875a3d38 in asterixdb's branch refs/heads/master from ggalvizo
[ https://gitbox.apache.org/repos/asf?p=asterixdb.git;h=a518efb ]

[ASTERIXDB-2921][IDX] Support for INLJ w/ quantification.

- user mode changes: no
- storage format changes: no
- interface changes: no

INLJ can now be applied to quantification queries if an array-index
exists. This includes INLJ w/ membership, INLJ w/ existential
quantification, and INLJ w/ universal quantification provided that a
non-emptiness clause is also given.

Change-Id: I834f6c397e4c86a5ede960b924e59727e358fa9d
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/12303
Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <je...@fulliautomatix.ics.uci.edu>
Reviewed-by: Dmitry Lychagin <dm...@couchbase.com>


> INLJ w/ Quantification
> ----------------------
>
>                 Key: ASTERIXDB-2921
>                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-2921
>             Project: Apache AsterixDB
>          Issue Type: New Feature
>          Components: IDX - Indexes
>            Reporter: Glenn Justo Galvizo
>            Assignee: Glenn Justo Galvizo
>            Priority: Major
>
> The following query should be optimized, but currently isn't:
> {code:java}
> SET `compiler.arrayindex` "true";
> DROP DATAVERSE TestYelp IF EXISTS;
> CREATE DATAVERSE TestYelp;
> USE TestYelp;
> CREATE TYPE CheckinType AS {
>     checkin_id: uuid,
>     business_id: string,
>     dates: [string]
>     };
> CREATE TYPE CheckinDatesToMarkersType AS {
>     marker: string,
>     datetime: string,
>     date: string,
>     time: string
>     };
> CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
> CREATE DATASET YelpCheckinDateMarkers (CheckinDatesToMarkersType) PRIMARY KEY marker;
> CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates);
> FROM    YelpCheckinDateMarkers M, YelpCheckin C
> WHERE   M.datetime /*+ indexnl */ IN C.dates AND 
>         C.business_id = "--Ni3oJ4VOqfOEu7Sj2Vzg"
> SELECT  COUNT(*);
> {code}
> Grammar support needs to be added to recognize the INLJ hint in quantified expressions, and the same "throwaway branch" optimization from the SELECT-AM rule needs to be performed for the JOIN-AM rule. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)