Xikui Wang created ASTERIXDB-2430:
-------------------------------------

             Summary: Failed to pick up index when there is function call in 
the parameter list
                 Key: ASTERIXDB-2430
                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-2430
             Project: Apache AsterixDB
          Issue Type: Bug
            Reporter: Xikui Wang


{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 monumentList if exists;
drop type monumentType if exists;
create type monumentType as open {
  mid: string,
  mloc: point
};
create dataset monumentList(monumentType) primary key mid;
create index mlocidx on monumentList(mloc) type rtree;

create dataset Tweets1(StoredTweetType) primary key tid autogenerated;
create dataset Tweets2(StoredTweetType) primary key tid autogenerated;

insert into Tweets2
(From Tweets1 x
select x, (
let temp = create_circle(create_point(x.latitude, x.longitude), 3.0)
select value ml.mid from monumentList ml
  where /*+ indexnl */ spatial_intersect(temp, ml.mloc)));
{code}

The create_circle function call is ignored by the access method selector as it 
failed to match the existed pattern: two variables, or a variable and a 
constant.



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

Reply via email to