You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "Ali Alsuliman (Jira)" <ji...@apache.org> on 2020/02/18 09:20:00 UTC
[jira] [Created] (ASTERIXDB-2700) Fix invalid plan caused by order
by operator in a subquery
Ali Alsuliman created ASTERIXDB-2700:
----------------------------------------
Summary: Fix invalid plan caused by order by operator in a subquery
Key: ASTERIXDB-2700
URL: https://issues.apache.org/jira/browse/ASTERIXDB-2700
Project: Apache AsterixDB
Issue Type: Bug
Components: *DB - AsterixDB, RT - Runtime
Affects Versions: 0.9.4
Reporter: Ali Alsuliman
Assignee: Ali Alsuliman
Fix For: 0.9.5
The below query produces an invalid plan where two connectors are connected to each other. This happens when the optimizer optimizes the order-by operator by replacing it with a local order-by operator + sort-merge connector. If the parent operator of the original order-by operator introduces a connector, the plan ends up having two connectors. Here is an example query where there is an index on "user_since" and index on "author_id":
{code:java}
SET `compiler.sort.parallel` "false";
FROM (SELECT VALUE u FROM GleambookUsersCompositeRandom u WHERE u.user_since >= '2008-07-22T00:00:00' ORDER BY u.id) AS user, GleambookMessagesCompositeRandom AS msg
WHERE msg.author_id /*+ indexnl */ = user.id
SELECT user.name AS uname, msg.message AS message;
{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)