mirror of https://github.com/citusdata/citus.git
fixup! !!!!! DO NOT MERGE THIS COMMIT
parent
059090fdc0
commit
0d6168fc4c
|
|
@ -657,6 +657,8 @@ ShardsMatchingDeleteCriteria(Oid relationId, List *shardIntervalList,
|
||||||
Assert(deleteCriteria != NULL);
|
Assert(deleteCriteria != NULL);
|
||||||
List *deleteCriteriaList = list_make1(deleteCriteria);
|
List *deleteCriteriaList = list_make1(deleteCriteria);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* walk over shard list and check if shards can be dropped */
|
/* walk over shard list and check if shards can be dropped */
|
||||||
ShardInterval *shardInterval = NULL;
|
ShardInterval *shardInterval = NULL;
|
||||||
foreach_ptr(shardInterval, shardIntervalList)
|
foreach_ptr(shardInterval, shardIntervalList)
|
||||||
|
|
@ -672,6 +674,13 @@ ShardsMatchingDeleteCriteria(Oid relationId, List *shardIntervalList,
|
||||||
Expr *lessThanExpr = (Expr *) linitial(andExpr->args);
|
Expr *lessThanExpr = (Expr *) linitial(andExpr->args);
|
||||||
Expr *greaterThanExpr = (Expr *) lsecond(andExpr->args);
|
Expr *greaterThanExpr = (Expr *) lsecond(andExpr->args);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* passing NULL for plannerInfo will be problematic if we have placeholder
|
||||||
|
* vars. However, it won't be the case here because we are building
|
||||||
|
* the expression from shard intervals which don't have placeholder vars.
|
||||||
|
* Note that this is only the case with PG14 as the parameter doesn't exist
|
||||||
|
* prior to that.
|
||||||
|
*/
|
||||||
RestrictInfo *lessThanRestrictInfo = make_simple_restrictinfo_compat(NULL,
|
RestrictInfo *lessThanRestrictInfo = make_simple_restrictinfo_compat(NULL,
|
||||||
lessThanExpr);
|
lessThanExpr);
|
||||||
RestrictInfo *greaterThanRestrictInfo = make_simple_restrictinfo_compat(NULL,
|
RestrictInfo *greaterThanRestrictInfo = make_simple_restrictinfo_compat(NULL,
|
||||||
|
|
|
||||||
|
|
@ -747,7 +747,7 @@ RouterModifyTaskForShardInterval(Query *originalQuery,
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
shardRestrictionList = make_simple_restrictinfo_compat(NULL,
|
shardRestrictionList = make_simple_restrictinfo_compat(restriction->plannerInfo,
|
||||||
(Expr *) shardOpExpressions);
|
(Expr *) shardOpExpressions);
|
||||||
extendedBaseRestrictInfo = lappend(extendedBaseRestrictInfo,
|
extendedBaseRestrictInfo = lappend(extendedBaseRestrictInfo,
|
||||||
shardRestrictionList);
|
shardRestrictionList);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue