mysql源代码解析经典类——SELECT_LEX类
此类表示查询块,又名查询规范,该查询块由SELECT关键字,表列表,可选的WHERE子句,GROUP BY等组成。
在#include <sql_lex.h>中。
此类表示查询块,又名查询规范,该查询块由SELECT关键字,表列表,可选的WHERE子句,GROUP BY等组成。
在#include <sql_lex.h>中。
公共函数
//构造并初始化SELECT_LEX对象
SELECT_LEX (MEM_ROOT *mem_root, Item *where, Item *having)
Item * where_cond () const
Item ** where_cond_ref ()
void set_where_cond (Item *cond)
Item * having_cond () const
Item ** having_cond_ref ()
void set_having_cond (Item *cond)
void set_query_result (Query_result *result)
Query_result * query_result () const
//是否更改查询块的Query_result对象
bool change_query_result (THD *thd, Query_result_interceptor *new_result, Query_result_interceptor *old_result)
//设置查询块的基本选项(以及活动选项)
void set_base_options (ulonglong options_arg)
//将基本选项添加到查询块,还更新活动选项。
void add_base_options (ulonglong options)
//从查询块中删除基本选项。
void remove_base_options (ulonglong options)
//从基本选项,提供的选项和环境中选择激活选项:
void make_active_options (ulonglong added_options, ulonglong removed_options)
//调整激活选项集
void add_active_options (ulonglong options)
ulonglong active_options () const
//将关联的表设置为read_only
void set_tables_readonly ()
table_map all_tables_map () const
//删除我们之前作为transform_scalar_subqueries_to_join_with_derived的一部分添加的派生表
void remove_derived (THD *thd, TABLE_LIST *tl)
bool remove_aggregates (THD *thd, SELECT_LEX *select)
SELECT_LEX_UNIT * master_unit () const
SELECT_LEX_UNIT * first_inner_unit () const
SELECT_LEX * outer_select () const
SELECT_LEX * next_select () const
//在from子句中按名称查找(可能是未解析的)表引用
TABLE_LIST * find_table_by_name (const Table_ident *ident)
bool is_straight_join ()
SELECT_LEX * last_select ()
SELECT_LEX * next_select_in_list () const
//将所有查询块从此标记为“最后”作为从属
void mark_as_dependent (SELECT_LEX *last, bool aggregate)
bool is_explicitly_grouped () const
bool is_implicitly_grouped () const
//如果此查询块被隐式分组,则为true。
bool is_single_grouped () const
bool is_grouped () const
bool is_distinct () const
bool is_ordered () const
//根据解析时查询的结构,可以得出DISTINCT没用并将其删除的结论。
bool can_skip_distinct () const
bool has_limit () const
bool has_ft_funcs () const
bool is_recursive () const
bool is_in_select_list (Item *i)
//查找与给定项目匹配的组表达式,如果没有,则返回nullptr。
ORDER * find_in_group_list (Item *item, int *rollup_level) const
int group_list_size () const
bool has_windows () const
//通过使指向其他SELECT_LEX_UNIT和SELECT_LEXes的指针无效来使之失效。
void invalidate ()
uint get_in_sum_expr () const
bool add_item_to_list (Item *item)
bool add_ftfunc_to_list (Item_func_match *func)
void add_order_to_list (ORDER *order)
//将表添加到已用表列表
TABLE_LIST * add_table_to_list (THD *thd, Table_ident *table, const char *alias, ulong table_options, thr_lock_type flags=TL_UNLOCK, enum_mdl_type mdl_type=MDL_SHARED_READ, List< Index_hint > *hints=nullptr, List< String > *partition_names=nullptr, LEX_STRING *option=nullptr, Parse_context *pc=nullptr)
//将项目添加到选择列表的隐藏部分
Item ** add_hidden_item (Item *item)
//从选择列表中删除隐藏的项目
void remove_hidden_items ()
TABLE_LIST * get_table_list () const
//初始化嵌套联接的新表列表
bool init_nested_join (THD *thd)
//结束嵌套的联接表列表。
TABLE_LIST * end_nested_join ()
//嵌套最后加入操作
TABLE_LIST * nest_last_join (THD *thd, size_t table_cnt=2)
//将表添加到当前联接列表
bool add_joined_table (TABLE_LIST *table)
mem_root_deque< Item * > * get_fields_list ()
//在字段/ get_fields_list()上包装,可在item-> hidden的地方隐藏项目,这意味着基于范围的for循环。
auto visible_fields ()
auto visible_fields () const
//是否检查特权以合并到查询块中的视图。
bool check_view_privileges (THD *thd, ulong want_privilege_first, ulong want_privilege_next)
//是否检查从查询块引用的所有列的特权
bool check_column_privileges (THD *thd)
//是否检查查询块的子查询中列引用的特权
bool check_privileges_for_subqueries (THD *thd)
//是否解决并准备有关一个查询块的表的信息
bool setup_tables (THD *thd, TABLE_LIST *tables, bool select_insert)
//解决OFFSET和LIMIT子句。
bool resolve_limits (THD *thd)
//解决查询块的派生表,视图,表函数信息
bool resolve_placeholder_tables (THD *thd, bool apply_semijoin)
//将排除从表唯一性测试传播到子查询
void propagate_unique_test_exclusion ()
//将子查询的名称解析上下文对象合并到其父级中
void merge_contexts (SELECT_LEX *inner)
//是否将派生表合并到查询块中。
bool merge_derived (THD *thd, TABLE_LIST *derived_table)
//将半联接子查询谓词转换为半联接联接嵌套
bool flatten_subqueries (THD *thd)
//更新半连接嵌套的可用半连接策略。
void update_semijoin_strategies (THD *thd)
//返回可用于此查询块的子查询执行策略
Subquery_strategy subquery_strategy (const THD *thd) const
//返回是否为此查询块启用半联接
bool semijoin_enabled (const THD *thd) const
void set_sj_candidates (Mem_root_array< Item_exists_subselect *> *sj_cand)
bool has_sj_candidates () const
//从sj_candidates数组中删除指向子查询的指针
void remove_semijoin_candidate (Item_exists_subselect *sub_query)
//将列表中的全文功能元素添加到此查询块中
bool add_ftfunc_list (List< Item_func_match > *ftfuncs)
void set_lock_for_table (const Lock_descriptor &descriptor, TABLE_LIST *table)
//为当前查询块中的所有表设置锁定。
void set_lock_for_tables (thr_lock_type lock_type)
void init_order ()
void cut_subtree ()
bool test_limit ()
//获得LIMIT的偏移量
ha_rows get_offset (THD *thd)
//获得limit
ha_rows get_limit (THD *thd)
//为该查询块分配默认名称解析对象
bool set_context (Name_resolution_context *outer_context)
//设置包含对基础项目的引用的数组。
bool setup_base_ref_items (THD *thd)
void print (const THD *thd, String *str, enum_query_type query_type)
//打印SELECT_LEX对象的详细信息
void print_select (const THD *thd, String *str, enum_query_type query_type)
//打印UPDATE语句的详细信息
void print_update (const THD *thd, String *str, enum_query_type query_type)
//打印DELETE语句的详细信息
void print_delete (const THD *thd, String *str, enum_query_type query_type)
//打印insert语句的详细信息
void print_insert (const THD *thd, String *str, enum_query_type query_type)
//打印提示的详细信息。
void print_hints (const THD *thd, String *str, enum_query_type query_type)
//打印错误
bool print_error (const THD *thd, String *str)
//打印select选项
void print_select_options (String *str)
//打印update选项
void print_update_options (String *str)
//打印Delete选项
void print_delete_options (String *str)
//打印insert选项
void print_insert_options (String *str)
//打印表格数组
void print_table_references (const THD *thd, String *str, TABLE_LIST *table_list, enum_query_type query_type)
//打印SELECT_LEX对象的items数组
void print_item_list (const THD *thd, String *str, enum_query_type query_type)
//打印更新作业数组
void print_update_list (const THD *thd, String *str, enum_query_type query_type, const mem_root_deque< Item *> &fields, const mem_root_deque< Item *> &values)
//打印将要执行inserted into的列数组
void print_insert_fields (const THD *thd, String *str, enum_query_type query_type)
//打印值列表,用于INSERT和常规VALUES子句。
void print_values (const THD *thd, String *str, enum_query_type query_type, const mem_root_deque< mem_root_deque< Item *> *> &values, const char *prefix)
//在FROM子句中打印表列表。
void print_from_clause (const THD *thd, String *str, enum_query_type query_type)
//打印WHERE子句中的条件列表。
void print_where_cond (const THD *thd, String *str, enum_query_type query_type)
//打印GROUP BY子句中的项目列表
void print_group_by (const THD *thd, String *str, enum_query_type query_type)
//打印HAVING子句中的项目列表
void print_having (const THD *thd, String *str, enum_query_type query_type)
//打印视图函数的详细信息。
void print_windows (const THD *thd, String *str, enum_query_type query_type)
//打印ORDER BY子句中的项目列表
void print_order_by (const THD *thd, String *str, enum_query_type query_type)
void print_limit (const THD *thd, String *str, enum_query_type query_type)
//保存重复优化所需的准备好的语句的属性
bool save_properties (THD *thd)
//接受SELECT和DELETE的函数。
bool accept (Select_lex_visitor *visitor)
//清理此子树(此SELECT_LEX以及所有嵌套的SELECT_LEXes和SELECT_LEX_UNIT)。
void cleanup (THD *thd, bool full)
void cleanup_all_joins ()
//销毁包含的对象,特别是可能具有自己的mem_roots的临时表
void destroy ()
//如果此查询块是UNION的一部分,则返回true。
bool is_part_of_union () const
bool is_empty_query () const
//将查询块设置为不返回数据
void set_empty_query ()
bool agg_func_used () const
bool json_agg_func_used () const
void set_agg_func_used (bool val)
void set_json_agg_func_used (bool val)
bool right_joins () const
void set_right_joins ()
//查找SELECT_LEX类型
enum_explain_type type ()
//查找类型字符串
const char * get_type_str ()
bool is_dependent () const
bool is_cacheable () const
bool source_table_is_one_row () const
//在查询表达式中包含查询块。
void include_down (LEX *lex, SELECT_LEX_UNIT *outer)
//在另一个查询块旁边包括一个查询块。
void include_neighbour (LEX *lex, SELECT_LEX *before)
//在查询表达式中包含查询块,但不链接
void include_standalone (SELECT_LEX_UNIT *sel, SELECT_LEX **ref)
//将查询块包含到全局列表中
void include_in_global (SELECT_LEX **plink)
//将查询块链包括到全局列表中
void include_chain_in_global (SELECT_LEX **start)
//对包含的查询表达式的查询块重新编号
void renumber (LEX *lex)
//执行查询块本地的永久转换(不会将其合并到另一个块)
bool apply_local_transforms (THD *thd, bool prune)
//将此查询块的WHERE条件的一部分推送到实例化派生表
bool push_conditions_to_derived_tables (THD *thd)
//返回WHERE / HAVING / ON条件的一次性副本。
bool get_optimizable_conditions (THD *thd, Item **new_where, Item **new_having)
//检查仅可用于最外部查询块的选项是否适用于此查询块
bool validate_outermost_option (LEX *lex, const char *wrong_option) const
//验证查询块的基本选项。
bool validate_base_options (LEX *lex, ulonglong options) const
bool walk (Item_processor processor, enum_walk walk, uchar *arg)
//是否将表从数组添加到已用表列表。
bool add_tables (THD *thd, const Mem_root_array< Table_ident *> *tables, ulong table_options, thr_lock_type lock_type, enum_mdl_type mdl_type)
//是否在存在ROLLUP的情况下,将窗口函数内的分组依据字段引用替换为引用。
bool resolve_rollup_wfs (THD *thd)
//是否解决WHERE条件并加入条件。
bool setup_conds (THD *thd)
//是否准备查询块以进行优化
bool prepare (THD *thd, mem_root_deque< Item *> *insert_field_list)
//是否优化查询块和所有内部查询表达式
bool optimize (THD *thd)
//在传递列表中的所有嵌套联接中设置NESTED_JOIN :: counter = 0
void reset_nj_counters (mem_root_deque< TABLE_LIST *> *join_list=nullptr)
bool change_group_ref_for_func (THD *thd, Item *func, bool *changed)
bool change_group_ref_for_cond (THD *thd, Item_cond *cond, bool *changed)
Item * single_visible_field () const
size_t num_visible_fields () const
bool field_list_is_empty () const
void remove_hidden_fields ()
//更新所有本地表达式的已用表信息。
void update_used_tables ()
//恢复为此查询块和所有基础查询表达式准备的语句属性,以便为优化做好准备。
void restore_cmd_properties ()
//保存查询块和基础查询表达式的准备好的语句属性。
bool save_cmd_properties (THD *thd)
公共属性
//连接和过滤后所需的所有表达式,即选择列表,按列表分组,具有子句,窗口子句,按子句(包括隐藏字段)。
mem_root_deque< Item * > fields
//在选择上定义的所有视图,包括命名视图和内联视图。
List< Window > m_windows
//通常是指向ftfunc_list_alloc的指针,但是在UNION中,它用于创建伪造的select_lex,以合并UNION的结果字段。
List< Item_func_match > * ftfunc_list
List< Item_func_match > ftfunc_list_alloc {}
//表值构造函数的VALUES项
mem_root_deque< mem_root_deque< Item * > * > * row_value_list {nullptr}
//为此查询块生成的半联接嵌套的列表。
mem_root_deque< TABLE_LIST * > sj_nests
//FROM子句中的表列表-使用TABLE_LIST :: next_local遍历
SQL_I_List< TABLE_LIST > table_list {}
//ORDER BY子句数组
SQL_I_List< ORDER > order_list {}
Group_list_ptrs * order_list_ptrs {nullptr}
//Group by子句数组
SQL_I_List< ORDER > group_list {}
Group_list_ptrs * group_list_ptrs {nullptr}
Prealloced_array< Item_rollup_group_item *, 4 > rollup_group_items
Prealloced_array< Item_rollup_sum_switcher *, 4 > rollup_sums
//此查询块的查询块级别提示。
Opt_hints_qb * opt_hints_qb {nullptr}
char * db {nullptr}
//如果此查询块是递归单元的递归成员:TABLE_LIST,在此递归成员中,引用查询名称。
TABLE_LIST * recursive_reference {nullptr}
//对这个查询块所属的LEX的引用。
LEX * parent_lex {nullptr}
//在该选择级别的选择列表中引用其字段的那些表的集合。更多...
table_map select_list_tables {0}
//来自外部联接的所有内部表的位图
table_map outer_join {0}
//除连接表中的列外的所有列引用的名称解析上下文
Name_resolution_context context {}
//指向Name res上下文对象列表中第一个对象的指针,该对象具有此查询块作为基本查询块。
Name_resolution_context * first_context
//优化之后,它是指向相应JOIN的指针。
JOIN * join {nullptr}
//顶级加入列表
mem_root_deque< TABLE_LIST * > top_join_list
//当前已解析的联接的列表
mem_root_deque< TABLE_LIST * > * join_list
//嵌入上述列表的表格
TABLE_LIST * embedding {nullptr}
//指向查询块的第一个叶子表
TABLE_LIST * leaf_tables {nullptr}
TABLE_LIST * end_lateral_table {nullptr}
//imit子句
Item * select_limit {nullptr}
//limit...offset从句
Item * offset_limit {nullptr}
//嵌套查询块中聚合函数的循环链接列表。
Item_sum * inner_sum_func_list {nullptr}
//指向“基本”项目的指针数组;
Ref_item_array base_ref_items
//查询块数目
uint select_number {0}
//WHERE和HAVING子句的保存的值
Item::cond_result cond_value {Item::COND_UNDEF}
Item::cond_result having_value {Item::COND_UNDEF}
//解析上下文:指示当前表达式的解析位置。
enum_parsing_context parsing_place {CTX_NONE}
//解析上下文:如果为正,则在set函数内
uint in_sum_expr {0}
//表示查询的一部分正在解决
Resolve_place resolve_place
//选择列表或当前选择以及所有内部子选择的where子句中使用的字段数。
uint select_n_where_fields {0}
//select_list和HAVING子句中用于增加数量的项目数,然后可以是split_sum_func期间将添加到所有项目列表中的条目数。
uint select_n_having_items {0}
//和/或/ xor在何处/具有/在...上的参数数量
uint cond_count {0}
//位置/具有/在其上的谓词之间的数量
uint between_count {0}
//多个相等元素的最大数量
uint max_equal_elems
//此SELECT中Item_sum派生的对象数
uint n_sum_items {0}
//子节点和子节点SELECT中Item_sum派生的对象数。
uint n_child_sum_items {0}
uint n_scalar_subqueries {0}
//在一个查询块中物化衍生表和视图的数目
uint materialized_derived_table_count {0}
//分区表的数目
uint partitioned_table_count {0}
//SELECT列表中使用的通配符数
uint with_wild {0}
//此查询块中叶表的数量。
uint leaf_table_count {0}
//此查询块中衍生表的数量。
uint derived_table_count {0}
//此查询块中表函数的数量。
uint table_func_count {0}
int nest_level {0}
//指示此查询块是否包含WITH ROLLUP子句
olap_type olap {UNSPECIFIED_OLAP_TYPE}
enum_condition_context condition_context {enum_condition_context::ANDS}
//如果设置,则查询块的格式为VALUES row_list
bool is_table_value_constructor {false}
//描述这个查询区块的上下文
sub_select_type linkage {UNSPECIFIED_TYPE}
//该查询的结果不能被缓存,位字段可以是:UNCACHEABLE_DEPENDENT UNCACHEABLE_RAND UNCACHEABLE_SIDEEFFECT
uint8 uncacheable {0}
//是否必须使用此变量才能确保子查询和存储过程正常工作。
bool first_execution {true}
//半连接拔出处理完成时为true
bool sj_pullout_done {false}
//嵌套scalar_to_derived转换使用
bool m_was_implicitly_grouped {false}
//true:在prepare()调用期间跳过本地转换(由INSERT使用)
bool skip_local_transforms {false}
bool is_item_list_lookup {false}
//在处理此查询块时调用了fix字段时为true
bool having_fix_field {false}
//当在此查询块的处理中调用GROUP BY修订字段时为true
bool group_fix_field {false}
//如果包含或聚合集合函数,则为True
bool with_sum_func {false}
//HAVING子句包含子查询=>即使我们使用临时表,也无法在查询处理结束之前关闭表。
bool subquery_in_having {false}
//如果为true,请使用select_limit限制所选的行数
bool m_use_select_limit {false}
//如果为true,则在内部添加限制对象
bool m_internal_limit {false}
//从unique_table()检查中排除此查询块
bool exclude_from_table_unique_test {false}
bool no_table_names_allowed {false}
uint hidden_items_from_optimization {0}
私有成员函数
//save_properties()的帮助器
bool save_order_properties (THD *thd, SQL_I_List< ORDER > *list, Group_list_ptrs **list_ptrs)
//在选择块中记录联接嵌套信息。
bool record_join_nest_info (mem_root_deque< TABLE_LIST *> *tables)
//简化连接尽可能使用内部联接替换外部联接。
bool simplify_joins (THD *thd, mem_root_deque< TABLE_LIST *> *join_list, bool top, bool in_sj, Item **new_conds, uint *changelog=nullptr)
//删除此查询块的半联接条件。
void clear_sj_expressions (NESTED_JOIN *nested_join)
//为查询块建立半联接条件
bool build_sj_cond (THD *thd, NESTED_JOIN *nested_join, SELECT_LEX *subq_select, table_map outer_tables_map, Item **sj_cond)
//是否取消关联WHERE子句或IN或EXISTS谓词中使用的子查询的联接条件。
bool decorrelate_condition (Semijoin_decorrelation &sj_decor, TABLE_LIST *join_nest)
//是否将此查询块的子查询谓词转换为TABLE_LIST半联接嵌套
bool convert_subquery_to_semijoin (THD *thd, Item_exists_subselect *subq_pred)
//为本查询块查询一个表格数组
TABLE_LIST * synthesize_derived (THD *thd, SELECT_LEX_UNIT *unit, Item *join_cond, bool left_outer, bool use_inner_join)
//是否将子查询转换为派生表,并将其插入拥有的查询块的FROM子句中。
bool transform_subquery_to_derived (THD *thd, TABLE_LIST **out_tl, SELECT_LEX_UNIT *subs_unit, Item_subselect *subq, bool use_inner_join, bool reject_multiple_rows, Item *join_condition)
//将表子查询([NOT] {IN,EXISTS})替换为对派生表的联接
bool transform_table_subquery_to_join_with_derived (THD *thd, Item_exists_subselect *subq_pred)
//重新映射查询块中所有表的表号。
void remap_tables (THD *thd)
//是否解决涉及子查询的谓词。
bool resolve_subquery (THD *thd)
//将函数参数中按字段分组的事件标记为maybe_null,以便在添加汇总包装之前我们不会对其进行优化。
void mark_item_as_maybe_null_if_rollup_item (Item *item)
//通过使用Item_rollup_group_items替换与分组表达式匹配的项目并更新属性(maybe_null,PROP_ROLLUP_FIELD)来解析项目(及其树)以进行汇总处理。
Item * resolve_rollup_item (THD *thd, Item *item)
//解决SELECT列表和ORDER BY列表中的项目以进行汇总处理。
bool resolve_rollup (THD *thd)
//是否用匹配的列引用扩展表达式列表中的所有“ *”
bool setup_wild (THD *thd)
//在查询块完全解析之后,进行ORDER BY子句的最终设置。
bool setup_order_final (THD *thd)
//是否解决并设置GROUP BY列表。
bool setup_group (THD *thd)
void fix_after_pullout (SELECT_LEX *parent_select, SELECT_LEX *removed_select)
void remove_redundant_subquery_clauses (THD *thd, int hidden_group_field_count)
//遍历表列表并递归加入嵌套,并指向其select_lex指针
void repoint_contexts_of_join_nests (mem_root_deque< TABLE_LIST *> join_list)
//对order数组置空
void empty_order_list (SELECT_LEX *sl)
//是否解决联接嵌套的联接条件。
bool setup_join_cond (THD *thd, mem_root_deque< TABLE_LIST *> *tables, bool in_update)
//是否尝试将标识符与范围内的CTE相匹配
bool find_common_table_expr (THD *thd, Table_ident *table_id, TABLE_LIST *tl, Parse_context *pc, bool *found)
//将SELECT列表中的合格标量子查询,查询块[*]的WHERE条件,HAVING条件或JOIN条件转换为LEFT OUTER连接的等效派生表
bool transform_scalar_subqueries_to_join_with_derived (THD *thd)
bool transform_grouped_to_derived (THD *thd, bool *break_off)
bool replace_subquery_in_expr (THD *thd, Item_singlerow_subselect *subquery, TABLE_LIST *tr, Item **expr)
//将生成的派生表推入联接嵌套中的正确位置。
bool nest_derived (THD *thd, Item *join_cond, mem_root_deque< TABLE_LIST *> *join_list, TABLE_LIST *new_derived_table)
//是否解决表值构造函数的行并汇总行中每一列的类型
bool resolve_table_value_constructor_values (THD *thd)
//从合并的表格中删除未使用的列
void delete_unused_merged_columns (mem_root_deque< TABLE_LIST *> *tables)
//fix_prepare_information()的助手
void fix_prepare_information_for_order (THD *thd, SQL_I_List< ORDER > *list, Group_list_ptrs **list_ptrs)
//是否准备表值构造函数查询块以进行优化
bool prepare_values (THD *thd)
//运行由ONLY_FULL_GROUP_BY强制执行的检查
bool check_only_full_group_by (THD *thd)
//检查偏移量和限制是否对半联接有效。
bool is_row_count_valid_for_semi_join ()
私有属性
//指向用于半/反联接转换的子查询候选集合的指针。
Mem_root_array< Item_exists_subselect * > * sj_candidates {nullptr}
//order中有多少个表达式,但不是选择列表
int hidden_order_field_count {0}
//同一查询表达式中所有查询块的侵入式双向链接列表。
SELECT_LEX * next {nullptr}
SELECT_LEX ** prev {nullptr}
//包含该查询块的查询表达式
SELECT_LEX_UNIT * master {nullptr}
//该查询块中包含的第一个查询表达式
SELECT_LEX_UNIT * slave {nullptr}
//侵入式双链接全局查询块列表
SELECT_LEX * link_next {nullptr}
SELECT_LEX ** link_prev {nullptr}
//该查询块的查询结果
Query_result * m_query_result {nullptr}
//从解析到整个解析所分配的选项,在解析完成后不应修改。
ulonglong m_base_options {0}
//激活的选项数目
ulonglong m_active_options {0}
//解决外部联接条件时使用
TABLE_LIST * resolve_nest
//连接查询块中的所有表后要评估的条件。
Item * m_where_cond
//分组后要在分组行上评估的条件
Item * m_having_cond
//添加到all_fields的GROUP BY表达式的数量
int hidden_group_field_count
//如果查询块具有合并到其中的半联接嵌套,则为True
bool has_sj_nests {false}
bool has_aj_nests {false}
//如果查询块具有右连接,则为True
bool m_right_joins {false}
//允许合并立即未命名的派生表。
bool allow_merge_derived {true}
bool m_agg_func_used {false}
bool m_json_agg_func_used {false}
//如果查询块在聚合之前(在准备过程中确定(不是优化))未生成任何行,则为true。
bool m_empty_query {false}