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

Refactor code for getting time bucket function Oid #7042

Conversation

fabriziomello
Copy link
Contributor

@fabriziomello fabriziomello commented Jun 18, 2024

This is a small refactoring for getting time bucket function Oid from a view definition. It will be necessary for a following PRs for completely remove the unnecessary catalog metadata table continuous_aggs_bucket_function.

Also added a new SQL function cagg_get_bucket_function_info to return all time_bucket information based on a user view definition.

Disable-check: force-changelog-file

@fabriziomello fabriziomello added continuous_aggregate time_bucket tech-debt Needs refactoring and improvement tasks related to the source code and its architecture. labels Jun 18, 2024
@fabriziomello fabriziomello self-assigned this Jun 18, 2024
Copy link

codecov bot commented Jun 18, 2024

Codecov Report

Attention: Patch coverage is 81.62162% with 34 lines in your changes missing coverage. Please review.

Project coverage is 81.76%. Comparing base (59f50f2) to head (aab6d93).
Report is 229 commits behind head on main.

Files Patch % Lines
tsl/src/continuous_aggs/utils.c 78.48% 2 Missing and 15 partials ⚠️
tsl/src/continuous_aggs/common.c 86.59% 0 Missing and 13 partials ⚠️
src/utils.h 20.00% 1 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7042      +/-   ##
==========================================
+ Coverage   80.06%   81.76%   +1.69%     
==========================================
  Files         190      200      +10     
  Lines       37181    37345     +164     
  Branches     9450     9740     +290     
==========================================
+ Hits        29770    30535     +765     
+ Misses       2997     2891     -106     
+ Partials     4414     3919     -495     

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

@fabriziomello fabriziomello force-pushed the cagg_refactor_get_bucket_function_oid branch from 8821c21 to c4ce36e Compare June 18, 2024 21:50
@fabriziomello fabriziomello marked this pull request as draft June 19, 2024 13:28
@fabriziomello fabriziomello force-pushed the cagg_refactor_get_bucket_function_oid branch 3 times, most recently from b29738a to 0ffb56d Compare June 19, 2024 19:21
@fabriziomello fabriziomello marked this pull request as ready for review June 19, 2024 19:21
@fabriziomello fabriziomello force-pushed the cagg_refactor_get_bucket_function_oid branch 7 times, most recently from e3b7365 to 1b1883e Compare June 20, 2024 20:22
@fabriziomello fabriziomello force-pushed the cagg_refactor_get_bucket_function_oid branch 2 times, most recently from d9b9828 to bd26813 Compare June 24, 2024 14:37
@fabriziomello fabriziomello force-pushed the cagg_refactor_get_bucket_function_oid branch 2 times, most recently from 0d3b6e1 to 16ca1af Compare June 25, 2024 22:47
This is a small refactoring for getting time bucket function Oid from
a view definition. It will be necessary for a following PRs for
completely remove the uncessary catalog metadata table
`continuous_aggs_bucket_function`.

Also added a new SQL function `cagg_get_bucket_function_info` to return
all `time_bucket` information based on a user view definition.
@fabriziomello fabriziomello force-pushed the cagg_refactor_get_bucket_function_oid branch from 16ca1af to aab6d93 Compare June 26, 2024 12:55
@fabriziomello fabriziomello enabled auto-merge (rebase) June 26, 2024 12:56
@fabriziomello fabriziomello disabled auto-merge June 26, 2024 12:56
@fabriziomello fabriziomello merged commit cdfa156 into timescale:main Jun 26, 2024
42 checks passed
fabriziomello added a commit to fabriziomello/timescaledb that referenced this pull request Dec 12, 2024
In timescale#7042 we refactored the code for getting the time bucket function
info to read information from the stored query tree on Postgres
metadata.

But when an origin was not specified it was returning a wrong value
instead of NULL. Fixed it by properly dealing with non-defined origin
and also simplified a bit the code to process time bucket parameters.
fabriziomello added a commit to fabriziomello/timescaledb that referenced this pull request Dec 12, 2024
In timescale#7042 we refactored the code for getting the time bucket function
info to read information from the stored query tree on Postgres
metadata.

But when an origin was not specified it was returning a wrong value
instead of NULL. Fixed it by properly dealing with non-defined origin
and also simplified a bit the code to process time bucket parameters.
fabriziomello added a commit to fabriziomello/timescaledb that referenced this pull request Dec 13, 2024
In timescale#7042 we refactored the code for getting the time bucket function
info to read information from the stored query tree on Postgres
metadata.

But when an origin was not specified it was returning a wrong value
instead of NULL. Fixed it by properly dealing with non-defined origin
and also simplified a bit the code to process time bucket parameters.
fabriziomello added a commit to fabriziomello/timescaledb that referenced this pull request Dec 16, 2024
In timescale#7042 we refactored the code for getting the time bucket function
info to read information from the stored query tree on Postgres
metadata.

But when an origin was not specified it was returning a wrong value
instead of NULL. Fixed it by properly dealing with non-defined origin
and also simplified a bit the code to process time bucket parameters.
fabriziomello added a commit that referenced this pull request Dec 16, 2024
In #7042 we refactored the code for getting the time bucket function
info to read information from the stored query tree on Postgres
metadata.

But when an origin was not specified it was returning a wrong value
instead of NULL. Fixed it by properly dealing with non-defined origin
and also simplified a bit the code to process time bucket parameters.
fabriziomello added a commit to fabriziomello/timescaledb that referenced this pull request Feb 19, 2025
fabriziomello added a commit to fabriziomello/timescaledb that referenced this pull request Feb 19, 2025
fabriziomello added a commit to fabriziomello/timescaledb that referenced this pull request Feb 20, 2025
fabriziomello added a commit to fabriziomello/timescaledb that referenced this pull request Feb 20, 2025
fabriziomello added a commit to fabriziomello/timescaledb that referenced this pull request Feb 21, 2025
The temporary function `cagg_get_bucket_function` was created to be
used in the update script for 2.14.2 to 2.15.0 and for some regression
tests, but in 2.16.0 (timescale#7042) we added a new persistent function
`cagg_get_bucket_function_info` as a replacement so used it instead.

Leftover from timescale#7042 refactoring PR.
fabriziomello added a commit to fabriziomello/timescaledb that referenced this pull request Feb 21, 2025
The temporary function `cagg_get_bucket_function` was created to be
used in the update script for 2.14.2 to 2.15.0 and for some regression
tests, but in 2.16.0 (timescale#7042) we added a new persistent function
`cagg_get_bucket_function_info` as a replacement so used it instead.

Leftover from timescale#7042 refactoring PR.
fabriziomello added a commit to fabriziomello/timescaledb that referenced this pull request Feb 21, 2025
The temporary function `cagg_get_bucket_function` was created to be
used in the update script for 2.14.2 to 2.15.0 and for some regression
tests, but in 2.16.0 (timescale#7042) we added a new persistent function
`cagg_get_bucket_function_info` as a replacement so used it instead.

Leftover from timescale#7042 refactoring PR.
fabriziomello added a commit to fabriziomello/timescaledb that referenced this pull request Feb 21, 2025
The temporary function `cagg_get_bucket_function` was created to be
used in the update script for 2.14.2 to 2.15.0 and for some regression
tests, but in 2.16.0 (timescale#7042) we added a new persistent function
`cagg_get_bucket_function_info` as a replacement so used it instead.

Leftover from timescale#7042 refactoring PR.
fabriziomello added a commit to fabriziomello/timescaledb that referenced this pull request Feb 24, 2025
The temporary function `cagg_get_bucket_function` was created to be
used in the update script for 2.14.2 to 2.15.0 and for some regression
tests, but in 2.16.0 (timescale#7042) we added a new persistent function
`cagg_get_bucket_function_info` as a replacement so used it instead.

Leftover from timescale#7042 refactoring PR.
fabriziomello added a commit that referenced this pull request Feb 25, 2025
The temporary function `cagg_get_bucket_function` was created to be
used in the update script for 2.14.2 to 2.15.0 and for some regression
tests, but in 2.16.0 (#7042) we added a new persistent function
`cagg_get_bucket_function_info` as a replacement so used it instead.

Leftover from #7042 refactoring PR.
github-actions bot pushed a commit that referenced this pull request Feb 25, 2025
The temporary function `cagg_get_bucket_function` was created to be
used in the update script for 2.14.2 to 2.15.0 and for some regression
tests, but in 2.16.0 (#7042) we added a new persistent function
`cagg_get_bucket_function_info` as a replacement so used it instead.

Leftover from #7042 refactoring PR.

(cherry picked from commit 41841b6)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
continuous_aggregate tech-debt Needs refactoring and improvement tasks related to the source code and its architecture. time_bucket
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants