Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf495fd6

Browse files
committed
bugfix: check that variable is the partitioning key (Ildar)
1 parent4b25335 commitf495fd6

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

‎pg_pathman.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1409,11 +1409,9 @@ handle_arrexpr(const ScalarArrayOpExpr *expr, WalkerContext *context)
14091409
result->args=NIL;
14101410
result->paramsel=1.0;
14111411

1412-
if (varnode==NULL|| !IsA(varnode,Var))
1413-
{
1414-
result->rangeset=list_make1_irange(make_irange(0,prel->children_count-1, true));
1415-
returnresult;
1416-
}
1412+
/* If variable is not the partition key then skip it */
1413+
if (!varnode|| !IsA(varnode,Var)|| ((Var*)varnode)->varattno!=prel->attnum)
1414+
gotohandle_arrexpr_return;
14171415

14181416
if (arraynode&&IsA(arraynode,Const)&&
14191417
!((Const*)arraynode)->constisnull)
@@ -1458,6 +1456,7 @@ handle_arrexpr(const ScalarArrayOpExpr *expr, WalkerContext *context)
14581456
result->paramsel=DEFAULT_INEQ_SEL;
14591457
}
14601458

1459+
handle_arrexpr_return:
14611460
result->rangeset=list_make1_irange(make_irange(0,prel->children_count-1, true));
14621461
returnresult;
14631462
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp