You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2022/04/11 02:09:23 UTC

[GitHub] [druid] somu-imply commented on pull request #12418: Handling planning with alias for time for group by and order by

somu-imply commented on PR #12418:
URL: https://github.com/apache/druid/pull/12418#issuecomment-1094470313

   @abhishekagarwal87 thanks for your comments. The scan query allows order by only on the __time column and the column name also needs to be `__time` as in https://github.com/apache/druid/blob/8edea5a82dfdb34c3177c0efd7a79bae54751ab8/sql/src/main/java/org/apache/druid/sql/calcite/rel/DruidQuery.java#L1205. 
   
   Your suggestion works great. It is unfortunate that the planner reaches a scan query (may be due to the exploratory nature) where it should have been contained to an outer sort and an inner group by query. The difference between the two approaches are ignoring a faulty plan vs correcting a faulty plan (as the faulty plan uses the alias name instead of __time). I am not that familiar with calcite, can we guarantee that the faulty plan if corrected will never generate a plan with a better cost ? 


-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org