Details
-
Task
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
Description
Investigate resolving hints later to solve chicken/egg problem where hints are needed for derived tables before all VIEWs are opened. The basic premise is that we open VIEWs (which are treated as derived tables) after lexing the parent select. This select and its query blocks are numbered. It may specify hints that have an effect within VIEWs (like [NO_]MERGE) but we won't know until after we open VIEWs. So we need to reconsider derived merge hints again after opening VIEWs. (In effect, we make a decision regarding the hint treatment during parent query lexing, and then have to revisit it upon opening a VIEW, or at the very least defer such decisions until after we open VIEWs).
From Slack:
Parsing
|
open tables
|
LOC1: (somewhere inside we check for OPTIMIZER_SWITCH_DERIVED_MERGE and hint with the same meainig) (edited)
|
> here we learn that some tables are views and that they have child select #N , #N+1, #N+2 ...
|
Name resolution
|
somewhere here we check for DERIVED_MERGE again (?)
|
Maybe here we could "reconsider" the decision made at LOC1
|
 |
Defer resolution until
|
JOIN object construction ?
|
fix_fields for items ?
|
Attachments
Issue Links
- is caused by
-
MDEV-37260 New-style Optimizer Hints: milestone 3
-
- In Progress
-