diff --git a/src/backend/distributed/planner/insert_select_planner.c b/src/backend/distributed/planner/insert_select_planner.c index 38f83bd1d..24d550004 100644 --- a/src/backend/distributed/planner/insert_select_planner.c +++ b/src/backend/distributed/planner/insert_select_planner.c @@ -907,7 +907,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);