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

Fix bug in distinctCountRawHLL on SQL path #5494

Merged
merged 2 commits into from Jun 4, 2020

Conversation

siddharthteotia
Copy link
Contributor

@siddharthteotia siddharthteotia commented Jun 4, 2020

Description

DISTINCTCOUNTRAWHLL() aggregation function returns serialized HLL bytes as STRINGn for users to do some aggregation on their side. While the final return type of the function is STRING, the final return value (SerializedHll object) is never transformed in the broker reducer (for SQL path) to hex encoded string.

So the ResultTable has the column type as STRING but the data is object of type SerializedHll. We need to format the final return value to a serializable value on the SQL path just like we have done on PQL path.

Enhanced the tests.

NOTE: Ideally each query execution unit test under src/test/java/org/apache/pinot/queries should be enhanced to run its SQL counterpart. Right now there are multiple InterSegment files with potentially duplicate tests and not sure if all of them are indeed exercising the entire SQL execution path. Quite a bit of refactoring is needed which I will do.

This fix is needed soon for our next internal build to let folks continue SQL testing.

Upgrade Notes

Does this PR prevent a zero down-time upgrade? (Assume upgrade order: Controller, Broker, Server, Minion)
No
Does this PR fix a zero-downtime upgrade introduced earlier?
No

Does this PR otherwise need attention when creating release notes? Things to consider:
No

Release Notes

Documentation

None

@siddharthteotia siddharthteotia merged commit df18e0e into apache:master Jun 4, 2020
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