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

Flat hash aggregation #207

Merged
merged 20 commits into from Dec 19, 2012
Merged

Flat hash aggregation #207

merged 20 commits into from Dec 19, 2012

Conversation

dain
Copy link
Contributor

@dain dain commented Dec 19, 2012

No description provided.

return binder.bind(inputs);
if (inputs.isEmpty()) {
return aggregation(function, -1);
} else {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

formatting

slice.setByte(index, slice.getByte(index) | bitMask);
}

public void setNotNull(Slice slice, int offset, int field)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's a bit weird that a field can be marked as null/notnull independently from setting its value. Calling setLong/Double/etc should make the field non-null. Clearly, doing this on every call to those methods would impact performance, so I don't know if there's a better approach.

}

return PageIterators.singletonIterator(new Page(blocks));
}

@SuppressWarnings("rawtypes")
public static Aggregator createAggregator(AggregationFunctionDefinition functionDefinition, Step step)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mark this @VisibleForTesting and maybe make it package private

@martint
Copy link
Contributor

martint commented Dec 19, 2012

looks good

@dain dain merged commit 7b9d9bc into prestodb:master Dec 19, 2012
@martint martint deleted the flat-hash-agg branch December 19, 2012 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants