-
Notifications
You must be signed in to change notification settings - Fork 76
Optimize group by for single partition topics #836
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
base: main
Are you sure you want to change the base?
Conversation
85cf8af
to
87f2af7
Compare
Group by operations on topics with a single partition are now optimized to avoid creating a repartition topic. Instead, the messages are directly transformed to use the new key, as all messages go to the same partition.
87f2af7
to
5999c3a
Compare
groupby_sdf = self.__dataframe_clone__( | ||
stream=stream, stream_id=f"{self.stream_id}--groupby--{operation}" | ||
) | ||
self._registry.register_groupby( | ||
source_sdf=self, new_sdf=groupby_sdf, register_new_root=False | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure we even need .register_groupby()
here since the operation doesn't create a new topic.
We can treat it as a stateless operation, and keep the same stream_id
too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See the comments
Group by operations on topics with a single partition are now optimized to avoid creating a repartition topic. Instead, the messages are directly transformed to use the new key, as all messages go to the same partition.