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 2022/03/24 20:40:57 UTC

[GitHub] [pinot] weixiangsun commented on a change in pull request #8403: Raw data can include the data out of gapfill boundary.

weixiangsun commented on a change in pull request #8403:
URL: https://github.com/apache/pinot/pull/8403#discussion_r834709456



##########
File path: pinot-core/src/main/java/org/apache/pinot/core/query/reduce/GapfillProcessor.java
##########
@@ -466,11 +466,30 @@ private Object getFillValue(int columnIndex, String columnName, Object key, Colu
     for (Object[] row : rows) {
       long timeBucket = _dateTimeFormatter.fromFormatToMillis(String.valueOf(row[_timeBucketColumnIndex]));
       int index = findGapfillBucketIndex(timeBucket);
-      if (bucketedItems[index] == null) {
-        bucketedItems[index] = new ArrayList<>();
+      if (index >= _numOfTimeBuckets) {
+        // the data will not be used for gapfill, skip it
+        continue;
+      }
+      Key key = constructGroupKeys(row);
+      _groupByKeys.add(key);
+      if (index < 0) {
+        // the data can potentially be used for previous value
+        if (_previousByGroupKey.containsKey(key)) {

Review comment:
       Fixed.




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