Skip to content

Commit

Permalink
Refactor CAggTimeBucketInfo to remove redundancy
Browse files Browse the repository at this point in the history
Inside `CAggTimebucketInfo` data structure we're using several
properties that actually is also part of `ContinuousAggsBucketFunction`,
so refactor the code to use it and remove the properties redundancy.
  • Loading branch information
fabriziomello committed May 21, 2024
1 parent 693e54e commit ec33c15
Show file tree
Hide file tree
Showing 4 changed files with 92 additions and 96 deletions.
10 changes: 1 addition & 9 deletions src/ts_catalog/continuous_agg.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ typedef struct ContinuousAggsBucketFunction
* situations since PostgreSQL protects the bucket_function from deletion until the CAgg is
* defined. */
Oid bucket_function;
Oid bucket_width_type; /* type of bucket_width */

/* Is the interval of the bucket fixed? */
bool bucket_fixed_interval;
Expand Down Expand Up @@ -147,15 +148,6 @@ typedef enum ContinuousAggHypertableStatus
HypertableIsMaterializationAndRaw = HypertableIsMaterialization | HypertableIsRawTable,
} ContinuousAggHypertableStatus;

typedef struct ContinuousAggMatOptions
{
bool verbose;
bool within_single_transaction;
bool process_only_invalidation;
int64 invalidate_prior_to_time; /* exclusive, if not bucketed, the last invalidation bucket will
cover this point */
} ContinuousAggMatOptions;

typedef struct CaggsInfoData
{
/* (int32) elements */
Expand Down
Loading

0 comments on commit ec33c15

Please sign in to comment.