Skip to content

Commit

Permalink
Pre-size projection BlockBuilder to the exact size needed
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasz-stec authored and raunaqmorarka committed Oct 1, 2022
1 parent f84509e commit ab83378
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public InputChannels getInputChannels()
@Override
public Work<Block> project(ConnectorSession session, DriverYieldSignal yieldSignal, Page page, SelectedPositions selectedPositions)
{
blockBuilder = blockBuilder.newBlockBuilderLike(null);
blockBuilder = blockBuilder.newBlockBuilderLike(selectedPositions.size(), null);
try {
return (Work<Block>) pageProjectionWorkFactory.invoke(blockBuilder, session, page, selectedPositions);
}
Expand Down

0 comments on commit ab83378

Please sign in to comment.