@ -1318,17 +1318,6 @@ try_partition_wise_join(PlannerInfo *root, RelOptInfo *rel1, RelOptInfo *rel2,
if ( ! IS_PARTITIONED_REL ( joinrel ) )
if ( ! IS_PARTITIONED_REL ( joinrel ) )
return ;
return ;
/*
* set_rel_pathlist ( ) may not create paths in children of an empty
* partitioned table and so we can not add paths to child - joins . So , deem
* such a join as unpartitioned . When a partitioned relation is deemed
* empty because all its children are empty , dummy path will be set in
* each of the children . In such a case we could still consider the join
* as partitioned , but it might not help much .
*/
if ( IS_DUMMY_REL ( rel1 ) | | IS_DUMMY_REL ( rel2 ) )
return ;
/*
/*
* Since this join relation is partitioned , all the base relations
* Since this join relation is partitioned , all the base relations
* participating in this join must be partitioned and so are all the
* participating in this join must be partitioned and so are all the
@ -1360,11 +1349,6 @@ try_partition_wise_join(PlannerInfo *root, RelOptInfo *rel1, RelOptInfo *rel2,
nparts = joinrel - > nparts ;
nparts = joinrel - > nparts ;
/* Allocate space to hold child-joins RelOptInfos, if not already done. */
if ( ! joinrel - > part_rels )
joinrel - > part_rels =
( RelOptInfo * * ) palloc0 ( sizeof ( RelOptInfo * ) * nparts ) ;
/*
/*
* Create child - join relations for this partitioned join , if those don ' t
* Create child - join relations for this partitioned join , if those don ' t
* exist . Add paths to child - joins for a pair of child relations
* exist . Add paths to child - joins for a pair of child relations