Skip to main content

Class: Using

Defined in: lang-sql/src/plan/using.ts:18

This operator is a temporary operator which is replaced by Projection and Selection in SchemaInferrer.

Extends​

Constructors​

Constructor​

new Using(lang, columns, leftName, rightName, source): Using

Defined in: lang-sql/src/plan/using.ts:24

Parameters​

ParameterTypeDescription
langLowercase<string>-
columnsASTIdentifier[]Column names shared by both sides of the join as specified in the USING clause.
leftNameASTIdentifierRelation name of the left side of the join; used to qualify overriddenCols.
rightNameASTIdentifierRelation name of the right side of the join; its USING columns are included in toRemove.
sourceCartesianProduct | JoinThe underlying join or Cartesian product operator.

Returns​

Using

Overrides​

PlanTupleOperator.constructor

Properties​

columns​

columns: ASTIdentifier[]

Defined in: lang-sql/src/plan/using.ts:27

Column names shared by both sides of the join as specified in the USING clause.


lang​

lang: Lowercase<string>

Defined in: core/dist/plan/visitor.d.ts:36

PlanOperator.lang

Inherited from​

PlanTupleOperator.lang


leftName​

leftName: ASTIdentifier

Defined in: lang-sql/src/plan/using.ts:29

Relation name of the left side of the join; used to qualify overriddenCols.


overriddenCols​

overriddenCols: ASTIdentifier[]

Defined in: lang-sql/src/plan/using.ts:22

Left-qualified versions of columns, computed by calculateSchema and used by SchemaInferrer to build the equi-join condition.


parent?​

optional parent?: PlanOperator

Defined in: core/dist/plan/visitor.d.ts:38

PlanOperator.parent

Inherited from​

PlanTupleOperator.parent


rightName​

rightName: ASTIdentifier

Defined in: lang-sql/src/plan/using.ts:31

Relation name of the right side of the join; its USING columns are included in toRemove.


schema​

schema: ASTIdentifier[]

Defined in: core/dist/plan/visitor.d.ts:32

Ordered list of attribute identifiers produced by this operator.

Inherited from​

PlanTupleOperator.schema


schemaSet​

schemaSet: IdSet

Defined in: core/dist/plan/visitor.d.ts:34

Trie-backed set of the same paths as schema; used for O(k) membership tests.

Inherited from​

PlanTupleOperator.schemaSet


source​

source: CartesianProduct | Join

Defined in: lang-sql/src/plan/using.ts:33

The underlying join or Cartesian product operator.


toRemove​

toRemove: IdSet

Defined in: lang-sql/src/plan/using.ts:20

Trie of attribute identifiers excluded from the output schema: the left- and right-qualified forms of the USING columns.

Methods​

accept()​

accept<Ret, Arg>(visitors, arg?): Ret

Defined in: lang-sql/src/plan/using.ts:43

Dispatches this operator to the SQL plan visitor.

Type Parameters​

Type Parameter
Ret
Arg

Parameters​

ParameterType
visitorsRecord<string, SQLPlanVisitor<Ret, Arg>>
arg?Arg

Returns​

Ret

Overrides​

PlanTupleOperator.accept


addToSchema()​

addToSchema(item): void

Defined in: core/dist/plan/visitor.d.ts:46

will preserve object references

Parameters​

ParameterType
itemASTIdentifier | ASTIdentifier[] | IdSet

Returns​

void

Inherited from​

PlanTupleOperator.addToSchema


calculateSchema()​

calculateSchema(): void

Defined in: lang-sql/src/plan/using.ts:68

Recomputes overriddenCols, toRemove, and the operator schema from the current source schema.

Returns​

void


clearSchema()​

clearSchema(): void

Defined in: core/dist/plan/visitor.d.ts:50

will preserve object references

Returns​

void

Inherited from​

PlanTupleOperator.clearSchema


clone()​

clone(): Using

Defined in: lang-sql/src/plan/using.ts:83

Returns a deep copy.

Returns​

Using

Overrides​

PlanTupleOperator.clone


getChildren()​

getChildren(): PlanOperator[]

Defined in: lang-sql/src/plan/using.ts:60

Returns [source].

Returns​

PlanOperator[]

Overrides​

PlanTupleOperator.getChildren


getDependencies()​

getDependencies(): IdSet

Defined in: core/dist/plan/visitor.d.ts:54

PlanOperator.getDependencies

Returns​

IdSet

Inherited from​

PlanTupleOperator.getDependencies


removeFromSchema()​

removeFromSchema(item): boolean

Defined in: core/dist/plan/visitor.d.ts:48

will preserve object references

Parameters​

ParameterType
itemASTIdentifier | ASTIdentifier[] | IdSet

Returns​

boolean

Inherited from​

PlanTupleOperator.removeFromSchema


replaceChild()​

replaceChild(current, replacement): void

Defined in: lang-sql/src/plan/using.ts:50

Replaces the source, then recomputes the schema via calculateSchema.

Parameters​

ParameterType
currentPlanTupleOperator
replacementPlanTupleOperator

Returns​

void

Overrides​

PlanTupleOperator.replaceChild