Skip to content

Commit b3fcb77

Browse files
committed
Add getRetainedSizeInBytes to faker split
1 parent 1fb4f44 commit b3fcb77

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

plugin/trino-faker/src/main/java/io/trino/plugin/faker/FakerSplit.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,23 @@
1616
import io.trino.spi.connector.ConnectorSplit;
1717

1818
import static com.google.common.base.Preconditions.checkArgument;
19+
import static io.airlift.slice.SizeOf.instanceSize;
1920

2021
public record FakerSplit(long splitNumber, long rowsOffset, long rowsCount)
2122
implements ConnectorSplit
2223
{
24+
private static final int INSTANCE_SIZE = instanceSize(FakerSplit.class);
25+
2326
public FakerSplit
2427
{
2528
checkArgument(splitNumber >= 0, "splitNumber is negative");
2629
checkArgument(rowsOffset >= 0, "rowsOffset is negative");
2730
checkArgument(rowsCount >= 0, "rowsCount is negative");
2831
}
32+
33+
@Override
34+
public long getRetainedSizeInBytes()
35+
{
36+
return INSTANCE_SIZE;
37+
}
2938
}

0 commit comments

Comments
 (0)