Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/backend/gpopt/config/CConfigParamMapping.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,12 @@ CConfigParamMapping::SConfigMappingElem CConfigParamMapping::m_elements[] = {
false, // m_negate_param
GPOS_WSZ_LIT(
"Enable create window hash agg")},


{EopttraceDisableStreamingHashAgg, &optimizer_use_streaming_hashagg,
true, // m_negate_param
GPOS_WSZ_LIT(
Comment thread
yjhjstz marked this conversation as resolved.
"Disable streaming hash agg in ORCA-generated local partial aggregations.")},

};

//---------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1296,7 +1296,8 @@ CTranslatorExprToDXLUtils::FLocalHashAggStreamSafe(CExpression *pexprAgg)

// is a local hash aggregate and it generates duplicates (therefore safe to stream)
return (COperator::EgbaggtypeLocal == popAgg->Egbaggtype()) &&
popAgg->FGeneratesDuplicates();
popAgg->FGeneratesDuplicates() &&
!GPOS_FTRACE(EopttraceDisableStreamingHashAgg);
}

//---------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,9 @@ enum EOptTraceFlag
// Use the all key exclude the non-fixed key in AGG pds
EopttraceAggRRSExcludeNonFixedKey = 103053,

// Disable streaming hash agg in ORCA-generated local partial aggregations
EopttraceDisableStreamingHashAgg = 103054,

///////////////////////////////////////////////////////
///////////////////// statistics flags ////////////////
//////////////////////////////////////////////////////
Expand Down
11 changes: 11 additions & 0 deletions src/backend/utils/misc/guc_gp.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ bool enable_parallel_dedup_semi_join = true;
bool enable_parallel_dedup_semi_reverse_join = true;
bool parallel_query_use_streaming_hashagg = false;
bool gp_use_streaming_hashagg = true;
bool optimizer_use_streaming_hashagg = true;
int gp_appendonly_insert_files = 0;
int gp_appendonly_insert_files_tuples_range = 0;
int gp_random_insert_segments = 0;
Expand Down Expand Up @@ -1909,6 +1910,16 @@ struct config_bool ConfigureNamesBool_gp[] =
true, NULL, NULL
},

{
{"optimizer_use_streaming_hashagg", PGC_USERSET, DEVELOPER_OPTIONS,
gettext_noop("Use streaming hash agg in ORCA-generated local partial hash aggregations."),
NULL,
GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
},
&optimizer_use_streaming_hashagg,
true, NULL, NULL
},

{
{"gp_force_random_redistribution", PGC_USERSET, CUSTOM_OPTIONS,
gettext_noop("Force redistribution of insert for randomly-distributed."),
Expand Down
1 change: 1 addition & 0 deletions src/include/utils/guc.h
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ extern bool enable_parallel_dedup_semi_join;
extern bool enable_parallel_dedup_semi_reverse_join;
extern bool parallel_query_use_streaming_hashagg;
extern bool gp_use_streaming_hashagg;
extern bool optimizer_use_streaming_hashagg;
extern int gp_appendonly_insert_files;
extern int gp_appendonly_insert_files_tuples_range;
extern int gp_random_insert_segments;
Expand Down
1 change: 1 addition & 0 deletions src/include/utils/unsync_guc_name.h
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,7 @@
"optimizer_skew_factor",
"optimizer_use_external_constant_expression_evaluation_for_ints",
"optimizer_use_gpdb_allocators",
"optimizer_use_streaming_hashagg",
"optimizer_xform_bind_threshold",
"parallel_leader_participation",
"parallel_query_use_streaming_hashagg",
Expand Down
Loading