You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by ja...@apache.org on 2019/03/06 18:43:20 UTC

[incubator-pinot] branch fix_segment_generator_config updated: Address comments

This is an automated email from the ASF dual-hosted git repository.

jackie pushed a commit to branch fix_segment_generator_config
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git


The following commit(s) were added to refs/heads/fix_segment_generator_config by this push:
     new eec82ca  Address comments
eec82ca is described below

commit eec82ca4805e0eec96c43c22bfbd1987216e8b1e
Author: Jackie (Xiaotian) Jiang <xa...@linkedin.com>
AuthorDate: Wed Mar 6 10:42:41 2019 -0800

    Address comments
---
 .../pinot/core/indexsegment/generator/SegmentGeneratorConfig.java | 8 ++------
 .../pinot/core/realtime/converter/RealtimeSegmentConverter.java   | 4 ----
 .../core/indexsegment/generator/SegmentGeneratorConfigTest.java   | 1 +
 3 files changed, 3 insertions(+), 10 deletions(-)

diff --git a/pinot-core/src/main/java/org/apache/pinot/core/indexsegment/generator/SegmentGeneratorConfig.java b/pinot-core/src/main/java/org/apache/pinot/core/indexsegment/generator/SegmentGeneratorConfig.java
index b843f84..6a5020b 100644
--- a/pinot-core/src/main/java/org/apache/pinot/core/indexsegment/generator/SegmentGeneratorConfig.java
+++ b/pinot-core/src/main/java/org/apache/pinot/core/indexsegment/generator/SegmentGeneratorConfig.java
@@ -382,11 +382,7 @@ public class SegmentGeneratorConfig {
   }
 
   public String getTimeColumnName() {
-    if (_segmentTimeColumnName != null) {
-      return _segmentTimeColumnName;
-    }
-    // TODO: if segmentTimeColumnName is null, getQualifyingFields DATETIME. If multiple found, throw exception "must specify primary timeColumnName"
-    return getQualifyingFields(FieldType.TIME, true);
+    return _segmentTimeColumnName;
   }
 
   public void setTimeColumnName(String timeColumnName) {
@@ -461,7 +457,7 @@ public class SegmentGeneratorConfig {
     _schema = schema;
 
     // Set time related fields
-    // TODO: remove all time related fields and always extract from schema
+    // TODO: support datetime field as time column
     TimeFieldSpec timeFieldSpec = _schema.getTimeFieldSpec();
     if (timeFieldSpec != null) {
       TimeGranularitySpec timeGranularitySpec = timeFieldSpec.getOutgoingGranularitySpec();
diff --git a/pinot-core/src/main/java/org/apache/pinot/core/realtime/converter/RealtimeSegmentConverter.java b/pinot-core/src/main/java/org/apache/pinot/core/realtime/converter/RealtimeSegmentConverter.java
index 3f12fb0..40be8e7 100644
--- a/pinot-core/src/main/java/org/apache/pinot/core/realtime/converter/RealtimeSegmentConverter.java
+++ b/pinot-core/src/main/java/org/apache/pinot/core/realtime/converter/RealtimeSegmentConverter.java
@@ -114,10 +114,6 @@ public class RealtimeSegmentConverter {
       genConfig.enableStarTreeIndex(starTreeIndexSpec);
     }
 
-    // TODO: use timeColumnName field
-    genConfig.setTimeColumnName(dataSchema.getTimeFieldSpec().getOutgoingTimeColumnName());
-    // TODO: find timeColumnName in schema.getDateTimeFieldSpec, in order to get the timeUnit
-    genConfig.setSegmentTimeUnit(dataSchema.getTimeFieldSpec().getOutgoingGranularitySpec().getTimeType());
     if (segmentVersion != null) {
       genConfig.setSegmentVersion(segmentVersion);
     }
diff --git a/pinot-core/src/test/java/org/apache/pinot/core/indexsegment/generator/SegmentGeneratorConfigTest.java b/pinot-core/src/test/java/org/apache/pinot/core/indexsegment/generator/SegmentGeneratorConfigTest.java
index 3a52d0b..de14a9e 100644
--- a/pinot-core/src/test/java/org/apache/pinot/core/indexsegment/generator/SegmentGeneratorConfigTest.java
+++ b/pinot-core/src/test/java/org/apache/pinot/core/indexsegment/generator/SegmentGeneratorConfigTest.java
@@ -28,6 +28,7 @@ import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.assertNull;
 
 
+// TODO: add more tests here.
 public class SegmentGeneratorConfigTest {
 
   @Test


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