提交 b670be1f 编写于 作者: S Shreedhar Hardikar

Changes for ORCA commit: Skip CXformPushGbBelowSetOp when arity > threshold

This commits adds a new GUC that controls the xform:
optimizer_push_group_by_below_setop_threshold.

Also bump ORCA version to 3.49.0
上级 d8663cce
...@@ -19,4 +19,4 @@ params: ...@@ -19,4 +19,4 @@ params:
BLD_TARGETS: BLD_TARGETS:
OUTPUT_ARTIFACT_DIR: gpdb_artifacts OUTPUT_ARTIFACT_DIR: gpdb_artifacts
CONFIGURE_FLAGS: CONFIGURE_FLAGS:
ORCA_TAG: v3.48.0 ORCA_TAG: v3.49.0
...@@ -40,10 +40,10 @@ AC_RUN_IFELSE([AC_LANG_PROGRAM([[ ...@@ -40,10 +40,10 @@ AC_RUN_IFELSE([AC_LANG_PROGRAM([[
#include <string.h> #include <string.h>
]], ]],
[ [
return strncmp("3.48.", GPORCA_VERSION_STRING, 5); return strncmp("3.49.", GPORCA_VERSION_STRING, 5);
])], ])],
[AC_MSG_RESULT([[ok]])], [AC_MSG_RESULT([[ok]])],
[AC_MSG_ERROR([Your ORCA version is expected to be 3.48.XXX])] [AC_MSG_ERROR([Your ORCA version is expected to be 3.49.XXX])]
) )
AC_LANG_POP([C++]) AC_LANG_POP([C++])
])# PGAC_CHECK_ORCA_VERSION ])# PGAC_CHECK_ORCA_VERSION
......
...@@ -13995,7 +13995,7 @@ int ...@@ -13995,7 +13995,7 @@ int
main () main ()
{ {
return strncmp("3.48.", GPORCA_VERSION_STRING, 5); return strncmp("3.49.", GPORCA_VERSION_STRING, 5);
; ;
return 0; return 0;
...@@ -14005,7 +14005,7 @@ if ac_fn_cxx_try_run "$LINENO"; then : ...@@ -14005,7 +14005,7 @@ if ac_fn_cxx_try_run "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; } $as_echo "ok" >&6; }
else else
as_fn_error $? "Your ORCA version is expected to be 3.48.XXX" "$LINENO" 5 as_fn_error $? "Your ORCA version is expected to be 3.49.XXX" "$LINENO" 5
fi fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
......
[requires] [requires]
orca/v3.48.0@gpdb/stable orca/v3.49.0@gpdb/stable
[imports] [imports]
include, * -> build/include include, * -> build/include
......
...@@ -450,6 +450,7 @@ COptTasks::CreateOptimizerConfig ...@@ -450,6 +450,7 @@ COptTasks::CreateOptimizerConfig
ULONG array_expansion_threshold = (ULONG) optimizer_array_expansion_threshold; ULONG array_expansion_threshold = (ULONG) optimizer_array_expansion_threshold;
ULONG join_order_threshold = (ULONG) optimizer_join_order_threshold; ULONG join_order_threshold = (ULONG) optimizer_join_order_threshold;
ULONG broadcast_threshold = (ULONG) optimizer_penalize_broadcast_threshold; ULONG broadcast_threshold = (ULONG) optimizer_penalize_broadcast_threshold;
ULONG push_group_by_below_setop_threshold = (ULONG) optimizer_push_group_by_below_setop_threshold;
return GPOS_NEW(mp) COptimizerConfig return GPOS_NEW(mp) COptimizerConfig
( (
...@@ -464,8 +465,9 @@ COptTasks::CreateOptimizerConfig ...@@ -464,8 +465,9 @@ COptTasks::CreateOptimizerConfig
array_expansion_threshold, array_expansion_threshold,
join_order_threshold, join_order_threshold,
broadcast_threshold, broadcast_threshold,
false /* don't create Assert nodes for constraints, we'll false, /* don't create Assert nodes for constraints, we'll
* enforce them ourselves in the executor */ * enforce them ourselves in the executor */
push_group_by_below_setop_threshold
), ),
GPOS_NEW(mp) CWindowOids(OID(F_WINDOW_ROW_NUMBER), OID(F_WINDOW_RANK)) GPOS_NEW(mp) CWindowOids(OID(F_WINDOW_ROW_NUMBER), OID(F_WINDOW_RANK))
); );
......
...@@ -377,6 +377,7 @@ int optimizer_array_expansion_threshold; ...@@ -377,6 +377,7 @@ int optimizer_array_expansion_threshold;
int optimizer_join_order_threshold; int optimizer_join_order_threshold;
int optimizer_join_order; int optimizer_join_order;
int optimizer_cte_inlining_bound; int optimizer_cte_inlining_bound;
int optimizer_push_group_by_below_setop_threshold;
bool optimizer_force_multistage_agg; bool optimizer_force_multistage_agg;
bool optimizer_force_three_stage_scalar_dqa; bool optimizer_force_three_stage_scalar_dqa;
bool optimizer_force_expanded_distinct_aggs; bool optimizer_force_expanded_distinct_aggs;
...@@ -4034,6 +4035,17 @@ struct config_int ConfigureNamesInt_gp[] = ...@@ -4034,6 +4035,17 @@ struct config_int ConfigureNamesInt_gp[] =
NULL, NULL, NULL NULL, NULL, NULL
}, },
{
{"optimizer_push_group_by_below_setop_threshold", PGC_USERSET, QUERY_TUNING_METHOD,
gettext_noop("Maximum number of children setops have to consider pushing group bys below it"),
NULL,
GUC_GPDB_ADDOPT | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
},
&optimizer_push_group_by_below_setop_threshold,
10, 0, INT_MAX,
NULL, NULL, NULL
},
{ {
{"optimizer_join_order_threshold", PGC_USERSET, QUERY_TUNING_METHOD, {"optimizer_join_order_threshold", PGC_USERSET, QUERY_TUNING_METHOD,
gettext_noop("Maximum number of join children to use dynamic programming based join ordering algorithm."), gettext_noop("Maximum number of join children to use dynamic programming based join ordering algorithm."),
......
...@@ -503,6 +503,7 @@ extern int optimizer_join_order_threshold; ...@@ -503,6 +503,7 @@ extern int optimizer_join_order_threshold;
extern int optimizer_join_order; extern int optimizer_join_order;
extern int optimizer_join_arity_for_associativity_commutativity; extern int optimizer_join_arity_for_associativity_commutativity;
extern int optimizer_cte_inlining_bound; extern int optimizer_cte_inlining_bound;
extern int optimizer_push_group_by_below_setop_threshold;
extern bool optimizer_force_multistage_agg; extern bool optimizer_force_multistage_agg;
extern bool optimizer_force_three_stage_scalar_dqa; extern bool optimizer_force_three_stage_scalar_dqa;
extern bool optimizer_force_expanded_distinct_aggs; extern bool optimizer_force_expanded_distinct_aggs;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册