}
@Test(expectedExceptions = PrestoException.class, expectedExceptionsMessageRegExp = "Task exceeded max memory size of 3MB")
public void testHashBuilderResizeLimit()
{
BlockBuilder builder = VARCHAR.createBlockBuilder(new BlockBuilderStatus());
VARCHAR.writeSlice(builder, 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();
DriverContext driverContext = new TaskContext(new TaskId("query", "stage", "task"), executor, TEST_SESSION, new DataSize(3, Unit.MEGABYTE))
.addPipelineContext(true, true)