Package org.partiql.lang.ast

Types

Link copied to clipboard
data class AggregateCallSiteListMeta(aggregateCallSites: List<PartiqlAst.Expr.CallAgg>) : Meta

Contains references to each of the aggregate call-sites in a given Select.

Link copied to clipboard
data class AggregateRegisterIdMeta(registerId: Int) : InternalMeta

Contains the register index allocated to a CallAgg.

Link copied to clipboard
interface HasMetas

An interface that allows the creation of extension functions that operate on objects that contain an instance of MetaContainer.

Link copied to clipboard
open class InternalMeta(tag: String) : Meta

Base class for Meta implementations which are used internally by org.partiql.lang.eval.EvaluatingCompiler during compilation and should never be serialized.

Link copied to clipboard
class IsCountStarMeta : Meta
Link copied to clipboard
class IsGroupAttributeReferenceMeta : Meta

Meta attached to an identifier when replacing the identifier with a reference to a group key variable declaration.

Link copied to clipboard
class IsImplictJoinMeta : Meta

Meta node intended to be attached to an instance of FromSourcedJoin to indicate that no join condition was specified in the original query and therefore this is an implicit join.

Link copied to clipboard
class IsIonLiteralMeta : Meta

Meta node intended to be attached to an instance of PartiqlAst.Expr.Lit to indicate that it was designated as an ionLiteral in the parsed statement.

Link copied to clipboard
object IsListParenthesizedMeta : Meta

The IsListParenthesizedMeta is used to distinguish the two types of org.partiql.lang.domains.PartiqlAst.Expr.List syntax's:

Link copied to clipboard
object IsOrderedMeta : Meta

To reduce any extraneous passes over data, this Meta indicates whether the associated BindingsToValues Physical expression should be an ordered list or a bag.

Link copied to clipboard
class IsPathIndexMeta : Meta

This is used by the PartiQLVisitor to determine whether the path step is of type index. This is because it is used to evaluate path expressions in FROM clauses in convertPathToProjectionItem(). This class exists because ANTLR first parses the path (and adds IsPathIndexMeta to any path step that uses indexing: AKA a0), and, upon visiting the path, we check that the path doesn't end with a .* and contains an index. The AST does not differentiate between different path steps, and therefore, this meta exists to aid in determining whether the projection item path is correct. Example:

Link copied to clipboard
class IsSyntheticNameMeta : InternalMeta

Attached to SymbolPrimitive instances that were synthetically calculated based on context because they were not explicitly specified.

Link copied to clipboard
class IsTransformedOrderByAliasMeta : Meta

A Meta to help the OrderBySortSpecVisitorTransform to know when the OrderBy SortSpec has already been transformed. It essentially helps to turn

Link copied to clipboard
class IsValuesExprMeta : Meta

This is used because the IN Predicate requires that the RHS cannot be a SELECT expression or a VALUES expression. Therefore, attaching this to a VALUES expression (which is just a BAG in the AST) allows the PartiQLVisitor to differentiate between bags (specifically for the IN Predicate).

Link copied to clipboard
class LegacyLogicalNotMeta : Meta

A legacy meta that is no longer used.

Link copied to clipboard
interface Meta

The Meta interface is implemented by classes that provide an object mapping view to AST meta nodes. A "meta" is any arbitrary data that is to be associated with an AST node.

Link copied to clipboard
data class SourceLocationMeta(lineNum: Long, charOffset: Long, length: Long) : Meta

Represents a specific location within a source file.

Link copied to clipboard
data class StaticTypeMeta(type: StaticType) : Meta

Represents a static type for an AST element.

Link copied to clipboard
data class UniqueNameMeta(uniqueName: String) : InternalMeta

Represents the unique name given to certain variables--allows alpha rename transforms to avoid capturing variables unintentionally.

Functions

Link copied to clipboard
fun MetaContainer.add(meta: Meta): MetaContainer
Link copied to clipboard
fun MetaContainer.find(tagName: String): Meta?
Link copied to clipboard
fun MetaContainer.hasMeta(tagName: String): Boolean
Link copied to clipboard
infix fun Class<*>.to(m: Meta): Pair<Class<*>, Meta>

Properties

Link copied to clipboard
val MetaContainer.sourceLocation: SourceLocationMeta?
Link copied to clipboard
val UNKNOWN_SOURCE_LOCATION: SourceLocationMeta