You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "Till (JIRA)" <ji...@apache.org> on 2019/04/10 18:10:00 UTC

[jira] [Assigned] (ASTERIXDB-2436) AsterixIntroduceGroupByCombinerRule causes infinite loop in optimization

     [ https://issues.apache.org/jira/browse/ASTERIXDB-2436?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Till reassigned ASTERIXDB-2436:
-------------------------------

    Assignee: Dmitry Lychagin

> AsterixIntroduceGroupByCombinerRule causes infinite loop in optimization
> ------------------------------------------------------------------------
>
>                 Key: ASTERIXDB-2436
>                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-2436
>             Project: Apache AsterixDB
>          Issue Type: Bug
>            Reporter: Xikui Wang
>            Assignee: Dmitry Lychagin
>            Priority: Major
>
> It's because the rule tries to modify the plan. If the rule failed, the rule restores the backed up copy. This will change the Operators in the plan which doesn't match the DoNotApply list which will further cause the rule to be applied multiple times.
> {code}
> drop  dataverse test if exists;
> create  dataverse test;
> use test;
> create type TweetType as open {
>   id : int64,
>   created_at : datetime
> };
> create type StoredTweetType as open {
>   tid : uuid
> };
> drop dataset ReligiousBuildingDataset if exists;
> drop type ReligiousBuildingType if exists;
> create type ReligiousBuildingType as open {
>     religiousBuildingId : string,
>     religionName : string,
>     buildingLocation : point,
>     registeredBeliever: int
> };
> create dataset ReligiousBuildingDataset(ReligiousBuildingType) primary key religiousBuildingId;
> drop dataset AttackEventsDataset if exists;
> drop type AttackEventsType if exists;
> create type AttackEventsType as open {
>     attackRecordId: string,
>     attackDatetime: datetime,
>     attackLocation: point,
>     relatedReligion: string
> };
> create dataset AttackEventsDataset(AttackEventsType) primary key attackRecordId;
> create function annotateTweet(x) {
>     LET nearby_religious_building = (select r.religionName as Religion from ReligiousBuildingDataset r
>     where spatial_intersect(create_point(x.latitude, x.longitude), create_circle(r.buildingLocation, 3.0))),
>     nearby_religious_attack = (select Religion, count(a.attackRecordId) as AttackNum
>        from AttackEventsDataset a, nearby_religious_building r2
>        where x.created_at  < a.attackDatetime + duration("P2M")
>        and x.created_at  > a.attackDatetime
>        and r2.religionName = a.relatedReligion
>        group by r2.religionName as Religion)
>     select x.*, nearby_religious_attack
> };
> create dataset targetDataset(StoredTweetType) primary key tid autogenerated;
> create dataset tweetDataset(TweetType) primary key id;
> use test;
> insert into targetDataset (select annotateTweet(x) from tweetDataset x);
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)