You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ji...@apache.org on 2024/07/11 03:23:28 UTC

(iotdb) branch 1.3.1-queryDebug updated: spotless

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

jiangtian pushed a commit to branch 1.3.1-queryDebug
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/1.3.1-queryDebug by this push:
     new 006af644341 spotless
006af644341 is described below

commit 006af6443417d7914750bb267b95b4b5ffd951e4
Author: Tian Jiang <jt...@163.com>
AuthorDate: Thu Jul 11 11:23:19 2024 +0800

    spotless
---
 .../schemaregion/utils/ResourceByPathUtils.java    | 12 +++--
 .../db/utils/datastructure/AlignedTVList.java      | 57 +++++++++++-----------
 2 files changed, 38 insertions(+), 31 deletions(-)

diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/utils/ResourceByPathUtils.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/utils/ResourceByPathUtils.java
index 5ed91fdd0c1..abbba5b0515 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/utils/ResourceByPathUtils.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/utils/ResourceByPathUtils.java
@@ -51,6 +51,7 @@ import org.apache.iotdb.tsfile.utils.Pair;
 import org.apache.iotdb.tsfile.write.schema.IMeasurementSchema;
 import org.apache.iotdb.tsfile.write.schema.VectorMeasurementSchema;
 import org.apache.iotdb.tsfile.write.writer.RestorableTsFileIOWriter;
+
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -71,7 +72,6 @@ public abstract class ResourceByPathUtils {
 
   public static final Logger DEBUG_LOGGER = LoggerFactory.getLogger("QUERY_DEBUG");
 
-
   public static ResourceByPathUtils getResourceInstance(PartialPath path) {
     if (path instanceof AlignedPath) {
       return new AlignedResourceByPathUtils(path);
@@ -219,12 +219,18 @@ class AlignedResourceByPathUtils extends ResourceByPathUtils {
       return null;
     }
     if (context.isDebug()) {
-      DEBUG_LOGGER.info("TVList before sorting for Memtbale {} is {}", memTable.getMemTableId(), alignedMemChunk.getTVList());
+      DEBUG_LOGGER.info(
+          "TVList before sorting for Memtbale {} is {}",
+          memTable.getMemTableId(),
+          alignedMemChunk.getTVList());
     }
     // get sorted tv list is synchronized so different query can get right sorted list reference
     TVList alignedTvListCopy = alignedMemChunk.getSortedTvListForQuery(partialPath.getSchemaList());
     if (context.isDebug()) {
-      DEBUG_LOGGER.info("TVList after sorting for Memtbale {} is {}", memTable.getMemTableId(), alignedMemChunk.getTVList());
+      DEBUG_LOGGER.info(
+          "TVList after sorting for Memtbale {} is {}",
+          memTable.getMemTableId(),
+          alignedMemChunk.getTVList());
     }
     List<List<TimeRange>> deletionList = null;
     if (modsToMemtable != null) {
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/datastructure/AlignedTVList.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/datastructure/AlignedTVList.java
index 48d9bde285f..d8cb6e18882 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/datastructure/AlignedTVList.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/datastructure/AlignedTVList.java
@@ -19,7 +19,6 @@
 
 package org.apache.iotdb.db.utils.datastructure;
 
-import java.util.Arrays;
 import org.apache.iotdb.db.storageengine.dataregion.wal.buffer.IWALByteBufferView;
 import org.apache.iotdb.db.storageengine.dataregion.wal.utils.WALWriteUtils;
 import org.apache.iotdb.db.storageengine.rescon.memory.PrimitiveArrayManager;
@@ -41,6 +40,7 @@ import org.apache.iotdb.tsfile.utils.TsPrimitiveType;
 import java.io.DataInputStream;
 import java.io.IOException;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.List;
 import java.util.Objects;
 
@@ -286,7 +286,7 @@ public abstract class AlignedTVList extends TVList {
               && encodingList != null
               && !Float.isNaN(valueF)
               && (encodingList.get(columnIndex) == TSEncoding.RLE
-              || encodingList.get(columnIndex) == TSEncoding.TS_2DIFF)) {
+                  || encodingList.get(columnIndex) == TSEncoding.TS_2DIFF)) {
             valueF = MathUtils.roundWithGivenPrecision(valueF, floatPrecision);
           }
           vector[columnIndex] = TsPrimitiveType.getByType(TSDataType.FLOAT, valueF);
@@ -305,7 +305,7 @@ public abstract class AlignedTVList extends TVList {
               && encodingList != null
               && !Double.isNaN(valueD)
               && (encodingList.get(columnIndex) == TSEncoding.RLE
-              || encodingList.get(columnIndex) == TSEncoding.TS_2DIFF)) {
+                  || encodingList.get(columnIndex) == TSEncoding.TS_2DIFF)) {
             valueD = MathUtils.roundWithGivenPrecision(valueD, floatPrecision);
           }
           vector[columnIndex] = TsPrimitiveType.getByType(TSDataType.DOUBLE, valueD);
@@ -385,7 +385,7 @@ public abstract class AlignedTVList extends TVList {
   /**
    * Get the int value at the given position in AlignedTvList.
    *
-   * @param rowIndex    value index inside this column
+   * @param rowIndex value index inside this column
    * @param columnIndex index of the column
    * @return the value at this position in VectorTvList
    */
@@ -399,7 +399,7 @@ public abstract class AlignedTVList extends TVList {
   /**
    * Get the long value at the given position in VectorTvList.
    *
-   * @param rowIndex    value index inside this column
+   * @param rowIndex value index inside this column
    * @param columnIndex index of the column
    * @return the value at this position in VectorTvList
    */
@@ -413,7 +413,7 @@ public abstract class AlignedTVList extends TVList {
   /**
    * Get the float value at the given position in VectorTvList.
    *
-   * @param rowIndex    value index inside this column
+   * @param rowIndex value index inside this column
    * @param columnIndex index of the column
    * @return the value at this position in VectorTvList
    */
@@ -427,7 +427,7 @@ public abstract class AlignedTVList extends TVList {
   /**
    * Get the double value at the given position in VectorTvList.
    *
-   * @param rowIndex    value index inside this column
+   * @param rowIndex value index inside this column
    * @param columnIndex index of the column
    * @return the value at this position in VectorTvList
    */
@@ -441,7 +441,7 @@ public abstract class AlignedTVList extends TVList {
   /**
    * Get the Binary value at the given position in VectorTvList.
    *
-   * @param rowIndex    value index inside this column
+   * @param rowIndex value index inside this column
    * @param columnIndex index of the column
    * @return the value at this position in VectorTvList
    */
@@ -455,7 +455,7 @@ public abstract class AlignedTVList extends TVList {
   /**
    * Get the boolean value at the given position in VectorTvList.
    *
-   * @param rowIndex    value index inside this column
+   * @param rowIndex value index inside this column
    * @param columnIndex index of the column
    * @return the value at this position in VectorTvList
    */
@@ -469,7 +469,7 @@ public abstract class AlignedTVList extends TVList {
   /**
    * Get whether value is null at the given position in AlignedTvList.
    *
-   * @param rowIndex    value index inside this column
+   * @param rowIndex value index inside this column
    * @param columnIndex index of the column
    * @return boolean
    */
@@ -511,8 +511,8 @@ public abstract class AlignedTVList extends TVList {
   /**
    * Delete points in a specific column.
    *
-   * @param lowerBound  deletion lower bound
-   * @param upperBound  deletion upper bound
+   * @param lowerBound deletion lower bound
+   * @param upperBound deletion upper bound
    * @param columnIndex column index to be deleted
    * @return Delete info pair. Left: deletedNumber int; right: ifDeleteColumn boolean
    */
@@ -668,10 +668,10 @@ public abstract class AlignedTVList extends TVList {
    * list.
    *
    * @param timeDuplicatedOriginRowIndexList The row index list that the time of all indexes are
-   *                                         same.
-   * @param columnIndex                      The index of a given column.
+   *     same.
+   * @param columnIndex The index of a given column.
    * @return The original row index of the latest non-null value, or the first row index if all
-   * values in given columns are null.
+   *     values in given columns are null.
    */
   public int getValidRowIndexForTimeDuplicatedRows(
       List<Integer> timeDuplicatedOriginRowIndexList, int columnIndex) {
@@ -905,9 +905,7 @@ public abstract class AlignedTVList extends TVList {
     return size;
   }
 
-  /**
-   * Build TsBlock by column.
-   */
+  /** Build TsBlock by column. */
   public TsBlock buildTsBlock(
       int floatPrecision, List<TSEncoding> encodingList, List<List<TimeRange>> deletionList) {
     TsBlockBuilder builder = new TsBlockBuilder(dataTypes);
@@ -979,9 +977,9 @@ public abstract class AlignedTVList extends TVList {
         }
         if (isNullValue(originRowIndex, columnIndex)
             || isPointDeleted(
-            getTime(sortedRowIndex),
-            Objects.isNull(deletionList) ? null : deletionList.get(columnIndex),
-            deleteCursor)) {
+                getTime(sortedRowIndex),
+                Objects.isNull(deletionList) ? null : deletionList.get(columnIndex),
+                deleteCursor)) {
           valueBuilder.appendNull();
           continue;
         }
@@ -1333,14 +1331,17 @@ public abstract class AlignedTVList extends TVList {
     return builder.toString();
   }
 
-
   @Override
   public String toString() {
-    return "AlignedTVList{" +
-        "values=" + printValues() +
-        ", indices=" + printIndices() +
-        ", timestamps=" + printTimestamps() +
-        ", rowCount=" + rowCount +
-        '}';
+    return "AlignedTVList{"
+        + "values="
+        + printValues()
+        + ", indices="
+        + printIndices()
+        + ", timestamps="
+        + printTimestamps()
+        + ", rowCount="
+        + rowCount
+        + '}';
   }
 }