Search in sources :

Example 1 with SqlInvokedFunctionNamespaceManagerConfig

use of io.hetu.core.plugin.functionnamespace.SqlInvokedFunctionNamespaceManagerConfig in project hetu-core by openlookeng.

the class TestSqlInvokedFunctionNamespaceManagerConfig method testExplicitPropertyMappings.

@Test
public void testExplicitPropertyMappings() {
    Map<String, String> properties = new ImmutableMap.Builder<String, String>().put("function-cache-expiration", "10m").put("function-instance-cache-expiration", "4h").put("supported-function-languages", "sql,hive").build();
    SqlInvokedFunctionNamespaceManagerConfig expected = new SqlInvokedFunctionNamespaceManagerConfig().setFunctionCacheExpiration(new Duration(10, MINUTES)).setFunctionInstanceCacheExpiration(new Duration(4, HOURS)).setSupportedFunctionLanguages("sql,hive");
    assertFullMapping(properties, expected);
}
Also used : Duration(io.airlift.units.Duration) SqlInvokedFunctionNamespaceManagerConfig(io.hetu.core.plugin.functionnamespace.SqlInvokedFunctionNamespaceManagerConfig) Test(org.testng.annotations.Test)

Aggregations

Duration (io.airlift.units.Duration)1 SqlInvokedFunctionNamespaceManagerConfig (io.hetu.core.plugin.functionnamespace.SqlInvokedFunctionNamespaceManagerConfig)1 Test (org.testng.annotations.Test)1