Young-Leo commented on code in PR #16882:
URL: https://github.com/apache/iotdb/pull/16882#discussion_r2621898182
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/Fill.java:
##########
@@ -165,4 +168,24 @@ public boolean shallowEquals(Node other) {
&& Objects.equals(timeColumnIndex, fill.timeColumnIndex)
&& Objects.equals(fillGroupingElements, fill.fillGroupingElements);
}
+
+ @Override
+ public long ramBytesUsed() {
+ long size = INSTANCE_SIZE;
+ size +=
AstMemoryEstimationHelper.getEstimatedSizeOfNodeLocation(getLocationInternal());
+ if (fillValue != null) {
+ size +=
AstMemoryEstimationHelper.getEstimatedSizeOfAccountableObject(fillValue);
+ }
+ if (timeColumnIndex != null) {
+ size +=
AstMemoryEstimationHelper.getEstimatedSizeOfAccountableObject(timeColumnIndex);
+ }
+ if (fillGroupingElements != null) {
+ size +=
AstMemoryEstimationHelper.getEstimatedSizeOfNodeList(fillGroupingElements);
+ }
+ // TimeDuration is a simple object, estimate its size
+ if (timeBound != null) {
+ size += RamUsageEstimator.shallowSizeOfInstance(TimeDuration.class);
Review Comment:
TimeDuration is defined in the tsfile repository.
--
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]