You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "Wenhai Li (Jira)" <ji...@apache.org> on 2019/11/13 19:15:00 UTC
[jira] [Created] (ASTERIXDB-2674) Index-based similarity search
doest not work on top of index-based selection
Wenhai Li created ASTERIXDB-2674:
------------------------------------
Summary: Index-based similarity search doest 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
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:
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;{color:#de350b}CREATE INDEX leftnameidx on lefttable(leftname) TYPE btree;{color}
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;
Query:
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;
Issue:
ASX1030: The subtree does not have any data source (in line 6, at column 5) [CompilationException]
--
This message was sent by Atlassian Jira
(v8.3.4#803005)