Skip to content

Commit 3457e8f

Browse files
committed
mvn spotless apply.
1 parent db89602 commit 3457e8f

File tree

4 files changed

+23
-12
lines changed

4 files changed

+23
-12
lines changed

iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/GroupedTopNRowNumberBuilder.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,8 @@ protected TsBlock computeNext() {
145145
return endOfData();
146146
}
147147
return tsBlockBuilder.build(
148-
new RunLengthEncodedColumn(TIME_COLUMN_TEMPLATE, tsBlockBuilder.getPositionCount()));
148+
new RunLengthEncodedColumn(
149+
TIME_COLUMN_TEMPLATE, tsBlockBuilder.getPositionCount()));
149150
}
150151
currentGroupId++;
151152
currentGroupSize = groupedTopNRowNumberAccumulator.drainTo(currentGroupId, rowIdOutput);

iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/RowReferenceTsBlockManager.java

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ public LoadCursor add(TsBlock tsBlock, int startingPosition) {
5757
"invalid startingPosition: %s",
5858
startingPosition);
5959

60-
TsBlockAccounting tsBlockAccounting = tsBlocks.allocateId(id -> new TsBlockAccounting(id, tsBlock));
60+
TsBlockAccounting tsBlockAccounting =
61+
tsBlocks.allocateId(id -> new TsBlockAccounting(id, tsBlock));
6162

6263
tsBlockAccounting.lockTsBlock();
6364
currentCursor =
@@ -231,8 +232,8 @@ public long referencePosition(int position) {
231232
}
232233

233234
/**
234-
* Locks the current TsBlock so that it can't be compacted (thus allowing for stable position-based
235-
* access).
235+
* Locks the current TsBlock so that it can't be compacted (thus allowing for stable
236+
* position-based access).
236237
*/
237238
public void lockTsBlock() {
238239
lockedTsBlock = true;
@@ -307,14 +308,19 @@ public void compact() {
307308
}
308309

309310
public long sizeOf() {
310-
// Getting the size of a TsBlock forces a lazy TsBlock to be loaded, so only provide the size after
311+
// Getting the size of a TsBlock forces a lazy TsBlock to be loaded, so only provide the size
312+
// after
311313
// an explicit decision to load
312314
long loadedTsBlockSize = isTsBlockLoaded ? tsBlock.getSizeInBytes() : 0;
313-
return TSBLOCK_ACCOUNTING_INSTANCE_SIZE + loadedTsBlockSize + RamUsageEstimator.sizeOf(rowIds);
315+
return TSBLOCK_ACCOUNTING_INSTANCE_SIZE
316+
+ loadedTsBlockSize
317+
+ RamUsageEstimator.sizeOf(rowIds);
314318
}
315319
}
316320

317-
/** Buffer abstracting a mapping between row IDs and their associated TsBlock IDs and positions. */
321+
/**
322+
* Buffer abstracting a mapping between row IDs and their associated TsBlock IDs and positions.
323+
*/
318324
private static class RowIdBuffer {
319325
public static final long UNKNOWN_ID = -1;
320326
private static final long INSTANCE_SIZE =

iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/window/TopKRankingOperator.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,9 @@ public long calculateRetainedSizeAfterCallingNext() {
269269

270270
@Override
271271
public long ramBytesUsed() {
272-
return INSTANCE_SIZE + MemoryEstimationHelper.getEstimatedSizeOfAccountableObject(inputOperator) + MemoryEstimationHelper.getEstimatedSizeOfAccountableObject(operatorContext) + (groupedTopNBuilder != null ? groupedTopNBuilder.getEstimatedSizeInBytes() : 0);
272+
return INSTANCE_SIZE
273+
+ MemoryEstimationHelper.getEstimatedSizeOfAccountableObject(inputOperator)
274+
+ MemoryEstimationHelper.getEstimatedSizeOfAccountableObject(operatorContext)
275+
+ (groupedTopNBuilder != null ? groupedTopNBuilder.getEstimatedSizeInBytes() : 0);
273276
}
274277
}

iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/RemoveRedundantWindow.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,14 @@
1919

2020
package org.apache.iotdb.db.queryengine.plan.relational.planner.iterative.rule;
2121

22-
import com.google.common.collect.ImmutableList;
2322
import org.apache.iotdb.db.queryengine.plan.relational.planner.iterative.Rule;
2423
import org.apache.iotdb.db.queryengine.plan.relational.planner.node.ValuesNode;
2524
import org.apache.iotdb.db.queryengine.plan.relational.planner.node.WindowNode;
2625
import org.apache.iotdb.db.queryengine.plan.relational.utils.matching.Captures;
2726
import org.apache.iotdb.db.queryengine.plan.relational.utils.matching.Pattern;
2827

28+
import com.google.common.collect.ImmutableList;
29+
2930
import static org.apache.iotdb.db.queryengine.plan.relational.planner.node.Patterns.window;
3031
import static org.apache.iotdb.db.queryengine.plan.relational.planner.optimizations.QueryCardinalityUtil.isEmpty;
3132

@@ -40,9 +41,9 @@ public Pattern<WindowNode> getPattern() {
4041
@Override
4142
public Result apply(WindowNode window, Captures captures, Context context) {
4243
if (isEmpty(window.getChild(), context.getLookup())) {
43-
return Result.ofPlanNode(new ValuesNode(window.getPlanNodeId(),
44-
window.getOutputSymbols(), ImmutableList.of()));
45-
}
44+
return Result.ofPlanNode(
45+
new ValuesNode(window.getPlanNodeId(), window.getOutputSymbols(), ImmutableList.of()));
46+
}
4647
return Result.empty();
4748
}
4849
}

0 commit comments

Comments
 (0)