Skip to content
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

Backport to 2.14.x: #6726: Fix constify cagg_watermark using window functions #6728

Merged
merged 1 commit into from Mar 4, 2024

Conversation

timescale-automation
Copy link

This is an automated backport of #6726: Fix constify cagg_watermark using window functions.
The original issue is #6722.
This PR will be merged automatically after all the relevant CI checks pass. If this fix should not be backported, or will be backported manually, just close this PR. You can use the backport branch to add your changes, it won't be modified automatically anymore.

For more details, please see the documentation

Original description

Fix constify cagg_watermark using window functions

When querying a realtime Continuous Aggregate using window functions the new planner optimization to constify the cagg_watermark function call is not working because we're checking for window function usage on the query tree but actually this is a current limitation when creating a new Continuous Aggregate, but users can use window functions when querying it.

Fixed it by removing the check for query->hasWindowFuncs to prevent the process of constification of the cagg_watermak function call.

Fixes #6722

When querying a realtime Continuous Aggregate using window functions the
new planner optimization to constify the `cagg_watermark` function call
is not working because we're checking for window function usage on the
query tree but actually this is a current limitation when creating a new
Continuous Aggregate, but users can use window functions when querying
it.

Fixed it by removing the check for `query->hasWindowFuncs` to prevent
the process of constification of the `cagg_watermak` function call.

Fixes #6722

(cherry picked from commit a1cd7c4)
@timescale-automation timescale-automation added the is-auto-backport PR created by backport automation label Mar 4, 2024
@timescale-automation timescale-automation enabled auto-merge (rebase) March 4, 2024 11:01
Copy link

codecov bot commented Mar 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.68%. Comparing base (39616e8) to head (d8c0897).
Report is 10 commits behind head on 2.14.x.

Additional details and impacted files
@@            Coverage Diff             @@
##           2.14.x    #6728      +/-   ##
==========================================
- Coverage   79.73%   79.68%   -0.06%     
==========================================
  Files         190      190              
  Lines       37343    37191     -152     
  Branches     9483     9439      -44     
==========================================
- Hits        29777    29637     -140     
- Misses       3147     3163      +16     
+ Partials     4419     4391      -28     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@timescale-automation timescale-automation merged commit 93e31ce into 2.14.x Mar 4, 2024
42 of 43 checks passed
@timescale-automation timescale-automation deleted the backport/2.14.x/6726 branch March 4, 2024 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is-auto-backport PR created by backport automation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants