15 package com.cloudera.impala.analysis;
19 import com.cloudera.impala.thrift.TBoolLiteral;
20 import com.cloudera.impala.thrift.TExprNode;
21 import com.cloudera.impala.thrift.TExprNodeType;
22 import com.google.common.base.Objects;
34 if (value.toLowerCase().equals(
"true")) {
36 }
else if (value.toLowerCase().equals(
"false")) {
53 return Objects.toStringHelper(
this)
60 if (!super.equals(obj)) {
75 return value_ ?
"TRUE" :
"FALSE";
80 msg.node_type = TExprNodeType.BOOL_LITERAL;
81 msg.bool_literal =
new TBoolLiteral(
value_);
86 if (targetType.equals(
this.type_)) {
89 return new CastExpr(targetType,
this);
95 int ret = super.compareTo(o);
96 if (ret != 0)
return ret;
int compareTo(LiteralExpr o)
BoolLiteral(BoolLiteral other)
void toThrift(TExprNode msg)
static final ScalarType BOOLEAN
BoolLiteral(boolean value)
BoolLiteral(String value)
boolean equals(Object obj)
Expr uncheckedCastTo(Type targetType)