1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-05 13:16:09 +03:00

MDEV-36092 New-style hint: [NO_]SPLIT_MATERIALIZED

Support for optimizer hints NO_SPLIT_MATERIALIZED and
SPLIT_MATERIALIZED.  These hints allow fine-grained control
of the "lateral derived" optimization within a query.

Introduces new overload of hint_table_state function which
tells both a hint's value as well as whether it is present.
This is useful to disambiguate cases that the other version
of hint_table_state cannot, such as when a hint is forcing
a behavior in the optimizer that it would not normally do
and the corresponding optimizer switch is enabled.
This commit is contained in:
Dave Gosselin
2025-04-24 15:03:05 -04:00
committed by Dave Gosselin
parent 07d71fdcf8
commit 62a1f0d990
8 changed files with 1467 additions and 26 deletions

View File

@@ -50,6 +50,7 @@ enum opt_hints_enum
JOIN_FIXED_ORDER_HINT_ENUM,
DERIVED_CONDITION_PUSHDOWN_HINT_ENUM,
MERGE_HINT_ENUM,
SPLIT_MATERIALIZED_HINT_ENUM,
MAX_HINT_ENUM // This one must be the last in the list
};
@@ -118,7 +119,9 @@ public:
keyword_DERIVED_CONDITION_PUSHDOWN,
keyword_NO_DERIVED_CONDITION_PUSHDOWN,
keyword_MERGE,
keyword_NO_MERGE
keyword_NO_MERGE,
keyword_SPLIT_MATERIALIZED,
keyword_NO_SPLIT_MATERIALIZED
};
class Token: public Lex_cstring
@@ -373,7 +376,9 @@ private:
id == TokenID::keyword_DERIVED_CONDITION_PUSHDOWN ||
id == TokenID::keyword_NO_DERIVED_CONDITION_PUSHDOWN ||
id == TokenID::keyword_MERGE ||
id == TokenID::keyword_NO_MERGE;
id == TokenID::keyword_NO_MERGE ||
id == TokenID::keyword_SPLIT_MATERIALIZED ||
id == TokenID::keyword_NO_SPLIT_MATERIALIZED;
}
};
class Table_level_hint_type: public TokenChoice<Parser,