@ -3484,8 +3484,6 @@ get_number_of_groups(PlannerInfo *root,
if ( gd - > hash_sets_idx )
if ( gd - > hash_sets_idx )
{
{
ListCell * lc ;
gd - > dNumHashGroups = 0 ;
gd - > dNumHashGroups = 0 ;
groupExprs = get_sortgrouplist_exprs ( parse - > groupClause ,
groupExprs = get_sortgrouplist_exprs ( parse - > groupClause ,
@ -4720,8 +4718,6 @@ create_final_distinct_paths(PlannerInfo *root, RelOptInfo *input_rel,
Path * cheapest_input_path = input_rel - > cheapest_total_path ;
Path * cheapest_input_path = input_rel - > cheapest_total_path ;
double numDistinctRows ;
double numDistinctRows ;
bool allow_hash ;
bool allow_hash ;
Path * path ;
ListCell * lc ;
/* Estimate number of distinct rows there will be */
/* Estimate number of distinct rows there will be */
if ( parse - > groupClause | | parse - > groupingSets | | parse - > hasAggs | |
if ( parse - > groupClause | | parse - > groupingSets | | parse - > hasAggs | |
@ -4766,6 +4762,8 @@ create_final_distinct_paths(PlannerInfo *root, RelOptInfo *input_rel,
* the other . )
* the other . )
*/
*/
List * needed_pathkeys ;
List * needed_pathkeys ;
Path * path ;
ListCell * lc ;
if ( parse - > hasDistinctOn & &
if ( parse - > hasDistinctOn & &
list_length ( root - > distinct_pathkeys ) <
list_length ( root - > distinct_pathkeys ) <
@ -4776,7 +4774,7 @@ create_final_distinct_paths(PlannerInfo *root, RelOptInfo *input_rel,
foreach ( lc , input_rel - > pathlist )
foreach ( lc , input_rel - > pathlist )
{
{
Path * path = ( Path * ) lfirst ( lc ) ;
path = ( Path * ) lfirst ( lc ) ;
if ( pathkeys_contained_in ( needed_pathkeys , path - > pathkeys ) )
if ( pathkeys_contained_in ( needed_pathkeys , path - > pathkeys ) )
{
{
@ -5034,8 +5032,6 @@ create_ordered_paths(PlannerInfo *root,
*/
*/
if ( enable_incremental_sort & & list_length ( root - > sort_pathkeys ) > 1 )
if ( enable_incremental_sort & & list_length ( root - > sort_pathkeys ) > 1 )
{
{
ListCell * lc ;
foreach ( lc , input_rel - > partial_pathlist )
foreach ( lc , input_rel - > partial_pathlist )
{
{
Path * input_path = ( Path * ) lfirst ( lc ) ;
Path * input_path = ( Path * ) lfirst ( lc ) ;
@ -7607,7 +7603,6 @@ apply_scanjoin_target_to_paths(PlannerInfo *root,
AppendRelInfo * * appinfos ;
AppendRelInfo * * appinfos ;
int nappinfos ;
int nappinfos ;
List * child_scanjoin_targets = NIL ;
List * child_scanjoin_targets = NIL ;
ListCell * lc ;
Assert ( child_rel ! = NULL ) ;
Assert ( child_rel ! = NULL ) ;