From e1879c0628f12dd0ff4e18e0001f585b9d79c0c3 Mon Sep 17 00:00:00 2001 From: Onur Tirtir Date: Mon, 14 Jul 2025 17:49:20 +0300 Subject: [PATCH] minor suggestion - 1 --- .../distributed/planner/fast_path_router_planner.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/backend/distributed/planner/fast_path_router_planner.c b/src/backend/distributed/planner/fast_path_router_planner.c index f887e7b24..f8e842c52 100644 --- a/src/backend/distributed/planner/fast_path_router_planner.c +++ b/src/backend/distributed/planner/fast_path_router_planner.c @@ -221,9 +221,6 @@ FastPathRouterQuery(Query *query, FastPathRestrictionContext *fastPathContext) { FromExpr *joinTree = query->jointree; Node *quals = NULL; - bool isFastPath = false; - bool canAvoidDeparse = false; - Node *distributionKeyValue = NULL; if (!EnableFastPathRouterPlanner) { @@ -280,6 +277,10 @@ FastPathRouterQuery(Query *query, FastPathRestrictionContext *fastPathContext) return false; } + bool isFastPath = false; + bool canAvoidDeparse = false; + Node *distributionKeyValue = NULL; + /* * If the table doesn't have a distribution column, we don't need to * check anything further. @@ -292,8 +293,7 @@ FastPathRouterQuery(Query *query, FastPathRestrictionContext *fastPathContext) SINGLE_SHARD_DISTRIBUTED); isFastPath = true; } - - if (!isFastPath) + else { canAvoidDeparse = IsCitusTableTypeCacheEntry(cacheEntry, DISTRIBUTED_TABLE);