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 2019/05/27 00:22:05 UTC

[GitHub] [incubator-druid] gianm opened a new issue #7768: SQL: Cannot project after select + sort

gianm opened a new issue #7768: SQL: Cannot project after select + sort
URL: https://github.com/apache/incubator-druid/issues/7768
 
 
   ### Affected Version
   
   0.14.2
   
   ### Description
   
   This query cannot be planned, because it involves a Project after a Sort without an Aggregate (a query shape that is not supported):
   
   ```sql
   SELECT 'beep ' || dim1 FROM (SELECT dim1 FROM druid.foo ORDER BY __time DESC)
   ```
   
   The error is like:
   
   ```
   Root: rel#35:Subset#5.DRUID.[]
   Original rel:
   LogicalProject(subset=[rel#35:Subset#5.DRUID.[]], EXPR$0=[||('beep ', $0)]): rowcount = 100.0, cumulative cost = {100.0 rows, 100.0 cpu, 0.0 io}, id = 33
     LogicalProject(subset=[rel#32:Subset#4.NONE.[]], dim1=[$0]): rowcount = 100.0, cumulative cost = {100.0 rows, 100.0 cpu, 0.0 io}, id = 31
       LogicalSort(subset=[rel#30:Subset#3.NONE.[1 DESC]], sort0=[$1], dir0=[DESC]): rowcount = 100.0, cumulative cost = {100.0 rows, 3684.1361487904733 cpu, 0.0 io}, id = 29
         LogicalProject(subset=[rel#28:Subset#2.NONE.[]], dim1=[$1], __time=[$0]): rowcount = 100.0, cumulative cost = {100.0 rows, 200.0 cpu, 0.0 io}, id = 27
           LogicalProject(subset=[rel#26:Subset#1.NONE.[]], __time=[$0], dim1=[$2]): rowcount = 100.0, cumulative cost = {100.0 rows, 200.0 cpu, 0.0 io}, id = 25
             LogicalTableScan(subset=[rel#24:Subset#0.NONE.[]], table=[[druid, foo]]): rowcount = 100.0, cumulative cost = {100.0 rows, 101.0 cpu, 0.0 io}, id = 5
   ```

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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