forked from timescale/timescaledb
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This change fixes a bug with gapfill that lead to certain query plans failing with the error "could not find pathkey item to sort". This was caused by a corruption in the query plan caused by removing the last two arguments to the `time_bucket_gapfill` during query planning. Since the function's expression was modified via a reference to the original expression in the query plan, it affected also the target list. The error occurred because the planner couldn't match the function (including arguments) with the corresponding equivalence member (which still included the two removed arguments). The reason the two arguments were removed, originally, was to avoid passing them on to `time_bucket`, which is called internally by `time_bucket_gapfill`. However, the last to arguments aren't passed on anyway, so it isn't necessary to modify the original argument list. Fixes timescale#2232
- Loading branch information
Showing
4 changed files
with
79 additions
and
47 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