Package io.trino.sql.tree
Class IfExpression
- java.lang.Object
-
- io.trino.sql.tree.Node
-
- io.trino.sql.tree.Expression
-
- io.trino.sql.tree.IfExpression
-
public class IfExpression extends Expression
IF(v1,v2[,v3]): CASE WHEN v1 THEN v2 [ELSE v3] END
-
-
Constructor Summary
Constructors Constructor Description IfExpression(Expression condition, Expression trueValue, Expression falseValue)
IfExpression(NodeLocation location, Expression condition, Expression trueValue, Expression falseValue)
-
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.boolean
equals(Object obj)
List<Node>
getChildren()
Expression
getCondition()
Optional<Expression>
getFalseValue()
Expression
getTrueValue()
int
hashCode()
boolean
shallowEquals(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
-
IfExpression
public IfExpression(Expression condition, Expression trueValue, Expression falseValue)
-
IfExpression
public IfExpression(NodeLocation location, Expression condition, Expression trueValue, Expression falseValue)
-
-
Method Detail
-
getCondition
public Expression getCondition()
-
getTrueValue
public Expression getTrueValue()
-
getFalseValue
public Optional<Expression> getFalseValue()
-
accept
public <R,C> R accept(AstVisitor<R,C> visitor, C context)
Description copied from class:Expression
Accessible forAstVisitor
, useAstVisitor.process(Node, Object)
instead.- Overrides:
accept
in classExpression
-
getChildren
public List<Node> getChildren()
- Specified by:
getChildren
in classNode
-
shallowEquals
public boolean shallowEquals(Node other)
Description copied from class:Node
Compare with another node by considering internal state excluding any Node returned by getChildren()- Overrides:
shallowEquals
in classNode
-
-