Skip to content

Commit 79d3043

Browse files
krvikashfindepi
authored andcommitted
Include fieldId and physicalName to calculate retained size in bytes
1 parent 34a8f1b commit 79d3043

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/DeltaLakeColumnHandle.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525

2626
import static io.airlift.slice.SizeOf.estimatedSizeOf;
2727
import static io.airlift.slice.SizeOf.instanceSize;
28+
import static io.airlift.slice.SizeOf.sizeOf;
2829
import static io.trino.plugin.deltalake.DeltaHiveTypeTranslator.toHiveType;
2930
import static io.trino.plugin.deltalake.DeltaLakeColumnType.SYNTHESIZED;
3031
import static io.trino.spi.type.BigintType.BIGINT;
@@ -142,7 +143,10 @@ public boolean equals(Object obj)
142143
public long getRetainedSizeInBytes()
143144
{
144145
// type is not accounted for as the instances are cached (by TypeRegistry) and shared
145-
return INSTANCE_SIZE + estimatedSizeOf(name);
146+
return INSTANCE_SIZE
147+
+ estimatedSizeOf(name)
148+
+ sizeOf(fieldId)
149+
+ estimatedSizeOf(physicalName);
146150
}
147151

148152
@Override

0 commit comments

Comments
 (0)