Join queries with order by clause doesn't work
See original GitHub issueHi! Join queries with order by clause doesn’t work
Affected Version
0.23.0, 0.24.0
Description
Queries like (with join and order by clause):
SELECT "T1"."__time"
FROM "SomeTableA" AS "T1"
JOIN "SomeTableB" AS "T2"
ON "T1"."A" = "T2"."B"
ORDER BY "T1"."__time" ASC
Doesn’t work at 0.23.0 and 0.24.0 versions of Druid (but works at 0.22.0). “Doesn’t work” means that query processing ends with exception on broker node:
Error: Unknown exception
Cannot convert query parts into an actual query
org.apache.druid.sql.calcite.rel.CannotBuildQueryException
More detailed log here: broker.log
Issue Analytics
- State:
- Created a year ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Order by in Inner Join - Stack Overflow
When you do an INNER JOIN, SQL Server determines the best way to find the matching rows (nested loops, etc). This results in...
Read more >How to optimize a query with JOINs and ORDER BY?
Is it possible to optimize a query with both JOIN s and ORDER BY as long as the ORDER BY clause only targets...
Read more >SQL join tables with group by and order by - w3resource
In this page, we are going to discuss the usage of GROUP BY and ORDER BY clause within a join. Here is a...
Read more >MySQL Bugs: #69528: ORDER BY doesn't work with JOIN
ORDER BY seems to work if there's no WHERE... so seems to be the combination of a JOIN, WHERE and ORDER BY yields...
Read more >How Join Order Can Affect the Query Plan - MSSQLTips.com
Generally speaking the SQL Server Optimizer will try to first join the tables that allows it to work with the smallest result set...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I think https://github.com/apache/druid/pull/12418 caused it. @somu-imply FYI.
The test case has been added through #13173