Skip to content

Commit

Permalink
Remove ts_hypertable_get_all and helper functions
Browse files Browse the repository at this point in the history
Removes the following functions:
hypertable_is_compressed_or_materialization()
hypertable_filter_exclude_compressed_and_materialization()
hypertable_tuple_append()
ts_hypertable_get_all()
  • Loading branch information
svenklemm committed Dec 8, 2023
1 parent 95cf092 commit 6f30822
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 45 deletions.
44 changes: 0 additions & 44 deletions src/hypertable.c
Original file line number Diff line number Diff line change
Expand Up @@ -396,22 +396,6 @@ ts_hypertable_relid_to_id(Oid relid)
return result;
}

static bool
hypertable_is_compressed_or_materialization(const Hypertable *ht)
{
ContinuousAggHypertableStatus status = ts_continuous_agg_hypertable_status(ht->fd.id);
return (TS_HYPERTABLE_IS_INTERNAL_COMPRESSION_TABLE(ht) ||
status == HypertableIsMaterialization);
}

static ScanFilterResult
hypertable_filter_exclude_compressed_and_materialization(const TupleInfo *ti, void *data)
{
Hypertable *ht = ts_hypertable_from_tupleinfo(ti);

return hypertable_is_compressed_or_materialization(ht) ? SCAN_EXCLUDE : SCAN_INCLUDE;
}

static int
hypertable_scan_limit_internal(ScanKeyData *scankey, int num_scankeys, int indexid,
tuple_found_func on_tuple_found, void *scandata, int limit,
Expand All @@ -435,34 +419,6 @@ hypertable_scan_limit_internal(ScanKeyData *scankey, int num_scankeys, int index
return ts_scanner_scan(&scanctx);
}

static ScanTupleResult
hypertable_tuple_append(TupleInfo *ti, void *data)
{
List **hypertables = data;

*hypertables = lappend(*hypertables, ts_hypertable_from_tupleinfo(ti));

return SCAN_CONTINUE;
}

List *
ts_hypertable_get_all(void)
{
List *result = NIL;

hypertable_scan_limit_internal(NULL,
0,
InvalidOid,
hypertable_tuple_append,
&result,
-1,
RowExclusiveLock,
CurrentMemoryContext,
hypertable_filter_exclude_compressed_and_materialization);

return result;
}

static ScanTupleResult
hypertable_tuple_update(TupleInfo *ti, void *data)
{
Expand Down
1 change: 0 additions & 1 deletion src/hypertable.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ enum Anum_generic_create_hypertable
#define Natts_generic_create_hypertable (_Anum_generic_create_hypertable_max - 1)

extern TSDLLEXPORT Oid ts_rel_get_owner(Oid relid);
extern List *ts_hypertable_get_all(void);

typedef enum HypertableCreateFlags
{
Expand Down

0 comments on commit 6f30822

Please sign in to comment.