fix some obvious typo and reduce usage of magic number (#7130)

fix some obvious typo and reduce usage of magic number

Signed-off-by: Zhao Junwang <zhjwpku@gmail.com>
pull/7135/head
zhjwpku 2023-08-18 22:50:20 +08:00 committed by GitHub
parent 682dca1f12
commit ba2a0aec16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -72,7 +72,7 @@ DistShardRelationId(void)
/* /*
* DistShardRelationId returns the relation id of the pg_dist_shard * DistShardShardidIndexId returns the relation id of the pg_dist_shard_shardid_index
*/ */
static Oid static Oid
DistShardShardidIndexId(void) DistShardShardidIndexId(void)
@ -87,7 +87,7 @@ DistShardShardidIndexId(void)
/* /*
* DistShardRelationId returns the relation id of the pg_dist_shard * DistPartitionRelationId returns the relation id of the pg_dist_partition
*/ */
static Oid static Oid
DistPartitionRelationId(void) DistPartitionRelationId(void)
@ -376,7 +376,8 @@ CdcIsReferenceTableViaCatalog(Oid relationId)
* A table is a reference table when its partition method is 'none' * A table is a reference table when its partition method is 'none'
* and replication model is 'two phase commit' * and replication model is 'two phase commit'
*/ */
return partitionMethodChar == 'n' && replicationModelChar == 't'; return partitionMethodChar == DISTRIBUTE_BY_NONE &&
replicationModelChar == REPLICATION_MODEL_2PC;
} }

View File

@ -156,7 +156,7 @@ struct TableDDLCommand
/* /*
* This union contains one (1) typed field for every implementation for * This union contains one (1) typed field for every implementation for
* TableDDLCommand. A union enforces no overloading of fields but instead requiers at * TableDDLCommand. A union enforces no overloading of fields but instead requires at
* most one of the fields to be used at any time. * most one of the fields to be used at any time.
*/ */
union union