Search in sources :

Example 1 with BetweenPredicate

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

the class ExpressionFormatterTest method shouldFormatBetweenPredicate.

@Test
public void shouldFormatBetweenPredicate() {
    final BetweenPredicate predicate = new BetweenPredicate(new StringLiteral("blah"), new LongLiteral("5"), new LongLiteral("10"));
    assertThat(ExpressionFormatter.formatExpression(predicate), equalTo("('blah' BETWEEN 5 AND 10)"));
}
Also used : BetweenPredicate(io.confluent.ksql.parser.tree.BetweenPredicate) StringLiteral(io.confluent.ksql.parser.tree.StringLiteral) LongLiteral(io.confluent.ksql.parser.tree.LongLiteral) Test(org.junit.Test)

Aggregations

BetweenPredicate (io.confluent.ksql.parser.tree.BetweenPredicate)1 LongLiteral (io.confluent.ksql.parser.tree.LongLiteral)1 StringLiteral (io.confluent.ksql.parser.tree.StringLiteral)1 Test (org.junit.Test)1