gianm commented on code in PR #16849:
URL: https://github.com/apache/druid/pull/16849#discussion_r1708084545


##########
processing/src/main/java/org/apache/druid/segment/StorageAdapter.java:
##########
@@ -129,6 +141,18 @@ default RowSignature getRowSignature()
   @Nullable
   Metadata getMetadata();
 
+  /**
+   * Returns column names that this adapter's data is sorted by. Cursors 
returned by this adapter return rows in
+   * this ordering, using the natural comparator for the type of the column as 
returned by
+   * {@link #getColumnCapabilities(String)}. Includes {@link 
ColumnHolder#TIME_COLUMN_NAME} if appropriate.
+   */
+  List<String> getSortOrder();
+
+  default boolean isTimeOrdered()
+  {
+    return 
ColumnHolder.TIME_COLUMN_NAME.equals(Iterables.getFirst(getSortOrder(), null));
+  }

Review Comment:
   This sounds like a good idea, although in the interests of minimizing 
conflicts, it'd probably be good to do this after #16533 is merged (since it 
moves `OrderBy` around).



##########
processing/src/main/java/org/apache/druid/segment/Metadata.java:
##########
@@ -100,6 +112,14 @@ public Boolean isRollup()
     return rollup;
   }
 
+  @Nullable
+  @JsonProperty
+  @JsonInclude(JsonInclude.Include.NON_NULL)
+  public List<String> getSortOrder()
+  {
+    return sortOrder;
+  }
+

Review Comment:
   see https://github.com/apache/druid/pull/16849#discussion_r1708084545



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