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 Continuous Aggregate catalog code #4886

Conversation

fabriziomello
Copy link
Contributor

Get rid of GETSTRUCT to fill the form data and use heap_deform_tuple instead. This is necessary specially when you have variable lenght fields and/or fields that accept NULL values. This refactoring will be specially usefull in a following PR for Nested Continuous Aggregates where we'll add a new metadata to the catalog that can accept NULL values.

Also refactor the rename view and schema code paths improving the readability and maintainability.

@fabriziomello fabriziomello added continuous_aggregate tech-debt Needs refactoring and improvement tasks related to the source code and its architecture. Team: Core Database labels Oct 26, 2022
@fabriziomello fabriziomello self-assigned this Oct 26, 2022
@fabriziomello fabriziomello force-pushed the refactor_continuous_agg_catalog_code branch from 3cd98fe to 33763f1 Compare October 26, 2022 20:29
@fabriziomello fabriziomello force-pushed the refactor_continuous_agg_catalog_code branch from 33763f1 to b9d4825 Compare October 27, 2022 12:35
@codecov
Copy link

codecov bot commented Oct 27, 2022

Codecov Report

Merging #4886 (4b3fdea) into main (f055458) will decrease coverage by 1.47%.
The diff coverage is 96.25%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4886      +/-   ##
==========================================
- Coverage   90.97%   89.49%   -1.48%     
==========================================
  Files         225      225              
  Lines       44244    50237    +5993     
==========================================
+ Hits        40252    44961    +4709     
- Misses       3992     5276    +1284     
Impacted Files Coverage Δ
src/compat/compat.h 50.84% <ø> (-42.14%) ⬇️
src/guc.c 94.00% <ø> (ø)
src/planner/planner.h 100.00% <ø> (ø)
src/subspace_store.c 97.72% <ø> (+0.19%) ⬆️
src/ts_catalog/catalog.c 85.91% <ø> (+1.78%) ⬆️
src/ts_catalog/continuous_agg.h 100.00% <ø> (ø)
tsl/src/bgw_policy/job.c 88.31% <0.00%> (+0.03%) ⬆️
tsl/src/compression/array.c 96.11% <0.00%> (+0.07%) ⬆️
tsl/src/compression/deltadelta.c 94.40% <0.00%> (-1.05%) ⬇️
tsl/src/continuous_aggs/create.c 87.68% <ø> (-1.37%) ⬇️
... and 245 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9b157d5...4b3fdea. Read the comment docs.

Get rid of `GETSTRUCT` to fill the form data and use `heap_deform_tuple`
instead. This is necessary specially when you have variable lenght
fields and/or fields that accept NULL values. This refactoring will be
specially usefull in a following PR for Nested Continuous Aggregates
where we'll add a new metadata to the catalog that can accept NULL
values.

Also refactor the rename view and schema code paths improving the
readability and maintainability.
@fabriziomello fabriziomello force-pushed the refactor_continuous_agg_catalog_code branch from b9d4825 to 4b3fdea Compare October 27, 2022 13:09
@fabriziomello fabriziomello enabled auto-merge (rebase) October 27, 2022 14:07
@fabriziomello fabriziomello merged commit 8d1e165 into timescale:main Oct 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
continuous_aggregate Team: Core Database tech-debt Needs refactoring and improvement tasks related to the source code and its architecture.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants