Search in sources :

Example 1 with EqLong256FunctionFactory

use of io.questdb.griffin.engine.functions.eq.EqLong256FunctionFactory in project questdb by bluestreak01.

the class BindVariablesTest method testLong256Compare.

@Test
public void testLong256Compare() throws SqlException {
    bindVariableService.setLong256("x", 1, 2, 3, 4);
    bindVariableService.setLong256("y", 1, 2, 3, 4);
    Function func = expr(":x = :y").withFunction(new EqLong256FunctionFactory()).$();
    func.init(null, sqlExecutionContext);
    Assert.assertTrue(func.getBool(builder.getRecord()));
    bindVariableService.setLong256("y", 2, 4, 5, 6);
    Assert.assertFalse(func.getBool(builder.getRecord()));
}
Also used : Function(io.questdb.cairo.sql.Function) EqLong256FunctionFactory(io.questdb.griffin.engine.functions.eq.EqLong256FunctionFactory) Test(org.junit.Test)

Aggregations

Function (io.questdb.cairo.sql.Function)1 EqLong256FunctionFactory (io.questdb.griffin.engine.functions.eq.EqLong256FunctionFactory)1 Test (org.junit.Test)1