-
Notifications
You must be signed in to change notification settings - Fork 848
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
Fix uninitialized bucket_info.htpartcolno
warning
#5271
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1487,6 +1487,13 @@ cagg_validate_query(const Query *query, const bool finalized, const char *cagg_s | |
} | ||
|
||
ts_cache_release(hcache); | ||
|
||
/* | ||
* We need a GROUP By clause with time_bucket on the partitioning | ||
* column of the hypertable | ||
*/ | ||
Assert(query->groupClause); | ||
caggtimebucket_validate(&bucket_info, query->groupClause, query->targetList); | ||
} | ||
|
||
/* Check row security settings for the table. */ | ||
|
@@ -1495,14 +1502,7 @@ cagg_validate_query(const Query *query, const bool finalized, const char *cagg_s | |
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED), | ||
errmsg("cannot create continuous aggregate on hypertable with row security"))); | ||
|
||
/* | ||
* We need a GROUP By clause with time_bucket on the partitioning | ||
* column of the hypertable. | ||
*/ | ||
Assert(query->groupClause); | ||
caggtimebucket_validate(&bucket_info, query->groupClause, query->targetList); | ||
|
||
/* Nested cagg validations. */ | ||
/* nested cagg validations */ | ||
if (is_nested) | ||
Comment on lines
-1498
to
1506
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok. trying to sort this out a little more, to see if anything could go wrong. The function The variable The only situation where There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. One thing that is weird is that the field |
||
{ | ||
int64 bucket_width = 0, bucket_width_parent = 0; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you're moving the code into an if-statement, it is a possibility that not setting
query->groupClause
query->targetList
could cause issues later in the execution. I am not sure if that can be triggered in a reasonable way, but could you investigate this?