Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
0.9.4
-
None
Description
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":
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;