Skip to content

Commit

Permalink
Use proper INVALID_{HYPERTABLE|CHUNK}_ID macros
Browse files Browse the repository at this point in the history
  • Loading branch information
fabriziomello committed Oct 18, 2024
1 parent b65083e commit a81c309
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tsl/src/hypercore/hypercore_handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,9 @@ lazy_build_hypercore_info_cache(Relation rel, bool create_chunk_constraints,
/* Create compressed chunk and set the created flag if it does not
* exist. */
if (compressed_relation_created)
*compressed_relation_created = (hsinfo->compressed_relation_id == 0);
*compressed_relation_created = (hsinfo->compressed_relation_id == INVALID_CHUNK_ID);

if (hsinfo->compressed_relation_id == 0)
if (hsinfo->compressed_relation_id == INVALID_CHUNK_ID)
{
/* Consider if we want to make it simpler to create the compressed
* table by just considering a normal side-relation with no strong
Expand Down Expand Up @@ -3062,7 +3062,7 @@ hypercore_relation_size(Relation rel, ForkNumber forkNumber)
uint64 ubytes = table_block_relation_size(rel, forkNumber);
int32 hyper_id = ts_chunk_get_hypertable_id_by_reloid(rel->rd_id);

if (hyper_id == 0)
if (hyper_id == INVALID_HYPERTABLE_ID)
return ubytes;

HypercoreInfo *hsinfo = RelationGetHypercoreInfo(rel);
Expand Down

0 comments on commit a81c309

Please sign in to comment.