Jesus Camacho Rodriguez created CALCITE-1580:
------------------------------------------------

             Summary: Druid adapter: Wrong semantics for ordering within 
groupBy queries
                 Key: CALCITE-1580
                 URL: https://issues.apache.org/jira/browse/CALCITE-1580
             Project: Calcite
          Issue Type: Bug
          Components: druid
    Affects Versions: 1.11.0
            Reporter: Jesus Camacho Rodriguez
            Assignee: Jesus Camacho Rodriguez
            Priority: Critical


The scope of the ordering seems to be for _each different granularity value_ 
instead of _global_. 

It can be reproduce with the following kind of query, where there exist 
multiple values for {{floor_day(`__time`)}}:
{code:sql}
SELECT i_brand_id, floor_day(`__time`), max(ss_quantity), 
sum(ss_wholesale_cost) as s
FROM store_sales_sold_time_subset
GROUP BY i_brand_id, floor_day(`__time`)
ORDER BY i_brand_id
LIMIT 10;
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to