@ -83,6 +83,8 @@ extern Node* get_real_rte_varno_attno_or_node(Query* parse, Index* varno, AttrNu
|
||||
*/
|
||||
extern Node* negate_clause(Node* node);
|
||||
extern Expr* canonicalize_qual(Expr* qual, bool is_check);
|
||||
extern List *pull_ands(List *and_exprs);
|
||||
extern List* pull_ors(List* orlist);
|
||||
|
||||
/*
|
||||
* prototypes for preptlist.c
|
||||
|
||||
@ -37,6 +37,7 @@ extern void convert_ORANY_to_join(
|
||||
|
||||
extern Node* convert_OREXPR_to_join(PlannerInfo* root, BoolExpr* or_clause, OpExpr* op_expr, SubLink* expr_sublink,
|
||||
Node** jtlink1, Relids *available_rels);
|
||||
extern Node *generate_filter_on_opexpr_sublink(PlannerInfo *root, int rtIndex, Node *targetExpr, Query *subQuery);
|
||||
|
||||
extern void convert_ORCLAUSE_to_join(PlannerInfo* root, BoolExpr* or_clause, Node** jtlink1, Relids *available_rels1);
|
||||
extern Node* SS_replace_correlation_vars(PlannerInfo* root, Node* expr);
|
||||
@ -56,4 +57,12 @@ extern void convert_multi_count_distinct(PlannerInfo* root);
|
||||
#endif
|
||||
extern List* pull_sublink(Node* node, int flag, bool is_name, bool recurse = false);
|
||||
extern List* pull_opExpr(Node* node);
|
||||
extern List* pull_aggref(Node* node);
|
||||
|
||||
extern void push_down_one_query(PlannerInfo* root, Query** subquery);
|
||||
extern void pull_up_sort_limit_clause(Query* query, Query* subquery, bool set_refs);
|
||||
extern bool safe_pullup_op_expr_sublink(OpExpr* expr);
|
||||
extern bool safe_apply_winmagic(PlannerInfo* root, Node* sublink_qual, SubLink* sublink, Relids* available_rels);
|
||||
extern Node* convert_expr_sublink_with_winmagic(PlannerInfo* root, Node** jtlink1, Node* sublink_qual,
|
||||
SubLink* sublink, Relids* available_rels);
|
||||
#endif /* SUBSELECT_H */
|
||||
|
||||
@ -399,6 +399,7 @@ typedef enum {
|
||||
PRED_PUSH_NORMAL = 128,
|
||||
PRED_PUSH_FORCE = 256,
|
||||
SUBLINK_PULLUP_DISABLE_EXPR = 512, /* disable pull sublink in expr clause */
|
||||
SUBLINK_PULLUP_ENHANCED = 1024
|
||||
} rewrite_param;
|
||||
|
||||
typedef enum {
|
||||
@ -451,6 +452,9 @@ typedef enum {
|
||||
#define DISABLE_SUBLINK_PULLUP_EXPR() \
|
||||
((SUBLINK_PULLUP_DISABLE_EXPR) & (uint)u_sess->attr.attr_sql.rewrite_rule)
|
||||
|
||||
#define ENABLE_SUBLINK_PULLUP_ENHANCED() \
|
||||
((SUBLINK_PULLUP_ENHANCED) & (uint)u_sess->attr.attr_sql.rewrite_rule)
|
||||
|
||||
#define ENABLE_PRED_PUSH_ALL(root) \
|
||||
((ENABLE_PRED_PUSH(root) || ENABLE_PRED_PUSH_NORMAL(root) || ENABLE_PRED_PUSH_FORCE(root)) && permit_predpush(root))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user