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


##########
processing/src/main/java/org/apache/druid/segment/incremental/IncrementalIndex.java:
##########
@@ -334,6 +349,17 @@ protected IncrementalIndex(
     if (!spatialDimensions.isEmpty()) {
       this.rowTransformers.add(new 
SpatialDimensionRowTransformer(spatialDimensions));
     }
+
+    // Set metadata last, so dimensionOrder is populated
+    final List<String> dimensionOrder = getDimensionOrder();
+    this.metadata = new Metadata(
+        null,
+        getCombiningAggregators(metrics),
+        incrementalIndexSchema.getTimestampSpec(),
+        this.gran,
+        this.rollup,
+        
ColumnHolder.TIME_COLUMN_NAME.equals(Iterables.getFirst(dimensionOrder, null)) 
? null : dimensionOrder

Review Comment:
   Hmm I don't totally remember why this is conditional. It doesn't really make 
sense to be conditional IMO. I updated it to always write out.



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