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

Use NULL in CAgg bucket function catalog table #6682

Merged
merged 1 commit into from
Feb 23, 2024

Conversation

jnidzwetzki
Copy link
Contributor

@jnidzwetzki jnidzwetzki commented Feb 21, 2024

Historically, we have used an empty string for undefined values in the catalog table continuous_aggs_bucket_function. Since #6624, the optional arguments can be NULL. This patch cleans up the empty strings and changes the logic to work with NULL values.


Disable-check: force-changelog-file

@jnidzwetzki jnidzwetzki self-assigned this Feb 21, 2024
Copy link

codecov bot commented Feb 21, 2024

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (59f50f2) 80.06% compared to head (1f54f27) 81.46%.
Report is 24 commits behind head on main.

Files Patch % Lines
tsl/src/continuous_aggs/create.c 81.25% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6682      +/-   ##
==========================================
+ Coverage   80.06%   81.46%   +1.39%     
==========================================
  Files         190      191       +1     
  Lines       37181    36425     -756     
  Branches     9450     9464      +14     
==========================================
- Hits        29770    29674      -96     
+ Misses       2997     2985      -12     
+ Partials     4414     3766     -648     

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

@jnidzwetzki jnidzwetzki marked this pull request as ready for review February 21, 2024 14:14
Historically, we have used an empty string for undefined values in the
catalog table continuous_aggs_bucket_function. Since timescale#6624, the optional
arguments can be NULL. This patch cleans up the empty strings and
changes the logic to work with NULL values.
/* Bucket offset */
if (bucket_offset != NULL)
{
values[AttrNumberGetAttrOffset(Anum_continuous_aggs_bucket_function_bucket_offset)] =
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code path can currently not be reached since origin is always NULL. But this will change when #6382 is merged. This PR also contains the needed test coverage for this line.

@jnidzwetzki jnidzwetzki merged commit fdf3aa3 into timescale:main Feb 23, 2024
44 checks passed
@jnidzwetzki jnidzwetzki deleted the cagg_catalog_refactoring_3 branch February 23, 2024 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants