The Generator formulates the AMP processing steps, called plastic steps, based on the optimized parse tree plan it receives as the output of the Optimizer.
Except for any hard-coded literal values that may be used, the plastic steps do not have any data values associated with them.
A single request parcel can generate many plastic steps.
Block Diagram of Generator Activity
The following block diagram illustrates the workings of the Generator. The Generator is also the home of the Teradata Database hashing algorithm.
The Generator performs the following processes:
- The Generator receives the optimized parse tree from the Optimizer and uses it to build plastic steps.
- Each step is created with a step header containing fixed information about the step and the component of the step, which is the actual context-free AMP directive.
- The plastic steps for a generic plan are cached.
The Generator creates a series of optimized directives for the AMPs that contain column and row information, but no literal data values. These steps, called plastic steps, are later transformed into concrete steps by OptApply (see Definition of Concrete Steps). Plastic steps allow sets of values taken from the USING request modifier in parameterized-independent requests to be inserted into the optimized query plan during subsequent Parser operations.
The Generator, for a generic plan, writes the plastic steps into the request cache, then sends them to OptApply. The plastic steps contain all the context-free information there is to know about a request and so are cached for potential reuse.