Search in sources :

Example 1 with NotExpression

use of io.confluent.ksql.parser.tree.NotExpression in project ksql by confluentinc.

the class AstBuilder method visitLike.

@Override
public Node visitLike(SqlBaseParser.LikeContext context) {
    Expression escape = null;
    if (context.escape != null) {
        escape = (Expression) visit(context.escape);
    }
    Expression result = new LikePredicate(getLocation(context), (Expression) visit(context.value), (Expression) visit(context.pattern), escape);
    if (context.NOT() != null) {
        result = new NotExpression(getLocation(context), result);
    }
    return result;
}
Also used : InListExpression(io.confluent.ksql.parser.tree.InListExpression) NullIfExpression(io.confluent.ksql.parser.tree.NullIfExpression) SimpleCaseExpression(io.confluent.ksql.parser.tree.SimpleCaseExpression) ComparisonExpression(io.confluent.ksql.parser.tree.ComparisonExpression) DereferenceExpression(io.confluent.ksql.parser.tree.DereferenceExpression) Expression(io.confluent.ksql.parser.tree.Expression) LogicalBinaryExpression(io.confluent.ksql.parser.tree.LogicalBinaryExpression) TumblingWindowExpression(io.confluent.ksql.parser.tree.TumblingWindowExpression) ArithmeticBinaryExpression(io.confluent.ksql.parser.tree.ArithmeticBinaryExpression) NotExpression(io.confluent.ksql.parser.tree.NotExpression) HoppingWindowExpression(io.confluent.ksql.parser.tree.HoppingWindowExpression) SubscriptExpression(io.confluent.ksql.parser.tree.SubscriptExpression) SessionWindowExpression(io.confluent.ksql.parser.tree.SessionWindowExpression) SearchedCaseExpression(io.confluent.ksql.parser.tree.SearchedCaseExpression) LambdaExpression(io.confluent.ksql.parser.tree.LambdaExpression) SubqueryExpression(io.confluent.ksql.parser.tree.SubqueryExpression) WindowExpression(io.confluent.ksql.parser.tree.WindowExpression) ArithmeticUnaryExpression(io.confluent.ksql.parser.tree.ArithmeticUnaryExpression) NotExpression(io.confluent.ksql.parser.tree.NotExpression) LikePredicate(io.confluent.ksql.parser.tree.LikePredicate)

Aggregations

ArithmeticBinaryExpression (io.confluent.ksql.parser.tree.ArithmeticBinaryExpression)1 ArithmeticUnaryExpression (io.confluent.ksql.parser.tree.ArithmeticUnaryExpression)1 ComparisonExpression (io.confluent.ksql.parser.tree.ComparisonExpression)1 DereferenceExpression (io.confluent.ksql.parser.tree.DereferenceExpression)1 Expression (io.confluent.ksql.parser.tree.Expression)1 HoppingWindowExpression (io.confluent.ksql.parser.tree.HoppingWindowExpression)1 InListExpression (io.confluent.ksql.parser.tree.InListExpression)1 LambdaExpression (io.confluent.ksql.parser.tree.LambdaExpression)1 LikePredicate (io.confluent.ksql.parser.tree.LikePredicate)1 LogicalBinaryExpression (io.confluent.ksql.parser.tree.LogicalBinaryExpression)1 NotExpression (io.confluent.ksql.parser.tree.NotExpression)1 NullIfExpression (io.confluent.ksql.parser.tree.NullIfExpression)1 SearchedCaseExpression (io.confluent.ksql.parser.tree.SearchedCaseExpression)1 SessionWindowExpression (io.confluent.ksql.parser.tree.SessionWindowExpression)1 SimpleCaseExpression (io.confluent.ksql.parser.tree.SimpleCaseExpression)1 SubqueryExpression (io.confluent.ksql.parser.tree.SubqueryExpression)1 SubscriptExpression (io.confluent.ksql.parser.tree.SubscriptExpression)1 TumblingWindowExpression (io.confluent.ksql.parser.tree.TumblingWindowExpression)1 WindowExpression (io.confluent.ksql.parser.tree.WindowExpression)1