Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aggregation improvements #10965

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ private boolean tryRehash()

// An estimate of how much extra memory is needed before we can go ahead and expand the hash table.
// This includes the new capacity for values, groupIds, and valuesByGroupId as well as the size of the current page
preallocatedMemoryInBytes = (newCapacity - hashCapacity) * (long) (Long.BYTES + Integer.BYTES) + (calculateMaxFill(newCapacity) - maxFill) * Long.BYTES + currentPageSizeInBytes;
preallocatedMemoryInBytes = (newCapacity - hashCapacity) * (long) (Long.BYTES + Integer.BYTES) + (long) (calculateMaxFill(newCapacity) - maxFill) * Long.BYTES + currentPageSizeInBytes;
if (!updateMemory.update()) {
// reserved memory but has exceeded the limit
return false;
Expand Down Expand Up @@ -371,7 +371,8 @@ private int registerGroupId(Block dictionary, int positionInDictionary)
return groupId;
}

private class AddPageWork
@VisibleForTesting
class AddPageWork
implements Work<Void>
{
private final Block block;
Expand Down Expand Up @@ -412,7 +413,8 @@ public Void getResult()
}
}

private class AddDictionaryPageWork
@VisibleForTesting
class AddDictionaryPageWork
implements Work<Void>
{
private final Block dictionary;
Expand Down Expand Up @@ -456,7 +458,8 @@ public Void getResult()
}
}

private class AddRunLengthEncodedPageWork
@VisibleForTesting
class AddRunLengthEncodedPageWork
implements Work<Void>
{
private final RunLengthEncodedBlock block;
Expand Down Expand Up @@ -497,7 +500,8 @@ public Void getResult()
}
}

private class GetGroupIdsWork
@VisibleForTesting
class GetGroupIdsWork
implements Work<GroupByIdBlock>
{
private final BlockBuilder blockBuilder;
Expand Down Expand Up @@ -546,7 +550,8 @@ public GroupByIdBlock getResult()
}
}

private class GetDictionaryGroupIdsWork
@VisibleForTesting
class GetDictionaryGroupIdsWork
implements Work<GroupByIdBlock>
{
private final BlockBuilder blockBuilder;
Expand Down Expand Up @@ -600,7 +605,8 @@ public GroupByIdBlock getResult()
}
}

private class GetRunLengthEncodedGroupIdsWork
@VisibleForTesting
class GetRunLengthEncodedGroupIdsWork
implements Work<GroupByIdBlock>
{
private final RunLengthEncodedBlock block;
Expand Down
Loading