clintropolis commented on PR #12418:
URL: https://github.com/apache/druid/pull/12418#issuecomment-1097140531

   >hmm. I believe the part of the PR that fixes the bug, is using the row 
signature of the subquery. If you remove that and just explain the subQuery, 
the overall query will still fail with the same exception.
   
   Sorry yes, I confused myself, it is the outer scan query that is invalid, 
not the subquery here because the outer cannot order by the aliased time of the 
subquery, i mixed them up. But, it still is reporting that the query is valid 
because of the way this explain works, while calling `toDruidQuery` on the same 
fails with the `CannotBuildQueryException` we see when we try to transform the 
query after the valid check, so to me that seems it is not in fact a valid 
query.
   
   The worry I think is that changing explain to also explain the subquery 
might result in extra work being done which could result in increased planning 
time for nested queries, which is reasonable to be concerned about. Though, i 
also wonder if by not actually validating here if we are allowing other work to 
proceed which should not have gotten so far, like in this case if explain 
failed then it would never proceed to the rule transformation to fail again. 
I'm not really sure what is best though... or how to know


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to