This is an automated email from the ASF dual-hosted git repository. lta pushed a commit to branch cluster in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git
commit 7ca00daa26f47e35b9765415942b4e409d5f9256 Author: lta <[email protected]> AuthorDate: Wed May 22 15:00:00 2019 +0800 fix some bug --- .../iotdb/cluster/query/common/ClusterNullableBatchData.java | 2 +- .../querynode/ClusterGroupBySelectSeriesBatchReaderEntity.java | 7 +++++-- .../query/reader/querynode/ClusterSelectSeriesBatchReader.java | 3 --- .../query/reader/querynode/IClusterSeriesBatchReaderEntity.java | 4 ++-- .../iotdb/cluster/query/utils/ClusterTimeValuePairUtils.java | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cluster/src/main/java/org/apache/iotdb/cluster/query/common/ClusterNullableBatchData.java b/cluster/src/main/java/org/apache/iotdb/cluster/query/common/ClusterNullableBatchData.java index 8315a04..699db3e 100644 --- a/cluster/src/main/java/org/apache/iotdb/cluster/query/common/ClusterNullableBatchData.java +++ b/cluster/src/main/java/org/apache/iotdb/cluster/query/common/ClusterNullableBatchData.java @@ -69,7 +69,7 @@ public class ClusterNullableBatchData extends BatchData { return timeValuePairList.size(); } - public TimeValuePair getTimeValuePair() { + public TimeValuePair getCurrentTimeValuePair() { return index < length() ? timeValuePairList.get(index) : null; } diff --git a/cluster/src/main/java/org/apache/iotdb/cluster/query/reader/querynode/ClusterGroupBySelectSeriesBatchReaderEntity.java b/cluster/src/main/java/org/apache/iotdb/cluster/query/reader/querynode/ClusterGroupBySelectSeriesBatchReaderEntity.java index 5c1d9d1..30ecf1b 100644 --- a/cluster/src/main/java/org/apache/iotdb/cluster/query/reader/querynode/ClusterGroupBySelectSeriesBatchReaderEntity.java +++ b/cluster/src/main/java/org/apache/iotdb/cluster/query/reader/querynode/ClusterGroupBySelectSeriesBatchReaderEntity.java @@ -26,13 +26,15 @@ import java.util.List; import org.apache.iotdb.cluster.query.common.ClusterNullableBatchData; import org.apache.iotdb.cluster.query.utils.ClusterTimeValuePairUtils; import org.apache.iotdb.db.query.dataset.groupby.GroupByWithOnlyTimeFilterDataSet; -import org.apache.iotdb.db.utils.TimeValuePair; import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; import org.apache.iotdb.tsfile.read.common.BatchData; import org.apache.iotdb.tsfile.read.common.Field; import org.apache.iotdb.tsfile.read.common.Path; import org.apache.iotdb.tsfile.read.common.RowRecord; +/** + * Batch reader entity for select paths in group by query with only time filter. + */ public class ClusterGroupBySelectSeriesBatchReaderEntity implements IClusterSeriesBatchReaderEntity { @@ -73,7 +75,8 @@ public class ClusterGroupBySelectSeriesBatchReaderEntity implements for (int j = 0; j < paths.size(); j++) { ClusterNullableBatchData batchData = (ClusterNullableBatchData) batchDataList.get(j); Object value = fieldList.get(j).getObjectValue(dataTypes.get(j)); - batchData.addTimeValuePair(fieldList.get(j).toString().equals("null") ? null : ClusterTimeValuePairUtils.getTimeValuePair(time, value,dataTypes.get(j))); + batchData.addTimeValuePair(fieldList.get(j).toString().equals("null") ? null + : ClusterTimeValuePairUtils.getTimeValuePair(time, value, dataTypes.get(j))); } } return batchDataList; diff --git a/cluster/src/main/java/org/apache/iotdb/cluster/query/reader/querynode/ClusterSelectSeriesBatchReader.java b/cluster/src/main/java/org/apache/iotdb/cluster/query/reader/querynode/ClusterSelectSeriesBatchReader.java index 28b6346..cbbad2e 100644 --- a/cluster/src/main/java/org/apache/iotdb/cluster/query/reader/querynode/ClusterSelectSeriesBatchReader.java +++ b/cluster/src/main/java/org/apache/iotdb/cluster/query/reader/querynode/ClusterSelectSeriesBatchReader.java @@ -51,9 +51,6 @@ public class ClusterSelectSeriesBatchReader extends this.reader = reader; } - public ClusterSelectSeriesBatchReader() { - } - @Override public boolean hasNext() throws IOException { return reader.hasNext(); diff --git a/cluster/src/main/java/org/apache/iotdb/cluster/query/reader/querynode/IClusterSeriesBatchReaderEntity.java b/cluster/src/main/java/org/apache/iotdb/cluster/query/reader/querynode/IClusterSeriesBatchReaderEntity.java index e6e9e86..80e72b6 100644 --- a/cluster/src/main/java/org/apache/iotdb/cluster/query/reader/querynode/IClusterSeriesBatchReaderEntity.java +++ b/cluster/src/main/java/org/apache/iotdb/cluster/query/reader/querynode/IClusterSeriesBatchReaderEntity.java @@ -23,14 +23,14 @@ import java.util.List; import org.apache.iotdb.tsfile.read.common.BatchData; /** - * Batch reader for filter series which is used in query node. + * Batch reader for series which is used in query node. */ public interface IClusterSeriesBatchReaderEntity { boolean hasNext() throws IOException; /** - * Get next batch data of all filter series. + * Get next batch data of all series. */ List<BatchData> nextBatchList() throws IOException; } diff --git a/cluster/src/main/java/org/apache/iotdb/cluster/query/utils/ClusterTimeValuePairUtils.java b/cluster/src/main/java/org/apache/iotdb/cluster/query/utils/ClusterTimeValuePairUtils.java index d9c8d75..3141f99 100644 --- a/cluster/src/main/java/org/apache/iotdb/cluster/query/utils/ClusterTimeValuePairUtils.java +++ b/cluster/src/main/java/org/apache/iotdb/cluster/query/utils/ClusterTimeValuePairUtils.java @@ -40,7 +40,7 @@ public class ClusterTimeValuePairUtils { */ public static TimeValuePair getCurrentTimeValuePair(BatchData data) { if (data instanceof ClusterNullableBatchData) { - return ((ClusterNullableBatchData) data).getTimeValuePair(); + return ((ClusterNullableBatchData) data).getCurrentTimeValuePair(); } else { return TimeValuePairUtils.getCurrentTimeValuePair(data); }
