jt2594838 commented on code in PR #16123:
URL: https://github.com/apache/iotdb/pull/16123#discussion_r2259671159
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/payload/evolvable/batch/PipeTabletEventPlainBatch.java:
##########
@@ -214,4 +220,86 @@ private long constructTabletBatch(final Tablet tablet,
final String databaseName
currentBatch.getRight().add(tablet);
return PipeMemoryWeightUtil.calculateTabletSizeInBytes(tablet) + 4;
}
+
+ private Tablet copyTablet(final Tablet tablet) {
+ final Object[] copiedValues = new Object[tablet.getValues().length];
+ for (int i = 0; i < tablet.getValues().length; i++) {
+ if (tablet.getValues()[i] == null
+ || tablet.getSchemas() == null
+ || tablet.getSchemas().get(i) == null) {
+ continue;
+ }
+ copiedValues[i] = copyValueList(tablet.getValues()[i],
tablet.getSchemas().get(i).getType());
Review Comment:
Better to pass `tablet.rowSize()` to `copyValueList`.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]