Search in sources :

Example 31 with BinaryExpression

use of com.yahoo.bullet.query.expressions.BinaryExpression in project bullet-core by yahoo.

the class SimpleEqualityPartitionerTest method testDefaultPartitioningQueryWithNonEqualityFilters.

@Test
public void testDefaultPartitioningQueryWithNonEqualityFilters() {
    SimpleEqualityPartitioner partitioner = createPartitioner("A", "B");
    Query query = createQuery(new BinaryExpression(new FieldExpression("A"), new ValueExpression("bar"), Operation.NOT_EQUALS), new BinaryExpression(new FieldExpression("B"), new ValueExpression("baz"), Operation.NOT_EQUALS));
    Assert.assertEquals(partitioner.getKeys(query), singleton("*-*"));
}
Also used : Query(com.yahoo.bullet.query.Query) BinaryExpression(com.yahoo.bullet.query.expressions.BinaryExpression) ValueExpression(com.yahoo.bullet.query.expressions.ValueExpression) FieldExpression(com.yahoo.bullet.query.expressions.FieldExpression) Test(org.testng.annotations.Test)

Aggregations

BinaryExpression (com.yahoo.bullet.query.expressions.BinaryExpression)31 FieldExpression (com.yahoo.bullet.query.expressions.FieldExpression)30 Test (org.testng.annotations.Test)30 ValueExpression (com.yahoo.bullet.query.expressions.ValueExpression)28 Query (com.yahoo.bullet.query.Query)22 UnaryExpression (com.yahoo.bullet.query.expressions.UnaryExpression)11 BulletRecord (com.yahoo.bullet.record.BulletRecord)11 Projection (com.yahoo.bullet.query.Projection)9 Window (com.yahoo.bullet.query.Window)9 Raw (com.yahoo.bullet.query.aggregations.Raw)9 ListExpression (com.yahoo.bullet.query.expressions.ListExpression)9 BulletConfigTest (com.yahoo.bullet.common.BulletConfigTest)8 Expression (com.yahoo.bullet.query.expressions.Expression)8 Field (com.yahoo.bullet.query.Field)7 Clip (com.yahoo.bullet.result.Clip)6 BulletConfig (com.yahoo.bullet.common.BulletConfig)4 Computation (com.yahoo.bullet.query.postaggregations.Computation)4 RecordBox (com.yahoo.bullet.result.RecordBox)4 Operation (com.yahoo.bullet.query.expressions.Operation)3 Culling (com.yahoo.bullet.query.postaggregations.Culling)3