Skip to content

Commit

Permalink
Add getRetainedSizeInBytes to faker split
Browse files Browse the repository at this point in the history
  • Loading branch information
losipiuk committed Feb 3, 2025
1 parent 6f42e35 commit b35a1ba
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,23 @@
import io.trino.spi.connector.ConnectorSplit;

import static com.google.common.base.Preconditions.checkArgument;
import static io.airlift.slice.SizeOf.instanceSize;

public record FakerSplit(long splitNumber, long rowsOffset, long rowsCount)
implements ConnectorSplit
{
private static final int INSTANCE_SIZE = instanceSize(FakerSplit.class);

public FakerSplit
{
checkArgument(splitNumber >= 0, "splitNumber is negative");
checkArgument(rowsOffset >= 0, "rowsOffset is negative");
checkArgument(rowsCount >= 0, "rowsCount is negative");
}

@Override
public long getRetainedSizeInBytes()
{
return INSTANCE_SIZE;
}
}

0 comments on commit b35a1ba

Please sign in to comment.