use of io.confluent.ksql.schema.ksql.SqlTypeParser in project ksql by confluentinc.
the class UdtfLoaderTest method shouldNotLoadUdtfWithRawListReturn.
@Test
public void shouldNotLoadUdtfWithRawListReturn() {
// Given:
final MutableFunctionRegistry functionRegistry = new InternalFunctionRegistry();
final SqlTypeParser typeParser = create(EMPTY);
final UdtfLoader udtfLoader = new UdtfLoader(functionRegistry, empty(), typeParser, true);
// When:
final Exception e = assertThrows(KsqlException.class, () -> udtfLoader.loadUdtfFromClass(RawListReturn.class, INTERNAL_PATH));
// Then:
assertThat(e.getMessage(), containsString("UDTF functions must return a parameterized List. Class io.confluent.ksql.function.UdtfLoaderTest$RawListReturn Method badReturn"));
}
Aggregations