-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: move aggregation to plan builder
This patch moves the code for building aggregations into a plan builder: To express windowed aggregates, I've added a new execution step type called StreamWindowedAggregate. Adding a new type ensures that when we implement the visitor that builds the streams app, the handler for windowed aggregations is type-safe. I've moved the windowing pojos into KSQL execution, and split them off from the AST. This way we can serialize these into the aggregation plan nodes to express windows. I've also removed the code that builds aggregations from these pojos and moved it into a visitor inside StreamAggregateBuilder. To implement window start/end projections, I had to move WindowSelectMapper to ksql-execution. This also requires having WindowSelectMapper own the start/end udaf names. This patch also includes a refactor of AggregateNode to pass down the aggregation function call expressions rather than the resolved aggregation functions. The code for resolving the function call expressions against the internal schema and building the aggregators, initializers, and undo aggregators has been moved into a class called AggregateParams, which the aggregate builders use to make the aggregation calls in streams. The rest of the patch implements the actual aggregation from step builders.
- Loading branch information
Showing
53 changed files
with
2,351 additions
and
1,203 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.