mcvsubbu commented on a change in pull request #5347:
URL: https://github.com/apache/incubator-pinot/pull/5347#discussion_r421670983



##########
File path: 
pinot-core/src/main/java/org/apache/pinot/core/minion/rollup/MergeRollupSegmentConverter.java
##########
@@ -111,9 +112,10 @@ private MergeRollupSegmentConverter(@Nonnull List<File> 
inputIndexDirs, @Nonnull
     for (DateTimeFieldSpec dateTimeFieldSpec : schema.getDateTimeFieldSpecs()) 
{
       groupByColumns.add(dateTimeFieldSpec.getName());
     }
-    String timeColumn = schema.getTimeColumnName();
-    if (timeColumn != null) {
-      groupByColumns.add(timeColumn);
+    // TODO: once time column starts showing up as dateTimeFieldSpec 
(https://github.com/apache/incubator-pinot/issues/2756) below lines becomes 
redundant

Review comment:
       Isnt it safer to keep the API to get time column name, but deprecate it. 
Do this change when the you actually include the datetimefieldspecs to return 
the time col as well. 
   
   Otherwise it may pose a danger that the time column appears twice in the 
groupByColumns List.
   
   Or, turn it into a set, and we are safe.
   

##########
File path: 
pinot-core/src/main/java/org/apache/pinot/core/segment/index/loader/columnminmaxvalue/ColumnMinMaxValueGenerator.java
##########
@@ -56,32 +58,16 @@ public void addColumnMinMaxValue()
     Preconditions.checkState(_columnMinMaxValueGeneratorMode != 
ColumnMinMaxValueGeneratorMode.NONE);
 
     Schema schema = _segmentMetadata.getSchema();
+    Set<String> columnsToAddMinMaxValue = new 
HashSet<>(schema.getPhysicalColumnNames());
 
-    // Process time column
-    String timeColumnName = schema.getTimeColumnName();
-    if (timeColumnName != null) {
-      addColumnMinMaxValueForColumn(timeColumnName);
+    switch (_columnMinMaxValueGeneratorMode) {
+      case TIME:
+        columnsToAddMinMaxValue.removeAll(schema.getDimensionNames());

Review comment:
       can u add a comment here that we intentionally fall through to next? 
thanks




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

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