-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
opt: infer functional dependencies for window functions
This commit adds logic to infer strict functional dependencies from a Window operator's partition column(s) to some or all of its window functions when the following conditions are satisfied: 1. The window function must be an aggregate, or first_value or last_value. 2. The window frame must be unbounded. The above conditions ensure that the window function always produces the same result given the same window frame, as well as that every row in a partition has the same window frame. This means that the window function produces the same output for every row in the partition, and therefore, the partition columns functionally determine the output of the window function. This patch also fixes a small omission made in the window function FD calculation, which caused the window's FDs to preserve an input key without extending the key to apply to all the window's output cols. Epic: None Release note: None
- Loading branch information
1 parent
60c5e14
commit 6a3221f
Showing
13 changed files
with
465 additions
and
79 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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.