Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit d601a93

Browse files
author
Etsuro Fujita
committed
Clean up some code and comments in partbounds.c.
Do some minor cleanup for commit c8434d6: 1) remove a useless assignment (in normal builds) and 2) improve comments a little. Back-patch to v13 where the aforementioned commit went in. Author: Etsuro Fujita Reviewed-by: Alvaro Herrera Discussion: https://postgr.es/m/CAPmGK16yCd2R4=bQ4g8N2dT9TtA5ZU+qNmJ3LPc_nypbNy4_2A@mail.gmail.com
1 parent 32a4334 commit d601a93

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/backend/partitioning/partbounds.c

+5-7
Original file line numberDiff line numberDiff line change
@@ -1020,8 +1020,6 @@ partition_bounds_merge(int partnatts,
10201020
JoinType jointype,
10211021
List **outer_parts, List **inner_parts)
10221022
{
1023-
PartitionBoundInfo outer_binfo = outer_rel->boundinfo;
1024-
10251023
/*
10261024
* Currently, this function is called only from try_partitionwise_join(),
10271025
* so the join type should be INNER, LEFT, FULL, SEMI, or ANTI.
@@ -1031,10 +1029,10 @@ partition_bounds_merge(int partnatts,
10311029
jointype == JOIN_ANTI);
10321030

10331031
/* The partitioning strategies should be the same. */
1034-
Assert(outer_binfo->strategy == inner_rel->boundinfo->strategy);
1032+
Assert(outer_rel->boundinfo->strategy == inner_rel->boundinfo->strategy);
10351033

10361034
*outer_parts = *inner_parts = NIL;
1037-
switch (outer_binfo->strategy)
1035+
switch (outer_rel->boundinfo->strategy)
10381036
{
10391037
case PARTITION_STRATEGY_HASH:
10401038

@@ -1075,7 +1073,7 @@ partition_bounds_merge(int partnatts,
10751073

10761074
default:
10771075
elog(ERROR, "unexpected partition strategy: %d",
1078-
(int) outer_binfo->strategy);
1076+
(int) outer_rel->boundinfo->strategy);
10791077
return NULL; /* keep compiler quiet */
10801078
}
10811079
}
@@ -1528,7 +1526,7 @@ merge_range_bounds(int partnatts, FmgrInfo *partsupfuncs,
15281526
&next_index);
15291527
Assert(merged_index >= 0);
15301528

1531-
/* Get the range of the merged partition. */
1529+
/* Get the range bounds of the merged partition. */
15321530
get_merged_range_bounds(partnatts, partsupfuncs,
15331531
partcollations, jointype,
15341532
&outer_lb, &outer_ub,
@@ -1833,7 +1831,7 @@ merge_matching_partitions(PartitionMap *outer_map, PartitionMap *inner_map,
18331831

18341832
/*
18351833
* If neither of them has been merged, merge them. Otherwise, if one has
1836-
* been merged with a dummy relation on the other side (and the other
1834+
* been merged with a dummy partition on the other side (and the other
18371835
* hasn't yet been merged with anything), re-merge them. Otherwise, they
18381836
* can't be merged, so return -1.
18391837
*/

0 commit comments

Comments
 (0)