Search in sources :

Example 1 with ResolvedFunctionDecoder

use of io.trino.metadata.ResolvedFunction.ResolvedFunctionDecoder in project trino by trinodb.

the class TestResolvedFunction method test.

@Test
public void test() {
    ResolvedFunction resolvedFunction = createResolvedFunction("top", 3);
    ResolvedFunctionDecoder decoder = new ResolvedFunctionDecoder(TestResolvedFunction::varcharTypeLoader);
    Optional<ResolvedFunction> copy = decoder.fromQualifiedName(resolvedFunction.toQualifiedName());
    assertTrue(copy.isPresent());
    assertEquals(copy.get(), resolvedFunction);
}
Also used : ResolvedFunctionDecoder(io.trino.metadata.ResolvedFunction.ResolvedFunctionDecoder) Test(org.testng.annotations.Test)

Aggregations

ResolvedFunctionDecoder (io.trino.metadata.ResolvedFunction.ResolvedFunctionDecoder)1 Test (org.testng.annotations.Test)1