use of io.questdb.griffin.engine.functions.eq.EqDoubleFunctionFactory in project questdb by bluestreak01.
the class FunctionParserTest method testUndefinedBindVariableFuzzyMatched.
@Test
public void testUndefinedBindVariableFuzzyMatched() throws SqlException {
bindVariableService.clear();
functions.add(new EqIntFunctionFactory());
functions.add(new EqDoubleFunctionFactory());
functions.add(new EqLongFunctionFactory());
final GenericRecordMetadata metadata = new GenericRecordMetadata();
metadata.add(new TableColumnMetadata("a", 1, ColumnType.FLOAT));
try (Function f = parseFunction("a = $1", metadata, createFunctionParser())) {
TestUtils.assertContains(f.getClass().getCanonicalName(), "io.questdb.griffin.engine.functions.eq.EqDoubleFunctionFactory.Func");
}
Assert.assertEquals(ColumnType.DOUBLE, bindVariableService.getFunction(0).getType());
}
use of io.questdb.griffin.engine.functions.eq.EqDoubleFunctionFactory in project questdb by bluestreak01.
the class FunctionParserTest method testUndefinedBindVariableAmbiguouslyMatched.
@Test
public void testUndefinedBindVariableAmbiguouslyMatched() throws SqlException {
bindVariableService.clear();
functions.add(new EqIntFunctionFactory());
functions.add(new EqDoubleFunctionFactory());
functions.add(new EqLongFunctionFactory());
try (Function f = parseFunction("$2 = $1", null, createFunctionParser())) {
TestUtils.assertContains(f.getClass().getCanonicalName(), "io.questdb.griffin.engine.functions.eq.EqDoubleFunctionFactory.Func");
}
Assert.assertEquals(ColumnType.DOUBLE, bindVariableService.getFunction(0).getType());
Assert.assertEquals(ColumnType.DOUBLE, bindVariableService.getFunction(1).getType());
}
use of io.questdb.griffin.engine.functions.eq.EqDoubleFunctionFactory in project questdb by bluestreak01.
the class FunctionParserTest method testUndefinedBindVariableExactlyMatched.
@Test
public void testUndefinedBindVariableExactlyMatched() throws SqlException {
bindVariableService.clear();
functions.add(new EqIntFunctionFactory());
functions.add(new EqDoubleFunctionFactory());
functions.add(new EqLongFunctionFactory());
final GenericRecordMetadata metadata = new GenericRecordMetadata();
metadata.add(new TableColumnMetadata("a", 1, ColumnType.LONG));
try (Function f = parseFunction("a = $1", metadata, createFunctionParser())) {
TestUtils.assertContains(f.getClass().getCanonicalName(), "io.questdb.griffin.engine.functions.eq.EqLongFunctionFactory.Func");
}
Assert.assertEquals(ColumnType.LONG, bindVariableService.getFunction(0).getType());
}
Aggregations