diff --git a/src/backend/distributed/planner/insert_select_planner.c b/src/backend/distributed/planner/insert_select_planner.c index f990a06bc..e3da3ac20 100644 --- a/src/backend/distributed/planner/insert_select_planner.c +++ b/src/backend/distributed/planner/insert_select_planner.c @@ -909,7 +909,7 @@ RouterModifyTaskForShardInterval(Query *originalQuery, * Note that this is only the case with PG14 as the parameter doesn't exist * prior to that. */ - shardRestrictionList = make_simple_restrictinfo(NULL, + shardRestrictionList = make_simple_restrictinfo(restriction->plannerInfo, (Expr *) shardOpExpressions); extendedBaseRestrictInfo = lappend(extendedBaseRestrictInfo, shardRestrictionList);