Expand description
Notices that the optimizer wants to show to users.
The top-level notice types are RawOptimizerNotice
(for notices emitted
by optimizer pipelines) and OptimizerNotice
(for notices stored in the
catalog memory). The adapter
module contains code for converting the
former to the latter.
The RawOptimizerNotice
type is an enum generated by the
raw_optimizer_notices
macro. Each notice type lives in its own submodule
and implements the OptimizerNoticeApi
trait.
To add a new notice do the following:
- Create a new submodule.
- Define a struct for the new notice in that submodule.
- Implement
OptimizerNoticeApi
for that struct. - Re-export the notice type in this module.
- Add the notice type to the
raw_optimizer_notices
macro which generates theRawOptimizerNotice
enum and other boilerplate code.
ModulesΒ§
- index_
already_ πexists - Hosts
IndexAlreadyExists
. - index_
key_ πempty - Hosts
IndexKeyEmpty
. - index_
too_ πwide_ for_ literal_ constraints - Hosts
IndexTooWideForLiteralConstraints
.
MacrosΒ§
StructsΒ§
- Humanized
Action - A wrapper for the
OptimizerNoticeApi::fmt_action
that implementsfmt::Display
. - Humanized
Hint - A wrapper for the
OptimizerNoticeApi::fmt_hint
that implementsfmt::Display
. - Humanized
Message - A wrapper for the
OptimizerNoticeApi::fmt_message
that implementsfmt::Display
. - Index
Already Exists - Trying to re-create an index that already exists.
- Index
KeyEmpty - An index with an empty key is maximally skewed (all of the data goes to a single worker), and is almost never really useful. Itβs slightly useful for a cross join, because a cross join also has an empty key, so we avoid rearranging the input. However, this is still not very useful, because
- Index
TooWide ForLiteral Constraints - An index could be used for some literal constraints if the index included only a subset of its columns.
- Optimizer
Notice - An long lived in-memory representation of a
RawOptimizerNotice
that is meant to be kept as part of the hydrated catalog state.
EnumsΒ§
- Action
- An action attached to an
OptimizerNotice
- Action
Kind - Optimizer
Notice Kind - RawOptimizer
Notice - Notices that the optimizer wants to show to users.
TraitsΒ§
- Optimizer
Notice Api - An API structs
RawOptimizerNotice
wrapped by structs