suneet-s commented on code in PR #12185:
URL: https://github.com/apache/druid/pull/12185#discussion_r844140763


##########
core/src/main/java/org/apache/druid/data/input/InputRowSchema.java:
##########
@@ -31,15 +34,38 @@
   private final DimensionsSpec dimensionsSpec;
   private final ColumnsFilter columnsFilter;
 
+  /**
+   * List of metric names for further downstream processing by {@link 
InputSource}
+   */
+  @Nullable
+  private final List<String> metricNames;
+
   public InputRowSchema(
       final TimestampSpec timestampSpec,
       final DimensionsSpec dimensionsSpec,
       final ColumnsFilter columnsFilter
   )
+  {
+    this(timestampSpec, dimensionsSpec, columnsFilter, null);
+  }
+
+  public InputRowSchema(
+      final TimestampSpec timestampSpec,
+      final DimensionsSpec dimensionsSpec,
+      final ColumnsFilter columnsFilter,
+      @Nullable final List<String> metricNames
+  )
   {
     this.timestampSpec = timestampSpec;
     this.dimensionsSpec = dimensionsSpec;
     this.columnsFilter = columnsFilter;
+    this.metricNames = metricNames;
+  }
+
+  @Nullable

Review Comment:
   How should callers of this method think about the difference between a null 
list and an empty list?
   
   It looks like the code behaves the same right now whether or not the list is 
null or empty. Can we update this to be `@NotNull` and return an empty list if 
metricNames is null. This will make it easier for callers of this method as 
they do not have to add null checks.
   
   If null is meant to represent a different state, can we please add javadocs 
to explain that difference.



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