Package net.hydromatic.morel.ast
Class Core.Scan
java.lang.Object
net.hydromatic.morel.ast.AstNode
net.hydromatic.morel.ast.Core.BaseNode
net.hydromatic.morel.ast.Core.FromStep
net.hydromatic.morel.ast.Core.Scan
- Enclosing class:
Core
A
join or v in listExpr or v = expr clause in a
from expression.-
Field Summary
FieldsFields inherited from class net.hydromatic.morel.ast.Core.FromStep
env -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAccepts a shuttle, calling theShuttle.visit(net.hydromatic.morel.ast.Ast.Literal)method appropriate to the type of this node, and returning the result.voidAccepts a visitor, calling theShuttle.visit(net.hydromatic.morel.ast.Ast.Literal)method appropriate to the type of this node, and returning the result.private static booleanReturns whether you can assign a value offromTypeto a variable of typetoType.copy(Core.StepEnv env, Core.Pat pat, Core.Exp exp, Core.Exp condition) private booleanbooleanisOrdered(boolean inputIsOrdered) Returns whether the output of this step is ordered, given whether the input is ordered.protected AstWriterMethods inherited from class net.hydromatic.morel.ast.Core.FromStep
unparse
-
Field Details
-
pat
-
exp
-
condition
-
-
Constructor Details
-
Scan
Scan(Core.StepEnv env, Core.Pat pat, Core.Exp exp, Core.Exp condition)
-
-
Method Details
-
canAssign
Returns whether you can assign a value offromTypeto a variable of typetoType. -
isOrdered
public boolean isOrdered(boolean inputIsOrdered) Returns whether the output of this step is ordered, given whether the input is ordered.For example,
Core.WhereandCore.Yieldare ordered if and only if their input is ordered;Core.Orderis always ordered;Core.Groupis unordered.A
Scanis ordered only if the input is ordered andexpis ordered. Think of it as like nested loops join.If a
Scanis the first step in thefrom, we think of its input as an ordered list containingunit. Therefore, its output is ordered ifexpis alist.- Overrides:
isOrderedin classCore.FromStep
-
accept
Description copied from class:AstNodeAccepts a shuttle, calling theShuttle.visit(net.hydromatic.morel.ast.Ast.Literal)method appropriate to the type of this node, and returning the result.- Specified by:
acceptin classCore.FromStep
-
accept
Description copied from class:AstNodeAccepts a visitor, calling theShuttle.visit(net.hydromatic.morel.ast.Ast.Literal)method appropriate to the type of this node, and returning the result.- Overrides:
acceptin classCore.BaseNode
-
unparse
- Specified by:
unparsein classCore.FromStep
-
isLiteralTrue
private boolean isLiteralTrue() -
copy
-