clintropolis commented on code in PR #19061:
URL: https://github.com/apache/druid/pull/19061#discussion_r2893171762


##########
processing/src/main/java/org/apache/druid/frame/key/ClusterBy.java:
##########
@@ -45,16 +48,27 @@
 public class ClusterBy
 {
   private final List<KeyColumn> columns;
+  private final Map<String, VirtualColumn> virtualColumnMap;
   private final int bucketByCount;
   private final boolean sortable;
 
+  public ClusterBy(
+      List<KeyColumn> keyColumns,
+      int bucketByCount
+  )
+  {
+    this(keyColumns, Map.of(), bucketByCount);
+  }
+
   @JsonCreator
   public ClusterBy(
       @JsonProperty("columns") List<KeyColumn> columns,
+      @JsonProperty("virtualColumnMap") @Nullable Map<String, VirtualColumn> 
virtualColumnMap,

Review Comment:
   I couldn't really find a clean way to get them to create shardspec or 
compaction state, while the clusterby is created from the query, so it seemed 
by far the easiest and least disruptive to just add additional information if 
those cluster keys were created from virtual columns by the query creating the 
object.
   
   Am i missing some clean way i could get the virtual columns at the time we 
are translating the clusterby into shardspec/compaction state?



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