Implement aggregate on windows. - #23
Draft
Wosin wants to merge 5 commits into
Draft
Conversation
ariskk
reviewed
Feb 21, 2023
| it("should apply aggregation based on Monoid") { | ||
| val env = FlinkExecutor.newEnv(parallelism = 1) | ||
| val stream = env.fromCollection((1 to 200).toList.map(_ => 1)) | ||
| implicit val semigroup = new Monoid[Int] { |
ariskk
reviewed
Feb 21, 2023
| typeInformation: TypeInformation[O]): DataStream[O] = { | ||
| val reducer = new AggregateFunction[T, A, O] { | ||
|
|
||
| override def createAccumulator(): A = Monoid.empty[A] |
Owner
There was a problem hiding this comment.
Though this sounds like a good idea, I have never used a Monoid in practice because Monoid.empty[A] lacks the context of a key (that's needed to do anything meaningly aggregation at scale).
If you find it useful though, happy to have it.
Contributor
Author
There was a problem hiding this comment.
Gonna remove that as it seems it doesn't make that much sense.
Owner
|
|
Wosin
marked this pull request as draft
February 23, 2023 23:20
Contributor
Author
|
Converting to Draft as I need to think a little bout how to model that best. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Attempt to implement
aggregateon windows usingMonoidfor some simplicity.I'm not too convinced about using the
Monoidthere so I'm happy to discuss that.