You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "Dmitry Lychagin (Jira)" <ji...@apache.org> on 2021/11/16 20:45:00 UTC
[jira] [Created] (ASTERIXDB-2988) Left outer join query fails when indexnl hint is specified.
Dmitry Lychagin created ASTERIXDB-2988:
------------------------------------------
Summary: Left outer join query fails when indexnl hint is specified.
Key: ASTERIXDB-2988
URL: https://issues.apache.org/jira/browse/ASTERIXDB-2988
Project: Apache AsterixDB
Issue Type: Bug
Components: COMP - Compiler
Affects Versions: 0.9.7
Reporter: Dmitry Lychagin
Assignee: Dmitry Lychagin
Fix For: 0.9.7
The following query fails at compile time if indexnl is specified.
{noformat}
DROP dataverse test if exists;
CREATE dataverse test;
USE test;
CREATE DATASET ds1(x int, y int) PRIMARY KEY x;
CREATE INDEX idx_y ON ds1(y) TYPE BTREE;
insert into ds1 ([ {"x":1, "y":3 }, {"x":2, "y":4 } ]);
select r1, ds1.x, ds1.y
from range(0, 4) r1 left outer join ds1 on r1 /* +indexnl */ = ds1.y
order by r1
{noformat}
Exception:
{noformat}
org.apache.asterix.common.exceptions.CompilationException: ASX1030: The subtree does not have any data source (in line 25, at column 6)
at org.apache.asterix.optimizer.rules.am.OptimizableOperatorSubTree.getPrimaryKeyVars(OptimizableOperatorSubTree.java:437) ~[classes/:?]
at org.apache.asterix.optimizer.rules.am.AccessMethodUtils.finalizeJoinPlanTransformation(AccessMethodUtils.java:859) ~[classes/:?]
at org.apache.asterix.optimizer.rules.am.BTreeAccessMethod.applyJoinPlanTransformation(BTreeAccessMethod.java:300) ~[classes/:?]
at org.apache.asterix.optimizer.rules.am.IntroduceJoinAccessMethodRule.checkAndApplyJoinTransformation(IntroduceJoinAccessMethodRule.java:423) ~[classes/:?]
{noformat}
If index join rewriting cannot be performed then the hint should be ignored instead.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)