Search in sources :

Example 1 with LogicalBinaryExpression

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

the class ExpressionFormatterTest method shouldFormatLogicalBinaryExpression.

@Test
public void shouldFormatLogicalBinaryExpression() {
    final LogicalBinaryExpression expression = new LogicalBinaryExpression(LogicalBinaryExpression.Type.AND, new StringLiteral("a"), new StringLiteral("b"));
    assertThat(ExpressionFormatter.formatExpression(expression), equalTo("('a' AND 'b')"));
}
Also used : LogicalBinaryExpression(io.confluent.ksql.parser.tree.LogicalBinaryExpression) StringLiteral(io.confluent.ksql.parser.tree.StringLiteral) Test(org.junit.Test)

Aggregations

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