File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff 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- return result ;
1416- }
1412+ /* If variable is not the partition key then skip it */
1413+ if (!varnode || !IsA (varnode , Var ) || ((Var * ) varnode )-> varattno != prel -> attnum )
1414+ goto handle_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 return result ;
14631462}
You can’t perform that action at this time.
0 commit comments