Package io.trino.sql.tree
Class Cast
- java.lang.Object
-
- io.trino.sql.tree.Node
-
- io.trino.sql.tree.Expression
-
- io.trino.sql.tree.Cast
-
public final class Cast extends Expression
-
-
Constructor Summary
Constructors Constructor Description Cast(Expression expression, DataType type)Cast(Expression expression, DataType type, boolean safe)Cast(Expression expression, DataType type, boolean safe, boolean typeOnly)Cast(NodeLocation location, Expression expression, DataType type)Cast(NodeLocation location, Expression expression, DataType type, boolean safe)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <R,C>
Raccept(AstVisitor<R,C> visitor, C context)Accessible forAstVisitor, useAstVisitor.process(Node, Object)instead.booleanequals(Object o)List<Node>getChildren()ExpressiongetExpression()DataTypegetType()inthashCode()booleanisSafe()booleanisTypeOnly()booleanshallowEquals(Node other)Compare with another node by considering internal state excluding any Node returned by getChildren()-
Methods inherited from class io.trino.sql.tree.Expression
toString
-
Methods inherited from class io.trino.sql.tree.Node
getLocation
-
-
-
-
Constructor Detail
-
Cast
public Cast(Expression expression, DataType type)
-
Cast
public Cast(Expression expression, DataType type, boolean safe)
-
Cast
public Cast(Expression expression, DataType type, boolean safe, boolean typeOnly)
-
Cast
public Cast(NodeLocation location, Expression expression, DataType type)
-
Cast
public Cast(NodeLocation location, Expression expression, DataType type, boolean safe)
-
-
Method Detail
-
getExpression
public Expression getExpression()
-
getType
public DataType getType()
-
isSafe
public boolean isSafe()
-
isTypeOnly
public boolean isTypeOnly()
-
accept
public <R,C> R accept(AstVisitor<R,C> visitor, C context)
Description copied from class:ExpressionAccessible forAstVisitor, useAstVisitor.process(Node, Object)instead.- Overrides:
acceptin classExpression
-
getChildren
public List<Node> getChildren()
- Specified by:
getChildrenin classNode
-
shallowEquals
public boolean shallowEquals(Node other)
Description copied from class:NodeCompare with another node by considering internal state excluding any Node returned by getChildren()- Overrides:
shallowEqualsin classNode
-
-