Module mz_transform::notice
source Β· 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 HostsIndexAlreadyExists
. - index_
key_ πempty HostsIndexKeyEmpty
.
Macros§
Structs§
- A wrapper for the
OptimizerNoticeApi::fmt_action
that implementsfmt::Display
. - A wrapper for the
OptimizerNoticeApi::fmt_hint
that implementsfmt::Display
. - A wrapper for the
OptimizerNoticeApi::fmt_message
that implementsfmt::Display
. - Trying to re-create an index that already exists.
- 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
- An index could be used for some literal constraints if the index included only a subset of its columns.
- An long lived in-memory representation of a
RawOptimizerNotice
that is meant to be kept as part of the hydrated catalog state.
Enums§
- An action attached to an
OptimizerNotice
- Notices that the optimizer wants to show to users.
Constants§
Traits§
- An API structs
RawOptimizerNotice
wrapped by structs