-
Notifications
You must be signed in to change notification settings - Fork 546
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ArrayIndexOutOfBoundsException in complex query #15901
Comments
Original query plan
Plan of the query without unused field
Plan of the query without FROM information_schema.tables limit 1
Plan of the query without filters in the sorting_field subquery
|
Not posting plan without ORDER BY as issue is probably related to ORDER BY + correlated subquery. Last posted plan (without filters) is quite different from other 3, has only 1 CorrelatedJoin operator. The most interesting are first 2 workarounds (plan without unused_field and plan without FROM information_schema). Diff is basically that top-most CorrelatedJoin gets a different cte2 -
whereas not-working query has
UPD: Reverting #13895 helps, prunning should not be done in some cases. |
left side is a plan for not working query, right side is a plan for a query without order by what's interesting is that #15969 targets issue "Correlated join references to a column, that is prunned in the sub-plan" but plan without OrderBy ^ has the same issue and yet it works. I think prunning fix is needed, it only shows that initial idea about the root cause was not correct. |
CrateDB version
5.7.0 and 5.6.3
CrateDB setup information
Number of nodes: 3
Problem description
The query below (an anonymised and simplified version of a much more complex query I was trying to run), fails with an
ArrayIndexOutOfBoundsException
.Please note that removing any one of the following elements the query runs without error messages:
unused_field1
ORDER BY sorting_field
sorting_field
subqueryFROM information_schema.tables limit 1
Steps to Reproduce
Actual Result
Expected Result
The text was updated successfully, but these errors were encountered: