Package org. partiql. lang. eval. visitors
Types
Allocates registerIds to all aggregate call-sites, storing the allocated registerId in an instance of AggregateRegisterIdMeta.
Transforms all the hard-coded type-nodes in the AST to PartiqlAst.Type.CustomType. It is used only after deserializing the old persisted ASTs to make them compatible with the new version of the PIG AST. It should be non-existent once the persisted ASTs are migrated to the new version of PIG AST. The tests for this visitor transform are covered in SqlParserCustomTypeCatalogTests.kt
TODO: Remove this VisitorTransform once https://github.com/partiql/partiql-lang-kotlin/issues/510 is resolved.
Assigns aliases to any unspecified PartiqlAst.FromSource.Scan/PartiqlAst.FromSource.Unpivot that does not already have one.
Pre-calculates PartiqlAst.GroupBy aliases, while not changing any that were previously specified, for example:
This transform must execute after GroupByItemAliasVisitorTransform and FromSourceAliasVisitorTransform.
Provides rules for basic AST sanity checks that should be performed before any attempt at further AST processing. This is provided as a distinct PartiqlAst.Visitor so that all other visitors may assume that the AST at least passed the checking performed here.
A simple visitor transformer that provides a pipeline of transformers to be executed in sequential order.
Specifies any previously unspecified select list item aliases.
A PartiqlAst.VisitorTransform that annotates nodes with their static types and resolves implicit variables explicitly based on the static types.
Extra constraints which may be imposed on the type checking.
Specifies an individual substitution to be performed by SubstitutionVisitorTransform.
Given a Map (substitutions), replaces every node of the AST that is equivalent to a SubstitutionPair.target with its corresponding SubstitutionPair.replacement.
Base-class for visitor transforms that provides additional functions outside of PartiqlAst.VisitorTransform. These functions are used to avoid infinite recursion when working with nested visitor instances and to change the rewrite order to follow the PartiQL evaluation order.
Functions
Returns a PartiqlAst.VisitorTransform requiring no external state for the basic functionality of compiling PartiQL queries.