[
https://issues.apache.org/jira/browse/ASTERIXDB-2674?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Wenhai Li updated ASTERIXDB-2674:
---------------------------------
Summary: Index-based similarity search does not work on top of index-based
selection (was: Index-based similarity search doest not work on top of
index-based selection)
> Index-based similarity search does not work on top of index-based selection
> ---------------------------------------------------------------------------
>
> Key: ASTERIXDB-2674
> URL: https://issues.apache.org/jira/browse/ASTERIXDB-2674
> Project: Apache AsterixDB
> Issue Type: Bug
> Components: *DB - AsterixDB, AQL - Translator AQL, SQL - Translator
> SQL++
> Affects Versions: 0.9.4.1
> Environment: Mac/Linux/Windows
> Reporter: Wenhai Li
> Assignee: Taewoo Kim
> Priority: Major
>
> When we conduct index-based similarity search (with hint /*+indexnl*/ ~=)
> based on the results derived from an index-based selection, the index-based
> search does not work with a compilation error - {color:#de350b}ASX1030: The
> subtree does not have any data source{color}.
> Schema:
> {code:java}
> DROP dataverse test IF EXISTS;
> CREATE dataverse test;
> USE test;
> DROP DATASET lefttable IF EXISTS;
> DROP TYPE lefttype IF EXISTS;
> CREATE TYPE lefttype AS OPEN {
> leftid: string,
> leftname: string
> };
> CREATE DATASET lefttable(lefttype) PRIMARY KEY leftid;
> CREATE INDEX leftnameidx on lefttable(leftname) TYPE btree;
> DROP DATASET righttable IF EXISTS;
> DROP TYPE righttype IF EXISTS;
> CREATE TYPE righttype AS OPEN {
> rightid: string,
> leftids: string?
> };
> CREATE DATASET righttable(righttype) PRIMARY KEY rightid;
> CREATE INDEX rightleftidsidx on righttable(leftids) TYPE keyword;
> {code}
> Query:
> {code:java}
> USE test;
> SET `simthreshold` `0.0f`;
> SELECT LT.leftid, RT.rightid
> FROM lefttable LT, righttable RT
> WHERE LT.leftname = 'aaa'
> AND `word-tokens`(LT.leftid) /+indexnl/ ~= `word-tokens`(RT.leftids)
> ORDER BY LT.leftid, RT.rightid;
> {code}
> Issue:
> {code:java}
> ASX1030: The subtree does not have any data source (in line 6, at column 5)
> [CompilationException]{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)