cecemei commented on code in PR #18262:
URL: https://github.com/apache/druid/pull/18262#discussion_r2220576922


##########
processing/src/main/java/org/apache/druid/data/input/impl/AggregateProjectionSpec.java:
##########
@@ -175,8 +174,8 @@ public String toString()
   private static ProjectionOrdering computeOrdering(VirtualColumns 
virtualColumns, List<DimensionSchema> groupingColumns)
   {
     if (groupingColumns.isEmpty()) {
-      // call it time ordered, there is no grouping columns so there is only 1 
row for this projection
-      return new ProjectionOrdering(Cursors.ascendingTimeOrder(), null);
+      // no ordering since there is only 1 row for this projection
+      return new ProjectionOrdering(List.of(), null);

Review Comment:
   ah do you mean that if a query is bucket at `DAY(__time)`, and segment is 
bucket at `HOUR(__time)`, then the `OrderBy` in projection doesn't matter since 
it'd be grouped anyway?
   
   I'm thinking that projection should inherit the granularity from segment, 
which it seems like it doesn't have that info right now? it should also work 
with `DESC __time` too if the query bucket is larger? 
   
   



-- 
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