1 /*------------------------------------------------------------------------- 2 * 3 * shard_pruning.h 4 * Shard pruning infrastructure. 5 * 6 * Copyright (c) Citus Data, Inc. 7 * 8 *------------------------------------------------------------------------- 9 */ 10 11 #ifndef SHARD_PRUNING_H_ 12 #define SHARD_PRUNING_H_ 13 14 #include "distributed/metadata_cache.h" 15 #include "nodes/primnodes.h" 16 17 #define INVALID_SHARD_INDEX -1 18 19 /* Function declarations for shard pruning */ 20 extern List * PruneShards(Oid relationId, Index rangeTableId, List *whereClauseList, 21 Const **partitionValueConst); 22 extern bool ContainsFalseClause(List *whereClauseList); 23 extern List * get_all_actual_clauses(List *restrictinfo_list); 24 extern Const * TransformPartitionRestrictionValue(Var *partitionColumn, 25 Const *restrictionValue, 26 bool missingOk); 27 bool VarConstOpExprClause(OpExpr *opClause, Var **varClause, Const **constantClause); 28 29 #endif /* SHARD_PRUNING_H_ */ 30