@@ -1117,12 +1117,15 @@ handle_opexpr(const OpExpr *expr, WalkerContext *context)
1117
1117
/*
1118
1118
* Checks if expression is a KEY OP PARAM or PARAM OP KEY,
1119
1119
* where KEY is partition key (it could be Var or RelableType) and PARAM is
1120
- * whatever. Function returns variable (or RelableType) and param via var_ptr
1120
+ * whatever. Function returns variable (or RelableType) and param via var_ptr
1121
1121
* and param_ptr pointers. If partition key isn't in expression then function
1122
1122
* returns false.
1123
1123
*/
1124
1124
static bool
1125
- pull_var_param (const WalkerContext * ctx , const OpExpr * expr , Node * * var_ptr , Node * * param_ptr )
1125
+ pull_var_param (const WalkerContext * ctx ,
1126
+ const OpExpr * expr ,
1127
+ Node * * var_ptr ,
1128
+ Node * * param_ptr )
1126
1129
{
1127
1130
Node * left = linitial (expr -> args ),
1128
1131
* right = lsecond (expr -> args );
@@ -1135,22 +1138,22 @@ pull_var_param(const WalkerContext *ctx, const OpExpr *expr, Node **var_ptr, Nod
1135
1138
(Var * ) left :
1136
1139
(Var * ) ((RelabelType * ) left )-> arg ;
1137
1140
1138
- if (v -> varattno == ctx -> prel -> attnum )
1141
+ if (v -> varoattno == ctx -> prel -> attnum )
1139
1142
{
1140
1143
* var_ptr = left ;
1141
1144
* param_ptr = right ;
1142
1145
return true;
1143
1146
}
1144
1147
}
1145
-
1148
+
1146
1149
/* ... variable is on the right side */
1147
1150
if (IsA (right , Var ) || IsA (right , RelabelType ))
1148
1151
{
1149
1152
v = !IsA (right , RelabelType ) ?
1150
1153
(Var * ) right :
1151
1154
(Var * ) ((RelabelType * ) right )-> arg ;
1152
1155
1153
- if (v -> varattno == ctx -> prel -> attnum )
1156
+ if (v -> varoattno == ctx -> prel -> attnum )
1154
1157
{
1155
1158
* var_ptr = right ;
1156
1159
* param_ptr = left ;
@@ -1245,7 +1248,7 @@ handle_arrexpr(const ScalarArrayOpExpr *expr, WalkerContext *context)
1245
1248
var = !IsA (varnode , RelabelType ) ?
1246
1249
(Var * ) varnode :
1247
1250
(Var * ) ((RelabelType * ) varnode )-> arg ;
1248
- if (var -> varattno != prel -> attnum )
1251
+ if (var -> varoattno != prel -> attnum )
1249
1252
goto handle_arrexpr_return ;
1250
1253
}
1251
1254
else
0 commit comments