}
@Test(expectedExceptions = PrestoException.class, expectedExceptionsMessageRegExp = "Task exceeded max memory size of 3MB")
public void testHashBuilderResizeLimit()
{
BlockBuilder builder = VARCHAR.createBlockBuilder(new BlockBuilderStatus());
builder.appendSlice(Slices.allocate(5_000_000)); // this must be larger than DEFAULT_MAX_BLOCK_SIZE, 64K
builder.build();
List<Page> input = rowPagesBuilder(VARCHAR)
.addSequencePage(10, 100)
.addBlocksPage(builder.build())
.addSequencePage(10, 100)
.build();
ConnectorSession session = new ConnectorSession("user", "source", "catalog", "schema", UTC_KEY, Locale.ENGLISH, "address", "agent");
DriverContext driverContext = new TaskContext(new TaskId("query", "stage", "task"), executor, session, new DataSize(3, Unit.MEGABYTE))