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 2021/11/03 00:48:38 UTC

[GitHub] [pinot] Jackie-Jiang commented on a change in pull request #7645: to handle datetime column consistently

Jackie-Jiang commented on a change in pull request #7645:
URL: https://github.com/apache/pinot/pull/7645#discussion_r741554747



##########
File path: pinot-segment-spi/src/main/java/org/apache/pinot/segment/spi/creator/SegmentGeneratorConfig.java
##########
@@ -286,6 +288,14 @@ public void setCustomProperties(Map<String, String> properties) {
     _customProperties.putAll(properties);
   }
 
+  private void setDateTimeFormatSpec(DateTimeFormatSpec formatSpec) {
+    _dateTimeFormatSpec = formatSpec;

Review comment:
       We should also set `_timeColumnType` and `_segmentTimeUnit` accordingly

##########
File path: pinot-segment-spi/src/main/java/org/apache/pinot/segment/spi/creator/SegmentGeneratorConfig.java
##########
@@ -286,6 +288,14 @@ public void setCustomProperties(Map<String, String> properties) {
     _customProperties.putAll(properties);
   }
 
+  private void setDateTimeFormatSpec(DateTimeFormatSpec formatSpec) {

Review comment:
       Let's make this api public to replace the current `setSimpleDateFormat()`. To keep consistent behavior, we should not allow setting just the SDF

##########
File path: pinot-segment-spi/src/main/java/org/apache/pinot/segment/spi/creator/SegmentGeneratorConfig.java
##########
@@ -286,6 +288,14 @@ public void setCustomProperties(Map<String, String> properties) {
     _customProperties.putAll(properties);
   }
 
+  private void setDateTimeFormatSpec(DateTimeFormatSpec formatSpec) {
+    _dateTimeFormatSpec = formatSpec;
+  }
+
+  public DateTimeFormatSpec getDateTimeFormatSpec() {
+    return _dateTimeFormatSpec;
+  }
+
   public void setSimpleDateFormat(String simpleDateFormat) {

Review comment:
       Let's remove the setter and getter for SDF to ensure the correct behavior




-- 
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: commits-unsubscribe@pinot.apache.org

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