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

Add ensure calls to CAgg validation function #6808

Merged
merged 1 commit into from
Apr 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions tsl/src/continuous_aggs/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -938,8 +938,13 @@ cagg_validate_query(const Query *query, const bool finalized, const char *cagg_s
(bucket_info.bucket_time_offset != NULL) ||
(TIMESTAMP_NOT_FINITE(bucket_info.bucket_time_origin) == false);

/* At this point, we should have a valid bucket function. Otherwise, we have errored out before.
*/
Ensure(bucket_info.bucket_func != NULL, "unable to find valid bucket function");

/* Ignore time_bucket_ng in this check, since offset and origin were allowed in the past */
FuncInfo *func_info = ts_func_cache_get_bucketing_func(bucket_info.bucket_func->funcid);
Ensure(func_info != NULL, "bucket function is not found in function cache");
bool is_time_bucket_ng = func_info->origin == ORIGIN_TIMESCALE_EXPERIMENTAL;

/*
Expand Down
Loading