You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2020/05/18 22:23:54 UTC

[GitHub] [incubator-pinot] npawar commented on a change in pull request #5399: DATE_TIME should work as the primary time column for Pinot tables

npawar commented on a change in pull request #5399:
URL: https://github.com/apache/incubator-pinot/pull/5399#discussion_r426924704



##########
File path: pinot-core/src/main/java/org/apache/pinot/core/segment/creator/impl/SegmentColumnarIndexCreator.java
##########
@@ -362,12 +362,14 @@ private void writeMetadata()
     properties.setProperty(DIMENSIONS, config.getDimensions());
     properties.setProperty(METRICS, config.getMetrics());
     properties.setProperty(DATETIME_COLUMNS, config.getDateTimeColumnNames());
-    properties.setProperty(TIME_COLUMN_NAME, config.getTimeColumnName());
+    String timeColumnName = config.getTimeColumnName();
+    if (timeColumnName != null && !config.getSchema().getDateTimeNames().contains(timeColumnName)) {

Review comment:
       Summarizing our offline discussion:
   The second part was to avoid setting the time column name in `segment.datetime.column.names` and also in `segment.time.column.name`, which will happen if the primary time column is **dateTimeFieldSpec**. This happens because `segment.time.column.name` is **serving as primary timeColumnName and also as timeFieldSpec.** This worked well so far, because primary time column and timeFieldSpec were one and the same. 
   But based on our chat, removing that check. As decided, the `segment.time.column.name` property will serve as the primary time column name. It will match with timecolumnName in tableConfig. It can be of type DATE_TIME or TIME.




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org