Skip to content

File query_rewrite.h

FileList > cubrid > src > optimizer > rewriter > query_rewrite.h

Go to the source code of this file

  • #include "dbtype.h"
  • #include "object_primitive.h"
  • #include "object_representation.h"
  • #include "object_domain.h"
  • #include "optimizer.h"
  • #include "parser.h"
  • #include "parser_message.h"
  • #include "parse_tree.h"
  • #include "semantic_check.h"
  • #include "view_transform.h"

Classes

Type Name
struct pt_name_spec_info
struct qo_reduce_reference_info
struct qo_reset_location_info
struct spec_cnt_info
struct spec_id_info
struct to_dot_info

Public Types

Type Name
typedef enum comp_dbvalue_with_optye_result COMP_DBVALUE_WITH_OPTYPE_RESULT
typedef enum dnf_merge_range_result DNF_MERGE_RANGE_RESULT
typedef struct pt_name_spec_info PT_NAME_SPEC_INFO
typedef struct qo_reduce_reference_info QO_REDUCE_REFERENCE_INFO
typedef struct qo_reset_location_info RESET_LOCATION_INFO
typedef struct spec_cnt_info SPEC_CNT_INFO
typedef struct spec_id_info SPEC_ID_INFO
typedef struct to_dot_info TO_DOT_INFO
enum comp_dbvalue_with_optye_result
enum dnf_merge_range_result

Public Functions

Type Name
void qo_add_limit_clause (PARSER_CONTEXT * parser, PT_NODE * node)
PT_NODE * qo_analyze_path_join (PARSER_CONTEXT * parser, PT_NODE * path_spec, void * arg, int * continue_walk)
PT_NODE * qo_analyze_path_join_pre (PARSER_CONTEXT * parser, PT_NODE * spec, void * arg, int * continue_walk)
void qo_auto_parameterize_keylimit_clause (PARSER_CONTEXT * parser, PT_NODE * node)
void qo_auto_parameterize_limit_clause (PARSER_CONTEXT * parser, PT_NODE * node)
bool qo_check_condition_null (PARSER_CONTEXT * parser, PT_NODE * path_spec, PT_NODE * query_where)
bool qo_check_distinct_union (PARSER_CONTEXT * parser, PT_NODE * node)
bool qo_check_generate_single_tbl_connect_by (PARSER_CONTEXT * parser, PT_NODE * node)
bool qo_check_hint_union (PARSER_CONTEXT * parser, PT_NODE * node, PT_HINT_ENUM hint)
PT_NODE * qo_check_nullable_expr_with_spec (PARSER_CONTEXT * parser, PT_NODE * node, void * arg, int * continue_walk)
PT_NODE * qo_get_name_by_spec_id (PARSER_CONTEXT * parser, PT_NODE * node, void * arg, int * continue_walk)
int qo_is_reduceable_const (PT_NODE * expr)
void qo_move_on_of_explicit_join_to_where (PARSER_CONTEXT * parser, PT_NODE ** fromp, PT_NODE ** wherep)
PT_NODE * qo_push_limit_to_union (PARSER_CONTEXT * parser, PT_NODE * node, PT_NODE * limit)
void qo_reduce_equality_terms (PARSER_CONTEXT * parser, PT_NODE * node, PT_NODE ** wherep)
PT_NODE * qo_reduce_equality_terms_post (PARSER_CONTEXT * parser, PT_NODE * node, void * arg, int * continue_walk)
PT_NODE * qo_rewrite_hidden_col_as_derived (PARSER_CONTEXT * parser, PT_NODE * node, PT_NODE * parent_node)
void qo_rewrite_index_hints (PARSER_CONTEXT * parser, PT_NODE * statement)
void qo_rewrite_nonnull_count_select_list (PARSER_CONTEXT * parser, PT_NODE * select)
bool qo_rewrite_select_queries (PARSER_CONTEXT * parser, PT_NODE ** nodep, PT_NODE ** wherep, int * seqno)
PT_NODE * qo_rewrite_subqueries (PARSER_CONTEXT * parser, PT_NODE * node, void * arg, int * continue_walk)
void qo_rewrite_terms (PARSER_CONTEXT * parser, PT_NODE * nodes, PT_NODE ** terms)

Macros

Type Name
define DB_MAX_LITERAL_PRECISION 255
define PROCESS_IF_EXISTS (parser, condition, func) /* multi line expression */
define QO_CHECK_AND_REDUCE_EQUALITY_TERMS (parser, node, where) /* multi line expression */

Public Types Documentation

typedef COMP_DBVALUE_WITH_OPTYPE_RESULT

typedef enum comp_dbvalue_with_optye_result COMP_DBVALUE_WITH_OPTYPE_RESULT;

typedef DNF_MERGE_RANGE_RESULT

typedef enum dnf_merge_range_result DNF_MERGE_RANGE_RESULT;

typedef PT_NAME_SPEC_INFO

typedef struct pt_name_spec_info PT_NAME_SPEC_INFO;

typedef QO_REDUCE_REFERENCE_INFO

typedef struct qo_reduce_reference_info QO_REDUCE_REFERENCE_INFO;

typedef RESET_LOCATION_INFO

typedef struct qo_reset_location_info RESET_LOCATION_INFO;

typedef SPEC_CNT_INFO

typedef struct spec_cnt_info SPEC_CNT_INFO;

typedef SPEC_ID_INFO

typedef struct spec_id_info SPEC_ID_INFO;

typedef TO_DOT_INFO

typedef struct to_dot_info TO_DOT_INFO;

enum comp_dbvalue_with_optye_result

enum comp_dbvalue_with_optye_result {
    CompResultLess = -2,
    CompResultLessAdj = -1,
    CompResultEqual = 0,
    CompResultGreaterAdj = 1,
    CompResultGreater = 2,
    CompResultError = 3
};

enum dnf_merge_range_result

enum dnf_merge_range_result {
    DNF_RANGE_VALID = 0,
    DNF_RANGE_ALWAYS_FALSE = 1,
    DNF_RANGE_ALWAYS_TRUE = 2
};

Public Functions Documentation

function qo_add_limit_clause

void qo_add_limit_clause (
    PARSER_CONTEXT * parser,
    PT_NODE * node
) 

function qo_analyze_path_join

PT_NODE * qo_analyze_path_join (
    PARSER_CONTEXT * parser,
    PT_NODE * path_spec,
    void * arg,
    int * continue_walk
) 

function qo_analyze_path_join_pre

PT_NODE * qo_analyze_path_join_pre (
    PARSER_CONTEXT * parser,
    PT_NODE * spec,
    void * arg,
    int * continue_walk
) 

function qo_auto_parameterize_keylimit_clause

void qo_auto_parameterize_keylimit_clause (
    PARSER_CONTEXT * parser,
    PT_NODE * node
) 

function qo_auto_parameterize_limit_clause

void qo_auto_parameterize_limit_clause (
    PARSER_CONTEXT * parser,
    PT_NODE * node
) 

function qo_check_condition_null

bool qo_check_condition_null (
    PARSER_CONTEXT * parser,
    PT_NODE * path_spec,
    PT_NODE * query_where
) 

function qo_check_distinct_union

bool qo_check_distinct_union (
    PARSER_CONTEXT * parser,
    PT_NODE * node
) 

function qo_check_generate_single_tbl_connect_by

bool qo_check_generate_single_tbl_connect_by (
    PARSER_CONTEXT * parser,
    PT_NODE * node
) 

function qo_check_hint_union

bool qo_check_hint_union (
    PARSER_CONTEXT * parser,
    PT_NODE * node,
    PT_HINT_ENUM hint
) 

function qo_check_nullable_expr_with_spec

PT_NODE * qo_check_nullable_expr_with_spec (
    PARSER_CONTEXT * parser,
    PT_NODE * node,
    void * arg,
    int * continue_walk
) 

function qo_get_name_by_spec_id

PT_NODE * qo_get_name_by_spec_id (
    PARSER_CONTEXT * parser,
    PT_NODE * node,
    void * arg,
    int * continue_walk
) 

function qo_is_reduceable_const

int qo_is_reduceable_const (
    PT_NODE * expr
) 

function qo_move_on_of_explicit_join_to_where

void qo_move_on_of_explicit_join_to_where (
    PARSER_CONTEXT * parser,
    PT_NODE ** fromp,
    PT_NODE ** wherep
) 

function qo_push_limit_to_union

PT_NODE * qo_push_limit_to_union (
    PARSER_CONTEXT * parser,
    PT_NODE * node,
    PT_NODE * limit
) 

function qo_reduce_equality_terms

void qo_reduce_equality_terms (
    PARSER_CONTEXT * parser,
    PT_NODE * node,
    PT_NODE ** wherep
) 

function qo_reduce_equality_terms_post

PT_NODE * qo_reduce_equality_terms_post (
    PARSER_CONTEXT * parser,
    PT_NODE * node,
    void * arg,
    int * continue_walk
) 

function qo_rewrite_hidden_col_as_derived

PT_NODE * qo_rewrite_hidden_col_as_derived (
    PARSER_CONTEXT * parser,
    PT_NODE * node,
    PT_NODE * parent_node
) 

function qo_rewrite_index_hints

void qo_rewrite_index_hints (
    PARSER_CONTEXT * parser,
    PT_NODE * statement
) 

function qo_rewrite_nonnull_count_select_list

void qo_rewrite_nonnull_count_select_list (
    PARSER_CONTEXT * parser,
    PT_NODE * select
) 

function qo_rewrite_select_queries

bool qo_rewrite_select_queries (
    PARSER_CONTEXT * parser,
    PT_NODE ** nodep,
    PT_NODE ** wherep,
    int * seqno
) 

function qo_rewrite_subqueries

PT_NODE * qo_rewrite_subqueries (
    PARSER_CONTEXT * parser,
    PT_NODE * node,
    void * arg,
    int * continue_walk
) 

function qo_rewrite_terms

void qo_rewrite_terms (
    PARSER_CONTEXT * parser,
    PT_NODE * nodes,
    PT_NODE ** terms
) 

Macro Definition Documentation

define DB_MAX_LITERAL_PRECISION

#define DB_MAX_LITERAL_PRECISION `255`

define PROCESS_IF_EXISTS

#define PROCESS_IF_EXISTS (
    parser,
    condition,
    func
) `/* multi line expression */`

define QO_CHECK_AND_REDUCE_EQUALITY_TERMS

#define QO_CHECK_AND_REDUCE_EQUALITY_TERMS (
    parser,
    node,
    where
) `/* multi line expression */`


The documentation for this class was generated from the following file cubrid/src/optimizer/rewriter/query_rewrite.h