You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "Glenn Justo Galvizo (Jira)" <ji...@apache.org> on 2021/09/11 21:27:00 UTC
[jira] [Created] (ASTERIXDB-2960) LOJ on subquery with UNNEST for
array indexes throwing type error
Glenn Justo Galvizo created ASTERIXDB-2960:
----------------------------------------------
Summary: LOJ on subquery with UNNEST for array indexes throwing type error
Key: ASTERIXDB-2960
URL: https://issues.apache.org/jira/browse/ASTERIXDB-2960
Project: Apache AsterixDB
Issue Type: Bug
Components: IDX - Indexes
Reporter: Glenn Justo Galvizo
Assignee: Glenn Justo Galvizo
A query like this currently throws an error when trying to optimize for an LOJ INLJ:
{code:java}
SET `compiler.arrayindex` "true";
DROP DATAVERSE TestDataverse IF EXISTS;
CREATE DATAVERSE TestDataverse;
USE TestDataverse;
CREATE TYPE GenericType AS { _id: uuid };
CREATE DATASET IndexedDataset (GenericType)
PRIMARY KEY _id AUTOGENERATED;
CREATE DATASET ProbeDataset (GenericType)
PRIMARY KEY _id AUTOGENERATED;
CREATE INDEX TestIdx
ON IndexedDataset (
UNNEST items
SELECT val : bigint
);
FROM ProbeDataset P
LEFT OUTER JOIN (
FROM IndexedDataset I
UNNEST I.items II
SELECT VALUE II.val
) AS IIV
ON IIV /* +indexnl */ = TO_BIGINT(P.val)
SELECT DISTINCT P;
{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)